Scale computer-use 2.0 with open-source drivers, cross-OS sandboxes, and benchmarks for training, evaluation, and data generation.
Rust agentai-agentapplecomputer-usecomputer-use-agentcontainerizationcuadesktop-automationhacktoberfestlumemacosmanusoperatorswiftvirtualizationvirtualization-frameworkwindowswindows-sandbox
ci: remove 26 dead workflows and two unused libs (CUA-3571) (#6616)
cua-agents[bot]fd1655f824a0
diff --git a/.github/ci-areas.json b/.github/ci-areas.jsonindex 4a80af8995..bf7f5936bc 100644--- a/.github/ci-areas.json+++ b/.github/ci-areas.json@@ -131,13 +131,11 @@"workflows": ["cd-image-linux.yml","cd-image-omarchy.yml",- "chaos-cua-compat.yml","ci-check-docs-image-refs.yml","ci-check-docs-links.yml","ci-check-docs.yml","ci-cua-byoc.yml","ci-cua-compat-daytona.yml",- "ci-cua-compat-modal.yml","ci-cua-compat.yml","ci-cua-contrib.yml","ci-cua-microvm.yml",@@ -270,11 +268,9 @@"ci-py-bench-ui.yml","ci-py-bench.yml","ci-py-core.yml",- "ci-py-som.yml","ci-test-python.yml","ci-test-scripts.yml","docs-page-tests.yml",- "e2b-conformance.yml","e2e-cua-sdk.yml","license-check.yml"]@@ -287,9 +283,7 @@"workflows": ["ci-check-docs-image-refs.yml","ci-check-docs-links.yml",- "ci-container-cuabot.yml","ci-lint-typescript.yml",- "ci-ts-core.yml","ci-ts-cursor-motion.yml","license-check.yml"]@@ -304,7 +298,6 @@"ci-check-docs-image-refs.yml","ci-check-docs-links.yml","ci-check-docs.yml",- "ci-container-lumier.yml","ci-cua-sdk.yml","ci-cua-spaces-macos.yml","ci-swift-lume.yml",@@ -360,13 +353,10 @@"tests/compat/**"],"workflows": [- "chaos-cua-compat.yml","ci-check-docs-links.yml","ci-cua-compat-daytona.yml","ci-cua-compat-e2b.yml",- "ci-cua-compat-modal.yml","ci-cua-compat.yml",- "compat-drift.yml","e2e-compat-examples.yml","license-check.yml"]diff --git a/.github/releases/README.md b/.github/releases/README.mdindex 42271e6669..9b03269079 100644--- a/.github/releases/README.md+++ b/.github/releases/README.md@@ -123,9 +123,7 @@ and source file must be declared with its exact size, SHA-256, license source,target, and protocol version as applicable. Models and bundled source also needcomplete ledgers. The workflow emits a deterministic archive, SPDX SBOM, signedcatalog, redacted provenance, and checksums as retained CI artifacts; only the-release workflow publishes them. `cd-cua-perception-candidate-manual.yml`-remains for staging candidates from a reviewed pull request head and never-publishes.+release workflow publishes them.Candidate catalogs use the same Ed25519 envelope consumed by Cua Driver'sextension manager: `{ "payload": <compact catalog payload>,diff --git a/.github/scripts/tests/test_authorized_live_jev_use_demo.py b/.github/scripts/tests/test_authorized_live_jev_use_demo.pydeleted file mode 100644index 0cbf78d191..0000000000--- a/.github/scripts/tests/test_authorized_live_jev_use_demo.py+++ /dev/null@@ -1,514 +0,0 @@-"""Static security contracts for the review-gated candidate Jev visual demo."""--from pathlib import Path-import re-import unittest--import yaml---ROOT = Path(__file__).resolve().parents[3]-WORKFLOW = ROOT / ".github/workflows/authorized-live-jev-use-demo.yml"-ORCHESTRATOR = (- ROOT / "libs/cua-driver/rust/crates/cua-driver-e2e/tests/authorized_live_jev_use_demo_test.rs"-)-EVIDENCE_README = ROOT / "libs/cua-driver/tests/perception-demo/README.md"---class AuthorizedLiveDemoWorkflowTests(unittest.TestCase):- @classmethod- def setUpClass(cls):- cls.text = WORKFLOW.read_text()- cls.orchestrator = ORCHESTRATOR.read_text()- cls.evidence_readme = EVIDENCE_README.read_text()- cls.workflow = yaml.safe_load(cls.text)- cls.triggers = cls.workflow.get("on", cls.workflow.get(True))- cls.jobs = cls.workflow["jobs"]-- def candidate_steps(self):- return self.jobs["candidate"]["steps"]-- def candidate_text(self):- return "\n".join(step.get("run", "") for step in self.candidate_steps())-- def test_workflow_is_credential_free(self):- self.assertNotIn("TYPESAFE_API_KEY", self.text)- self.assertNotIn("${{ secrets.", self.text)- self.assertNotIn("run_live", self.text)- self.assertNotIn("RUN_LIVE_ACKNOWLEDGED", self.text)- self.assertNotIn("jev-use-live", self.text)- for job_name in ("source", "mock-preflight"):- self.assertNotIn("environment", self.jobs[job_name])- self.assertNotIn("TYPESAFE_API_KEY", str(self.jobs[job_name]))-- def test_is_manual_or_callable_with_open_source_head_and_merged_jev_commit(self):- self.assertEqual(set(self.triggers), {"workflow_dispatch", "workflow_call"})- dispatch_inputs = self.triggers["workflow_dispatch"]["inputs"]- callable_inputs = self.triggers["workflow_call"]["inputs"]- self.assertEqual(dispatch_inputs, callable_inputs)- self.assertNotRegex(self.text, r"(?m)^\s*inputs:\s*[&*]")- for trigger in self.triggers.values():- self.assertEqual(- set(trigger["inputs"]),- {- "source_pr_number",- "source_sha",- "jev_pr_number",- "jev_source_sha",- "signed_candidate_artifact_id",- "signed_candidate_run_id",- "windows_e2e_run_id",- "linux_e2e_run_id",- },- )- self.assertTrue(all(value["required"] for value in trigger["inputs"].values()))- source = self.jobs["source"]["steps"][0]["run"]- self.assertNotIn("RUN_LIVE_ACKNOWLEDGED", source)- self.assertIn('validate_pr_head "$SOURCE_PR_NUMBER"', source)- self.assertIn('validate_merged_pr "$JEV_PR_NUMBER"', source)- self.assertNotIn("CANONICAL_JEV_MERGE_SHA", self.text)- self.assertIn('[[ "$requested" == "$head_sha" ]]', source)- self.assertIn('"$head_repo" == "$GITHUB_REPOSITORY"', source)- self.assertIn('[[ "$state" == closed && "$merged" == true', source)- self.assertIn('"$requested" == "$merge_sha"', source)- self.assertNotIn("merge-base --is-ancestor", source)- self.assertNotIn("pull_request_target", self.text)- self.assertIn('[[ "$run_id" == "$CANDIDATE_RUN_ID" ]]', source)- self.assertIn("STAGING-cua-perception-review-candidates-$REQUESTED_SHA", source)- self.assertIn(".github/workflows/review-cua-perception-candidates.yml", source)- self.assertIn('.event <<<"$run_json")" == pull_request', source)- self.assertIn('[[ "$EVENT_ACTION" == labeled', source)- self.assertIn('"$EVENT_PR_NUMBER" == "$SOURCE_PR_NUMBER"', source)- self.assertIn('"$EVENT_HEAD_SHA" == "$REQUESTED_SHA"', source)- self.assertIn('"$EVENT_LABEL" == cua-perception-live-review', source)- self.assertIn('"$run_id" == "$GITHUB_RUN_ID"', source)- self.assertIn('"$GITHUB_EVENT_NAME" == workflow_dispatch', source)- self.assertIn('.status <<<"$run_json")" == in_progress', source)- self.assertIn('.status <<<"$run_json")" == completed', source)- download = next(- step- for step in self.candidate_steps()- if "download-artifact" in step.get("uses", "")- )- self.assertEqual(download["with"]["run-id"], "${{ needs.source.outputs.candidate_run_id }}")- self.assertIn("d3f86a106a0bac45b974a628896c90dbdf5c8093", download["uses"])-- def test_artifact_is_source_bound_and_verified_by_actual_driver_trust(self):- source = self.jobs["source"]["steps"][0]["run"]- for contract in (- "actions/artifacts/$CANDIDATE_ARTIFACT_ID",- ".workflow_run.head_sha",- "candidate artifact is expired",- ".conclusion",- ):- self.assertIn(contract, source)- candidate_text = self.candidate_text()- self.assertIn("extension inspect cua-perception --catalog", candidate_text)- self.assertIn("extension install cua-perception --catalog", candidate_text)- self.assertIn("extension status cua-perception --self-test --json", candidate_text)- self.assertIn(- 'catalog["signature_algorithm"] == measured["signature_algorithm"] == "ed25519"',- candidate_text,- )- self.assertIn('status["trust"] == "review-only-publisher-verified"', candidate_text)- self.assertIn('digest == files[model["path"]] == model["conversion_sha256"]', candidate_text)- self.assertNotIn("--allow-unsigned-local", candidate_text)- self.assertNotRegex(candidate_text, r"--archive\s+[^\n]+--catalog")-- def test_canonical_runs_are_attested_before_protected_candidate_job(self):- self.assertEqual(- set(self.jobs),- {"source", "mock-preflight", "candidate"},- )- preflights = "\n".join(str(self.jobs[name]) for name in ("source", "mock-preflight"))- self.assertNotIn("environment", preflights)- self.assertNotIn("TYPESAFE_API_KEY", preflights)- self.assertEqual(self.jobs["candidate"]["environment"], "authorized-live-jev-use-demo")- self.assertEqual(self.jobs["candidate"]["env"]["CUA_E2E_UNRESTRICTED_GUI"], "1")- self.assertEqual(- set(self.jobs["candidate"]["needs"]),- {"source", "mock-preflight"},- )- source = self.jobs["source"]["steps"][0]["run"]- mock = "\n".join(step.get("run", "") for step in self.jobs["mock-preflight"]["steps"])- self.assertIn("python3-tk", mock)- self.assertIn("libx11-dev", mock)- self.assertIn("libwebkit2gtk-4.1-dev", mock)- self.assertLess(mock.index("python3-tk"), mock.index("test_fixture.py"))- self.assertIn(".github/workflows/e2e-rust-windows.yml", source)- self.assertIn("rust-windows-e2e-certification", source)- self.assertIn(".github/workflows/e2e-rust-linux.yml", source)- self.assertIn("rust-linux-e2e-certification", source)- self.assertNotIn("run-rust-e2e", self.text)-- def test_candidate_matrix_uses_review_candidates_and_orchestrator_supports_macos(self):- matrix = self.jobs["candidate"]["strategy"]["matrix"]["include"]- self.assertEqual(- {item["platform"]: item["runner"] for item in matrix},- {- "windows": "windows-latest",- "linux-x11": "ubuntu-latest",- },- )- self.assertEqual(- {item["platform"]: item["driver"] for item in matrix},- {"windows": "review-cua-driver.exe", "linux-x11": "review-cua-driver"},- )- self.assertIn('target_os = "macos"', self.orchestrator)- self.assertIn('#[cfg(any(target_os = "linux", target_os = "macos"))]', self.orchestrator)- shared = self.orchestrator.index(".arg(fixture_path())")- self.assertGreater(shared, self.orchestrator.index('Command::new("py")'))- self.assertGreater(shared, self.orchestrator.index('Command::new("python3")'))-- def test_candidate_paths_use_private_windows_extension_home_and_runner_temp_evidence(self):- candidate_env = self.jobs["candidate"]["env"]- self.assertNotIn("CUA_PERCEPTION_EXTENSION_HOME", candidate_env)- self.assertNotIn("CUA_PERCEPTION_EVIDENCE_DIR", candidate_env)- self.assertNotIn("CUA_E2E_RECORDINGS_ROOT", candidate_env)- steps = self.candidate_steps()- configure = next(- step for step in steps if step.get("name") == "Configure temporary evidence paths"- )- self.assertIn(- '$extensionHomeName = "cua-perception-extension-home-$($env:GITHUB_RUN_ID)-$($env:GITHUB_RUN_ATTEMPT)"',- configure["run"],- )- self.assertIn("$userProfile = [IO.Path]::GetFullPath($env:USERPROFILE)", configure["run"])- self.assertIn(- "$userProfileItem.Attributes -band [IO.FileAttributes]::ReparsePoint", configure["run"]- )- self.assertIn(- "[IO.Path]::GetDirectoryName($extensionHome) -ne $userProfile", configure["run"]- )- self.assertIn(- "if (Test-Path -LiteralPath $extensionHome) { throw 'Windows extension home must be fresh' }",- configure["run"],- )- self.assertIn("New-Item -ItemType Directory -Path $extensionHome", configure["run"])- self.assertIn(- "$extensionHomeItem.Attributes -band [IO.FileAttributes]::ReparsePoint",- configure["run"],- )- self.assertNotIn("LOCALAPPDATA", configure["run"])- self.assertIn(- "$extensionHome = Join-Path $env:RUNNER_TEMP 'cua-perception-extension-home/mock'",- configure["run"],- )- self.assertIn(- '"CUA_PERCEPTION_EXTENSION_HOME=$extensionHome" >> $env:GITHUB_ENV', configure["run"]- )- self.assertIn('"CUA_DRIVER_RS_HOME=$extensionHome" >> $env:GITHUB_ENV', configure["run"])- self.assertIn(- "CUA_E2E_RECORDINGS_ROOT=$(Join-Path $env:RUNNER_TEMP 'cua-perception-recordings')",- configure["run"],- )- self.assertIn(- "CUA_PERCEPTION_EVIDENCE_DIR=$(Join-Path $env:RUNNER_TEMP 'cua-perception-evidence/mock')",- configure["run"],- )- self.assertNotIn("if", configure)- mock = next(step for step in steps if "deterministic mock" in step.get("name", ""))- self.assertLess(steps.index(configure), steps.index(mock))- self.assertEqual(- {item["platform"] for item in self.jobs["candidate"]["strategy"]["matrix"]["include"]},- {"windows", "linux-x11"},- )- self.assertNotRegex(- self.text,- r"CUA_PERCEPTION_EXTENSION_HOME[^\n]*github\.workspace",- )- self.assertNotRegex(- self.text,- r"CUA_E2E_RECORDINGS_ROOT[^\n]*github\.workspace",- )- self.assertNotIn("github.workspace", configure["run"])- self.assertFalse(any("${{ runner." in value for value in candidate_env.values()))-- def test_candidate_linux_desktop_persists_and_is_rechecked_before_demos(self):- steps = self.candidate_steps()- prepare = next(step for step in steps if step.get("name") == "Prepare Linux X11 desktop")- self.assertEqual(prepare["if"], "runner.os == 'Linux'")- self.assertRegex(prepare["run"], r"apt-get install[^\n]*\bx11-utils\b")- self.assertLess(prepare["run"].index("x11-utils"), prepare["run"].index("xdpyinfo"))- for daemon in ("Xvfb", "dbus-daemon", "openbox", "picom"):- self.assertRegex(- prepare["run"],- rf"nohup env -u RUNNER_TRACKING_ID[^\n]*(?:\n[^\n]*)?\b{re.escape(daemon)}\b",- )- self.assertIn("cua-linux-desktop.pids", prepare["run"])- self.assertIn("xprop -root _NET_SUPPORTING_WM_CHECK _NET_CLIENT_LIST", prepare["run"])- self.assertIn("^_NET_SUPPORTING_WM_CHECK(WINDOW): window id # 0x", prepare["run"])- self.assertIn("^_NET_CLIENT_LIST(WINDOW):", prepare["run"])- self.assertIn("dbus-send --session", prepare["run"])- self.assertIn("dump_desktop_state", prepare["run"])- for name in ("xvfb", "dbus", "openbox", "picom"):- self.assertIn(f"$RUNNER_TEMP/{name}.log", prepare["run"])-- verify = next(- step- for step in steps- if step.get("name") == "Verify Linux X11 desktop survived setup steps"- )- mock = next(step for step in steps if "deterministic mock" in step.get("name", ""))- self.assertEqual(verify["if"], "runner.os == 'Linux'")- self.assertLess(steps.index(verify), steps.index(mock))- self.assertIn("kill -0", verify["run"])- self.assertIn("xprop -root _NET_SUPPORTING_WM_CHECK _NET_CLIENT_LIST", verify["run"])- self.assertIn("^_NET_SUPPORTING_WM_CHECK(WINDOW): window id # 0x", verify["run"])- self.assertIn("^_NET_CLIENT_LIST(WINDOW):", verify["run"])- self.assertIn("dbus-send --session", verify["run"])- self.assertIn("dump_desktop_state", verify["run"])-- stop = next(step for step in steps if step.get("name") == "Stop Linux X11 desktop")- cleanup = next(- step- for step in steps- if step.get("name") == "Remove plaintext evidence from the runner"- )- self.assertEqual(stop["if"], "always() && runner.os == 'Linux'")- self.assertLess(steps.index(stop), steps.index(cleanup))- self.assertIn("/proc/$pid/comm", stop["run"])- self.assertIn('kill "$pid"', stop["run"])-- def test_external_chooser_receives_only_the_key_and_windows_system_root(self):- # Product capability for direct local execution: the external chooser- # contract is unchanged, but no Actions workflow step invokes it.- start = self.orchestrator.index("fn external_choice(")- end = self.orchestrator.index("fn choose(", start)- external = self.orchestrator[start:end]- self.assertIn(".env_clear()", external)- self.assertIn('.env("TYPESAFE_API_KEY", required("TYPESAFE_API_KEY"))', external)- self.assertIn('command.env("SYSTEMROOT", system_root)', external)- self.assertEqual(external.count(".env("), 2)- self.assertFalse(any("CUA_JEV_CHOOSER_PROGRAM" in str(step) for step in self.candidate_steps()))-- def test_review_driver_is_consumed_from_hash_bound_aggregate(self):- candidate_text = self.candidate_text()- self.assertIn("review-measurements.json", candidate_text)- self.assertIn('measured["review_driver_sha256"]', candidate_text)- self.assertIn(- 'measured["review_driver_build_profile"] == "debug-review-trust-root"', candidate_text- )- self.assertIn("CUA_TEST_DRIVER_BIN", candidate_text)- self.assertIn("signed-candidate-checksums.txt", candidate_text)- self.assertIn('measured["code_signing"] == {"status": "not-applicable"', candidate_text)- self.assertNotIn("cargo build --manifest-path", candidate_text)- self.assertNotIn("target/release/cua-driver", candidate_text)- self.assertNotIn("RSA-SHA256", self.evidence_readme)- self.assertIn("Ed25519", self.evidence_readme)- self.assertIn("debug review-trust-root", self.evidence_readme)-- def test_no_step_uses_secrets_and_only_measured_binary_runs_demos(self):- candidate_text = self.candidate_text()- self.assertNotIn("TYPESAFE_API_KEY", candidate_text)- self.assertNotIn("${{ secrets.", candidate_text)- self.assertNotIn("LIVE_TYPESAFE_API_KEY", self.text)- self.assertFalse(- any("GH_TOKEN" in str(step.get("env", {})) for step in self.candidate_steps())- )- compile_step = next(- step- for step in self.candidate_steps()- if step.get("name", "").startswith("Compile and measure")- )- self.assertIn("--no-run --message-format=json", compile_step["run"])- self.assertIn('name.endswith(f"::{short_name}")', compile_step["run"])- self.assertIn("assert len(matches) == 1", compile_step["run"])- self.assertIn("re.fullmatch", compile_step["run"])- self.assertIn('resolve("authorized_visual_only_window_demo")', compile_step["run"])- self.assertIn('resolve("authorized_visual_only_primary_desktop_demo")', compile_step["run"])- self.assertIn("CUA_CANDIDATE_WINDOW_TEST={window_test}", compile_step["run"])- self.assertIn("CUA_CANDIDATE_DESKTOP_TEST={desktop_test}", compile_step["run"])- self.assertIn("CUA_CANDIDATE_TEST_BINARY_SHA256", compile_step["run"])- mock = next(- step for step in self.candidate_steps() if "deterministic mock" in step.get("name", "")- )- self.assertIn("& $env:CUA_CANDIDATE_TEST_BINARY --ignored --exact $env:CUA_CANDIDATE_WINDOW_TEST", mock["run"])- self.assertIn("& $env:CUA_CANDIDATE_TEST_BINARY --ignored --exact $env:CUA_CANDIDATE_DESKTOP_TEST", mock["run"])- self.assertLess(- self.candidate_steps().index(compile_step), self.candidate_steps().index(mock)- )-- def test_no_external_chooser_install_remains_and_orchestrator_fails_closed(self):- names = [step.get("name", "") for step in self.candidate_steps()]- self.assertFalse(any("Jev chooser" in name for name in names))- self.assertFalse(any("reviewed chooser" in name for name in names))- self.assertNotIn("CUA_FIXED_CHOOSER", self.text)- self.assertNotIn("CUA_JEV_LIVE", self.text)- self.assertNotIn("jev-use-source", self.text)- self.assertNotIn("Invoke-Expression", self.text)- self.assertNotIn("bash -c", self.candidate_text())- # The product orchestrator still supports a reviewed live chooser for- # direct local execution; Actions never configures it.- self.assertIn("CUA_JEV_LIVE", self.orchestrator)- self.assertIn(- "reviewed chooser program and script paths must be absolute", self.orchestrator- )- self.assertIn("set CUA_JEV_MOCK_DEMO=1 or CUA_JEV_LIVE=1", self.orchestrator)-- def test_mock_has_no_chooser_or_key(self):- mock = next(- step- for step in self.candidate_steps()- if "deterministic mock" in step.get("name", "")- )- self.assertEqual(- mock["env"],- {- "CUA_JEV_MOCK_DEMO": "1",- "CUA_TEST_DRIVER_STDERR": "1",- },- )- self.assertNotIn("CHOOSER", str(mock))- self.assertNotIn("TYPESAFE", str(mock))- self.assertIn("--exact $env:CUA_CANDIDATE_WINDOW_TEST", mock["run"])- self.assertIn("--exact $env:CUA_CANDIDATE_DESKTOP_TEST", mock["run"])-- def test_only_encrypted_schema_validated_evidence_is_uploaded(self):- uploads = [- step for step in self.candidate_steps() if "upload-artifact" in step.get("uses", "")- ]- self.assertEqual(len(uploads), 1)- upload = uploads[0]- self.assertEqual(upload["with"]["path"], "${{ runner.temp }}/encrypted-evidence/")- self.assertIn("mock-jev-visual-", upload["with"]["name"])- self.assertNotIn("live-jev-visual", str(upload))- validate_step = next(- step- for step in self.candidate_steps()- if step.get("name", "").startswith("Fully decode")- )- validate = validate_step["run"]- self.assertIn("ffmpeg -v error -xerror", validate)- self.assertIn("Draft202012Validator(schema).validate(manifest)", validate)- self.assertIn(- 'assert sorted(path.name for path in destination.iterdir()) == ["manifest.json", "recording.mp4"]',- validate,- )- self.assertIn('"window": (evidence, "window", "get_window_state", "background")', validate)- self.assertIn(- '"primary-desktop": (evidence / "primary-desktop", "desktop", "get_desktop_state", "foreground")',- validate,- )- self.assertIn("destination = output / scope", validate)- self.assertIn(- 'assert sorted(path.name for path in output.iterdir()) == ["primary-desktop", "window"]',- validate,- )- self.assertIn(- 'perception["signed_extension_archive_sha256"] == measured["archive_sha256"]', validate- )- self.assertIn('driver = runtime["driver"]', validate)- self.assertIn('observation = manifest["observation"]', validate)- self.assertIn('manifest["environment"] ==', validate)- self.assertIn('perception["models"] == measured["models"]', validate)- self.assertIn('chooser["model_id"]', validate)- self.assertIn('chooser["mode"] == "mock"', validate)- self.assertIn('chooser["provider"] == "fixture"', validate)- self.assertIn('recording_value["frame_rate"]', validate)- self.assertIn('recording_value["edit_operations"]', validate)- encrypt_step = next(- step- for step in self.candidate_steps()- if step.get("name") == "Encrypt the validated evidence bundles"- )- self.assertEqual(- encrypt_step["env"],- {- "CUA_PERCEPTION_EVIDENCE_RECIPIENT": (- "${{ vars.EVIDENCE_ARCHIVE_RECIPIENT_PUBLIC_KEY }}"- )- },- )- self.assertEqual(- sum(- "vars.EVIDENCE_ARCHIVE_RECIPIENT_PUBLIC_KEY" in str(step)- for step in self.candidate_steps()- ),- 1,- )- self.assertNotIn("EVIDENCE_ARCHIVE_KEY", self.text)- self.assertNotIn("private-key", self.text)- self.assertIn("evidence_envelope.py encrypt", encrypt_step["run"])- self.assertIn("--recipient-env CUA_PERCEPTION_EVIDENCE_RECIPIENT", encrypt_step["run"])- self.assertIn("^recipient_public_key_sha256=[0-9a-f]{64}$", encrypt_step["run"])- self.assertIn('Write-Host "$scope $fingerprint"', encrypt_step["run"])- self.assertIn("Remove-Item Env:CUA_PERCEPTION_EVIDENCE_RECIPIENT", encrypt_step["run"])- self.assertIn('== ["primary-desktop.cuae", "window.cuae"]', encrypt_step["run"])- self.assertNotIn("CUA_PERCEPTION_EVIDENCE_RECIPIENT", validate)- steps = self.candidate_steps()- cleanup = next(- step- for step in steps- if step.get("name") == "Remove plaintext evidence from the runner"- )- self.assertLess(steps.index(validate_step), steps.index(encrypt_step))- self.assertLess(steps.index(encrypt_step), steps.index(upload))- self.assertLess(steps.index(upload), steps.index(cleanup))- self.assertEqual(cleanup["if"], "always()")- for directory in (- "cua-perception-recordings",- "cua-perception-evidence",- "perception-evidence",- "publish-evidence",- ):- self.assertIn(f"'{directory}'", cleanup["run"])- self.assertIn(- "-not [string]::IsNullOrWhiteSpace($env:CUA_PERCEPTION_EXTENSION_HOME)", cleanup["run"]- )- self.assertIn(- "$expectedExtensionHome = [IO.Path]::GetFullPath((Join-Path $userProfile $extensionHomeName))",- cleanup["run"],- )- self.assertIn("$extensionHome -ne $expectedExtensionHome", cleanup["run"])- self.assertIn(- "[IO.Path]::GetDirectoryName($extensionHome) -ne $userProfile", cleanup["run"]- )- self.assertIn("try {", cleanup["run"])- self.assertIn("} finally {", cleanup["run"])- self.assertLess(cleanup["run"].index("try {"), cleanup["run"].index("} finally {"))- self.assertLess(- cleanup["run"].index("} finally {"),- cleanup["run"].index("$runnerTemp = [IO.Path]::GetFullPath"),- )- self.assertIn(- "$extensionHomeItem.Attributes -band [IO.FileAttributes]::ReparsePoint", cleanup["run"]- )- self.assertIn("Remove-Item -LiteralPath $expectedExtensionHome -Force", cleanup["run"])- self.assertIn(- "Remove-Item -LiteralPath $expectedExtensionHome -Recurse -Force", cleanup["run"]- )- reparse = cleanup["run"].index(- "$extensionHomeItem.Attributes -band [IO.FileAttributes]::ReparsePoint"- )- unlink = cleanup["run"].index("Remove-Item -LiteralPath $expectedExtensionHome -Force")- recursive = cleanup["run"].index(- "Remove-Item -LiteralPath $expectedExtensionHome -Recurse -Force"- )- self.assertLess(reparse, unlink)- self.assertLess(unlink, recursive)- self.assertNotIn("Remove-Item -Path $env:CUA_PERCEPTION_EXTENSION_HOME", cleanup["run"])- self.assertNotIn("@'", cleanup["run"])- self.assertNotIn("python - $env:RUNNER_TEMP", cleanup["run"])- self.assertIn("$runnerTemp = [IO.Path]::GetFullPath($env:RUNNER_TEMP)", cleanup["run"])- self.assertIn(- "$runnerTempItem.Attributes -band [IO.FileAttributes]::ReparsePoint", cleanup["run"]- )- self.assertIn("[IO.Path]::GetDirectoryName($target) -ne $runnerTemp", cleanup["run"])- self.assertIn("Remove-Item -LiteralPath $target -Force", cleanup["run"])- self.assertIn("Remove-Item -LiteralPath $target -Recurse -Force", cleanup["run"])- self.assertNotIn("publish-evidence", str(upload))- self.assertNotIn("manifest.json", str(upload))- self.assertNotIn("recording.mp4", str(upload))- self.assertNotIn("raw-manifest.json", str(upload))- self.assertNotIn("timeline.json", str(upload))-- def test_all_actions_are_full_sha_pinned(self):- uses = re.findall(r"^\s*-?\s*uses:\s*([^\s#]+)", self.text, re.MULTILINE)- self.assertTrue(uses)- for action in uses:- self.assertRegex(action, r"^[^@]+@[0-9a-f]{40}$")---if __name__ == "__main__":- unittest.main()diff --git a/.github/scripts/tests/test_ci_cua_workspace_tests.py b/.github/scripts/tests/test_ci_cua_workspace_tests.pyindex 2a89f06f85..42f42a84ca 100644--- a/.github/scripts/tests/test_ci_cua_workspace_tests.py+++ b/.github/scripts/tests/test_ci_cua_workspace_tests.py@@ -33,6 +33,7 @@ ELSEWHERE = {"cua-host": "launchd service tests; run by bin/ci on macOS, not yet checked on Linux","cua-ci": "experiment (`cua ci`); no CI lane yet","cua-replica-lab": "chaos rig, not shipped; run by hand",+ "cua-chaos": "chaos tooling, not shipped; its only lane (chaos-cua-compat.yml) was removed with the dead compat lanes (CUA-3571); run by hand with `cargo test -p cua-chaos`",}diff --git a/.github/scripts/tests/test_ci_gate_workflow.py b/.github/scripts/tests/test_ci_gate_workflow.pyindex f6bcf792c4..f774032264 100644--- a/.github/scripts/tests/test_ci_gate_workflow.py+++ b/.github/scripts/tests/test_ci_gate_workflow.py@@ -17,7 +17,6 @@ SCRIPT = STEPS['Wait for every other workflow on the pull request head']['run']@pytest.mark.parametrize('filename', ['ci-contributor-attribution.yml','ci-release-metadata.yml',- 'fleet-mirror-guard.yml',])def test_required_workflow_queue_wiring(filename):workflow = yaml.safe_load((WORKFLOWS / filename).read_text())diff --git a/.github/scripts/tests/test_cua_perception_pr_review_trigger.py b/.github/scripts/tests/test_cua_perception_pr_review_trigger.pyindex ad2d8ee2d9..d0c0a7c0ce 100644--- a/.github/scripts/tests/test_cua_perception_pr_review_trigger.py+++ b/.github/scripts/tests/test_cua_perception_pr_review_trigger.py@@ -9,7 +9,6 @@ import yamlROOT = Path(__file__).resolve().parents[3]TRIGGER = ROOT / ".github/workflows/review-cua-perception-candidates.yml"CANDIDATE = ROOT / ".github/workflows/cd-cua-perception-review-supplied-inputs.yml"-LIVE = ROOT / ".github/workflows/authorized-live-jev-use-demo.yml"MACOS_ENTRY = ROOT / ".github/workflows/e2e-rust-macos.yml"@@ -135,36 +134,6 @@ def test_pr_review_produces_candidates_without_entering_the_protected_environmenassert not re.findall(r"^\s*environment:", trigger_text, re.MULTILINE)-def test_protected_candidate_workflow_is_secret_free_and_keeps_environment() -> None:- live_text, live_workflow = load_workflow(LIVE)- live_job = live_workflow["jobs"]["candidate"]- assert live_job["environment"] == "authorized-live-jev-use-demo"- assert "TYPESAFE_API_KEY" not in live_text- assert "LIVE_TYPESAFE_API_KEY" not in live_text- assert "${{ secrets." not in live_text- assert "run_live" not in live_text- assert "CUA_JEV_LIVE" not in live_text- secret_steps = [step for step in live_job["steps"] if "${{ secrets." in str(step)]- assert secret_steps == []- assert "TYPESAFE_API_KEY" not in "\n".join(- str(job) for name, job in live_workflow["jobs"].items() if name != "candidate"- )- evidence_step = next(- step- for step in live_job["steps"]- if "CUA_PERCEPTION_EVIDENCE_RECIPIENT" in step.get("env", {})- )- assert evidence_step["env"] == {- "CUA_PERCEPTION_EVIDENCE_RECIPIENT": ("${{ vars.EVIDENCE_ARCHIVE_RECIPIENT_PUBLIC_KEY }}"),- }- assert "EVIDENCE_ARCHIVE_KEY" not in live_text- validation = next(- step["run"] for step in live_job["steps"] if step.get("name", "").startswith("Fully decode")- )- assert 'chooser["mode"] == "mock"' in validation- assert 'chooser["provider"] == "fixture"' in validation--def test_macos_direct_lume_registration_is_manual_and_not_pr_event_chained() -> None:_, workflow = load_workflow(TRIGGER)assert "macos" not in workflow["jobs"]diff --git a/.github/scripts/tests/test_cua_perception_release_topology.py b/.github/scripts/tests/test_cua_perception_release_topology.pyindex d688fef899..c02006aeff 100644--- a/.github/scripts/tests/test_cua_perception_release_topology.py+++ b/.github/scripts/tests/test_cua_perception_release_topology.py@@ -928,9 +928,8 @@ def test_release_stream_is_candidate_only_and_driver_remains_excluded() -> None:def test_workflows_are_valid_and_candidate_workflow_cannot_publish() -> None:candidate_path = ROOT / ".github/workflows/cd-cua-perception-candidate.yml"- manual_path = ROOT / ".github/workflows/cd-cua-perception-candidate-manual.yml"ci_path = ROOT / ".github/workflows/ci-cua-perception-release.yml"- for path in (candidate_path, manual_path, ci_path):+ for path in (candidate_path, ci_path):assert isinstance(yaml.safe_load(path.read_text()), dict)candidate = candidate_path.read_text()assert "actions/upload-artifact" in candidate and "actions/download-artifact" in candidate@@ -945,16 +944,10 @@ def test_workflows_are_valid_and_candidate_workflow_cannot_publish() -> None:assert "refs/cua-reviewed/source" in candidateassert "macos:aarch64-apple-darwin" in candidateassert "macos-15-intel" not in candidate- assert "refs/pull/3943/head" not in manual_path.read_text()parsed = yaml.safe_load(candidate)assert "PRIVATE_KEY_BASE64" not in json.dumps(parsed["jobs"]["package"])assert "PRIVATE_KEY_BASE64" in json.dumps(parsed["jobs"]["sign"])assert parsed["jobs"]["sign"]["environment"] == "cua-perception-candidate-signing"- manual = manual_path.read_text()- for value in ("x86_64-unknown-linux-gnu", "aarch64-apple-darwin", "x86_64-pc-windows-msvc"):- assert value in manual- assert "cua-perception-input-macos-aarch64" in manual- assert "x86_64-apple-darwin" not in manualdef test_trust_root_and_rfc8032_vector_match_extension_manager_contract() -> None:diff --git a/.github/workflows/README.md b/.github/workflows/README.mdindex ea289814f3..477f95627f 100644--- a/.github/workflows/README.md+++ b/.github/workflows/README.md@@ -35,7 +35,7 @@ build on main pushes, manual runs and `ci:full` pull requests.## Required checks-Staging has no required status checks. trycua/cua requires `fleet-mirror-guard`,+Staging has no required status checks. trycua/cua requires `ci-gate`,`contributor-attribution` and `validate`; none of those are renamed or removedhere. `contributor-attribution` is informational: it always passes and reportsunresolved attribution as a warning. A workflow skipped by `paths:` never reports, so do not add a path-gateddiff --git a/.github/workflows/authorized-live-jev-use-demo.yml b/.github/workflows/authorized-live-jev-use-demo.ymldeleted file mode 100644index 3002f83a92..0000000000--- a/.github/workflows/authorized-live-jev-use-demo.yml+++ /dev/null@@ -1,708 +0,0 @@-name: "Authorized: candidate Jev visual demo"--on:- workflow_dispatch:- inputs:- source_pr_number:- description: "Pull request number under live review; must be open with the fixed cua-perception-live-review label"- required: true- type: string- source_sha:- description: "Exact reviewed head SHA of source_pr_number"- required: true- type: string- jev_pr_number:- description: "Merged pull request number supplying the canonical Jev chooser recipe"- required: true- type: string- jev_source_sha:- description: "Exact canonical merge commit SHA of jev_pr_number"- required: true- type: string- signed_candidate_artifact_id:- description: "Immutable Actions artifact ID containing signed Windows and Linux review candidates"- required: true- type: string- signed_candidate_run_id:- description: "Producer Actions run ID containing the signed review candidates"- required: true- type: string- windows_e2e_run_id:- description: "Actions run ID of an independent, already-completed canonical e2e-rust-windows.yml run at source_sha"- required: true- type: string- linux_e2e_run_id:- description: "Actions run ID of an independent, already-completed canonical e2e-rust-linux.yml run at source_sha"- required: true- type: string- workflow_call:- inputs:- source_pr_number:- description: "Pull request number under live review; must be open with the fixed cua-perception-live-review label"- required: true- type: string- source_sha:- description: "Exact reviewed head SHA of source_pr_number"- required: true- type: string- jev_pr_number:- description: "Merged pull request number supplying the canonical Jev chooser recipe"- required: true- type: string- jev_source_sha:- description: "Exact canonical merge commit SHA of jev_pr_number"- required: true- type: string- signed_candidate_artifact_id:- description: "Immutable Actions artifact ID containing signed Windows and Linux review candidates"- required: true- type: string- signed_candidate_run_id:- description: "Producer Actions run ID containing the signed review candidates"- required: true- type: string- windows_e2e_run_id:- description: "Actions run ID of an independent, already-completed canonical e2e-rust-windows.yml run at source_sha"- required: true- type: string- linux_e2e_run_id:- description: "Actions run ID of an independent, already-completed canonical e2e-rust-linux.yml run at source_sha"- required: true- type: string--permissions:- actions: read- contents: read- pull-requests: read--concurrency:- group: authorized-live-jev-demo-${{ inputs.source_sha }}-${{ inputs.jev_source_sha }}- cancel-in-progress: false--env:- CARGO_NET_RETRY: "10"- CARGO_HTTP_TIMEOUT: "120"- CARGO_HTTP_MULTIPLEXING: "false"- # Cua programs and packages run here never send usage telemetry.- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--jobs:- source:- name: Resolve reviewed candidates and signed artifact- runs-on: ubuntu-latest- outputs:- sha: ${{ steps.validate.outputs.sha }}- jev_sha: ${{ steps.validate.outputs.jev_sha }}- candidate_run_id: ${{ steps.validate.outputs.candidate_run_id }}- steps:- - id: validate- name: Require exact current PR heads and candidate artifact- shell: bash- env:- GH_TOKEN: ${{ github.token }}- SOURCE_PR_NUMBER: ${{ inputs.source_pr_number }}- REQUESTED_SHA: ${{ inputs.source_sha }}- JEV_PR_NUMBER: ${{ inputs.jev_pr_number }}- REQUESTED_JEV_SHA: ${{ inputs.jev_source_sha }}- CANDIDATE_ARTIFACT_ID: ${{ inputs.signed_candidate_artifact_id }}- CANDIDATE_RUN_ID: ${{ inputs.signed_candidate_run_id }}- WINDOWS_E2E_RUN_ID: ${{ inputs.windows_e2e_run_id }}- LINUX_E2E_RUN_ID: ${{ inputs.linux_e2e_run_id }}- EVENT_ACTION: ${{ github.event.action }}- EVENT_HEAD_REPOSITORY: ${{ github.event.pull_request.head.repo.full_name }}- EVENT_HEAD_SHA: ${{ github.event.pull_request.head.sha }}- EVENT_LABEL: ${{ github.event.label.name }}- EVENT_PR_NUMBER: ${{ github.event.pull_request.number }}- run: |- set -euo pipefail- [[ "$GITHUB_REPOSITORY" == "trycua/cua" ]] || { echo "candidate demo runs only in trycua/cua" >&2; exit 2; }- [[ "$SOURCE_PR_NUMBER" =~ ^[1-9][0-9]*$ ]] || { echo "source_pr_number must be numeric" >&2; exit 2; }- [[ "$REQUESTED_SHA" =~ ^[0-9a-f]{40}$ ]] || { echo "source_sha must be exactly 40 lowercase hexadecimal characters" >&2; exit 2; }- [[ "$JEV_PR_NUMBER" =~ ^[1-9][0-9]*$ ]] || { echo "jev_pr_number must be numeric" >&2; exit 2; }- [[ "$REQUESTED_JEV_SHA" =~ ^[0-9a-f]{40}$ ]] || { echo "jev_source_sha must be exactly 40 lowercase hexadecimal characters" >&2; exit 2; }- [[ "$CANDIDATE_ARTIFACT_ID" =~ ^[1-9][0-9]*$ ]] || { echo "signed_candidate_artifact_id must be numeric" >&2; exit 2; }- [[ "$CANDIDATE_RUN_ID" =~ ^[1-9][0-9]*$ ]] || { echo "signed_candidate_run_id must be numeric" >&2; exit 2; }- [[ "$WINDOWS_E2E_RUN_ID" =~ ^[1-9][0-9]*$ ]] || { echo "windows_e2e_run_id must be numeric" >&2; exit 2; }- [[ "$LINUX_E2E_RUN_ID" =~ ^[1-9][0-9]*$ ]] || { echo "linux_e2e_run_id must be numeric" >&2; exit 2; }- validate_pr_head() {- local number="$1" requested="$2" label="$3" state head_sha head_repo- IFS=$'\t' read -r state head_sha head_repo < <(- gh api "repos/$GITHUB_REPOSITORY/pulls/$number" \- --jq '[.state, .head.sha, .head.repo.full_name] | @tsv'- )- [[ "$state" == open && "$head_repo" == "$GITHUB_REPOSITORY" ]] || {- echo "PR $number must be open with a head in $GITHUB_REPOSITORY" >&2; exit 2;- }- [[ "$requested" == "$head_sha" ]] || {- echo "$label is not the exact current reviewed head of PR $number" >&2; exit 2;- }- }- validate_merged_pr() {- local number="$1" requested="$2" label="$3" state merged head_repo merge_sha- IFS=$'\t' read -r state merged head_repo merge_sha < <(- gh api "repos/$GITHUB_REPOSITORY/pulls/$number" \- --jq '[.state, .merged, .head.repo.full_name, .merge_commit_sha] | @tsv'- )- [[ "$state" == closed && "$merged" == true && "$head_repo" == "$GITHUB_REPOSITORY" ]] || {- echo "PR $number must be merged and closed with a head in $GITHUB_REPOSITORY" >&2; exit 2;- }- [[ -n "$merge_sha" && "$requested" == "$merge_sha" ]] || {- echo "$label is not the exact canonical merge commit of PR $number" >&2; exit 2;- }- }- validate_e2e_run() {- local run_id="$1" expected_path="$2" expected_artifact="$3" expected_platform="$4" label="$5" run_json repo path event head_sha status conclusion artifacts_json artifact_id cert_dir cert_json- run_json="$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$run_id")"- repo="$(jq -r .repository.full_name <<<"$run_json")"- path="$(jq -r .path <<<"$run_json")"- event="$(jq -r .event <<<"$run_json")"- head_sha="$(jq -r .head_sha <<<"$run_json")"- status="$(jq -r .status <<<"$run_json")"- conclusion="$(jq -r .conclusion <<<"$run_json")"- [[ "$repo" == "$GITHUB_REPOSITORY" ]] || { echo "$label run is not in $GITHUB_REPOSITORY" >&2; exit 2; }- [[ "$path" == "$expected_path" ]] || { echo "$label run is not the canonical $expected_path workflow" >&2; exit 2; }- [[ "$event" == workflow_dispatch ]] || { echo "$label run is not a trusted workflow_dispatch run" >&2; exit 2; }- [[ "$head_sha" == "$REQUESTED_SHA" ]] || { echo "$label run head_sha does not match source_sha" >&2; exit 2; }- [[ "$status" == completed && "$conclusion" == success ]] || { echo "$label run did not complete successfully" >&2; exit 2; }- artifacts_json="$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$run_id/artifacts?per_page=100")"- jq -e --arg name "$expected_artifact" \- '.artifacts[]? | select(.name == $name and (.expired | not))' <<<"$artifacts_json" >/dev/null || {- echo "$label run is missing the $expected_artifact certification artifact" >&2; exit 2;- }- artifact_id="$(jq -r --arg name "$expected_artifact" '.artifacts[] | select(.name == $name and (.expired | not)) | .id' <<<"$artifacts_json")"- [[ "$artifact_id" =~ ^[1-9][0-9]*$ ]] || { echo "$label certification artifact ID is invalid" >&2; exit 2; }- cert_dir="$(mktemp -d)"- gh api "repos/$GITHUB_REPOSITORY/actions/artifacts/$artifact_id/zip" > "$cert_dir/certification.zip"- unzip -q "$cert_dir/certification.zip" -d "$cert_dir/unpacked"- [[ -f "$cert_dir/unpacked/certification.json" ]] || { echo "$label certification.json is missing" >&2; exit 2; }- cert_json="$(cat "$cert_dir/unpacked/certification.json")"- [[ "$(jq -r .schema <<<"$cert_json")" == "cua-driver/e2e-certification/v1" ]]- [[ "$(jq -r .repository <<<"$cert_json")" == "$GITHUB_REPOSITORY" ]]- [[ "$(jq -r .run_id <<<"$cert_json")" == "$run_id" ]]- [[ "$(jq -r .event_name <<<"$cert_json")" == workflow_dispatch ]]- [[ "$(jq -r .platform <<<"$cert_json")" == "$expected_platform" ]]- [[ "$(jq -r .lane <<<"$cert_json")" == all ]]- [[ "$(jq -r .canonical <<<"$cert_json")" == true ]]- [[ "$(jq -r .source_sha <<<"$cert_json")" == "$REQUESTED_SHA" ]]- [[ "$(jq -r '.required_jobs | all(.[]; . == "success")' <<<"$cert_json")" == true ]]- if [[ "$expected_platform" == windows ]]; then- [[ "$(jq -r .runner_policy_class <<<"$cert_json")" == github-hosted ]]- fi- }- validate_pr_head "$SOURCE_PR_NUMBER" "$REQUESTED_SHA" source_sha- validate_merged_pr "$JEV_PR_NUMBER" "$REQUESTED_JEV_SHA" jev_source_sha- validate_e2e_run "$WINDOWS_E2E_RUN_ID" ".github/workflows/e2e-rust-windows.yml" rust-windows-e2e-certification windows windows_e2e_run_id- validate_e2e_run "$LINUX_E2E_RUN_ID" ".github/workflows/e2e-rust-linux.yml" rust-linux-e2e-certification linux linux_e2e_run_id- artifact_json="$(gh api "repos/$GITHUB_REPOSITORY/actions/artifacts/$CANDIDATE_ARTIFACT_ID")"- [[ "$(jq -r .name <<<"$artifact_json")" == "STAGING-cua-perception-review-candidates-$REQUESTED_SHA" ]] || { echo "candidate artifact has the wrong aggregate name" >&2; exit 2; }- [[ "$(jq -r .expired <<<"$artifact_json")" == false ]] || { echo "candidate artifact is expired" >&2; exit 2; }- [[ "$(jq -r .workflow_run.head_sha <<<"$artifact_json")" == "$REQUESTED_SHA" ]] || {- echo "candidate artifact was not produced from source_sha" >&2; exit 2;- }- run_id="$(jq -r .workflow_run.id <<<"$artifact_json")"- [[ "$run_id" == "$CANDIDATE_RUN_ID" ]] || { echo "candidate artifact does not belong to signed_candidate_run_id" >&2; exit 2; }- run_json="$(gh api "repos/$GITHUB_REPOSITORY/actions/runs/$run_id")"- [[ "$(jq -r .head_sha <<<"$run_json")" == "$REQUESTED_SHA" ]] || {- echo "candidate artifact workflow run is not bound to source_sha" >&2; exit 2;- }- [[ "$(jq -r .path <<<"$run_json")" == ".github/workflows/review-cua-perception-candidates.yml" ]] || { echo "candidate artifact was not produced by the PR review workflow" >&2; exit 2; }- [[ "$(jq -r .event <<<"$run_json")" == pull_request ]] || { echo "candidate artifact producer was not a pull-request review run" >&2; exit 2; }- if [[ "$GITHUB_EVENT_NAME" == pull_request ]]; then- [[ "$EVENT_ACTION" == labeled && "$EVENT_PR_NUMBER" == "$SOURCE_PR_NUMBER" ]] || { echo "same-run use requires the labeled source_pr_number caller" >&2; exit 2; }- [[ "$EVENT_HEAD_REPOSITORY" == "$GITHUB_REPOSITORY" && "$EVENT_HEAD_SHA" == "$REQUESTED_SHA" ]] || { echo "same-run caller is not the exact same-repository source head" >&2; exit 2; }- [[ "$EVENT_LABEL" == cua-perception-live-review && "$run_id" == "$GITHUB_RUN_ID" ]] || { echo "same-run caller lacks the exact review label or run ID" >&2; exit 2; }- [[ "$(jq -r .status <<<"$run_json")" == in_progress && "$(jq -r .conclusion <<<"$run_json")" == null ]] || { echo "same-run candidate artifact is not from the active review run" >&2; exit 2; }- else- [[ "$GITHUB_EVENT_NAME" == workflow_dispatch ]] || { echo "unsupported candidate demo invocation" >&2; exit 2; }- [[ "$(jq -r .status <<<"$run_json")" == completed && "$(jq -r .conclusion <<<"$run_json")" == success ]] || { echo "candidate artifact workflow run did not complete successfully" >&2; exit 2; }- fi- echo "sha=$REQUESTED_SHA" >> "$GITHUB_OUTPUT"- echo "jev_sha=$REQUESTED_JEV_SHA" >> "$GITHUB_OUTPUT"- echo "candidate_run_id=$CANDIDATE_RUN_ID" >> "$GITHUB_OUTPUT"-- mock-preflight:- name: Secret-free mock and static contracts- needs: source- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- with:- ref: ${{ needs.source.outputs.sha }}- persist-credentials: false- - uses: dtolnay/rust-toolchain@4716b85f2fac3e324e64fa2810f6b5c3905760a5 # 1.97.1- - name: Install visual fixture and native Rust dependencies- run: |- sudo apt-get update- sudo apt-get install -y --no-install-recommends \- python3-tk clang pkg-config libdbus-1-dev libpipewire-0.3-dev \- libspa-0.2-dev libei-dev libxkbcommon-dev libx11-dev libxi-dev \- libxtst-dev libxext-dev libwebkit2gtk-4.1-dev libssl-dev libxdo-dev \- libayatana-appindicator3-dev librsvg2-dev- - name: Verify exact checkout- shell: bash- env:- EXPECTED_SHA: ${{ needs.source.outputs.sha }}- run: test "$(git rev-parse HEAD)" = "$EXPECTED_SHA"- - name: Run fixture, evidence, workflow, and mock-choice contracts- env:- CUA_JEV_MOCK_DEMO: "1"- run: |- python -m pip install --require-hashes -r .github/releases/cua-perception/test-requirements.lock- python libs/cua-driver/tests/fixtures/apps/cross-platform/visual-only-canvas/test_fixture.py -v- python libs/cua-driver/tests/perception-demo/test_sanitize_evidence.py -v- python libs/cua-driver/tests/perception-demo/test_evidence_envelope.py -v- python .github/scripts/tests/test_authorized_live_jev_use_demo.py -v- cargo test --manifest-path libs/cua-driver/rust/Cargo.toml -p cua-driver-e2e --test authorized_live_jev_use_demo_test --locked- cargo test --manifest-path libs/cua-driver/rust/Cargo.toml -p cua-perception --locked-- candidate:- name: Candidate mock Jev (${{ matrix.platform }})- needs: [source, mock-preflight]- strategy:- fail-fast: false- matrix:- include:- - {platform: windows, runner: windows-latest, target: x86_64-pc-windows-msvc, driver: review-cua-driver.exe, desktop_session: windows-interactive}- - {platform: linux-x11, runner: ubuntu-latest, target: x86_64-unknown-linux-gnu, driver: review-cua-driver, desktop_session: x11-openbox}- runs-on: ${{ matrix.runner }}- timeout-minutes: 60- environment: authorized-live-jev-use-demo- env:- CUA_E2E_SOURCE_SHA: ${{ needs.source.outputs.sha }}- CUA_JEV_SOURCE_SHA: ${{ needs.source.outputs.jev_sha }}- CUA_E2E_UNRESTRICTED_GUI: "1"- CUA_SESSION_LABEL: authorized-jev-choice-demo-${{ matrix.platform }}- CUA_DESKTOP_SESSION_TYPE: ${{ matrix.desktop_session }}- CUA_RUNNER_IDENTITY_CLASS: github-hosted- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- with:- ref: ${{ needs.source.outputs.sha }}- persist-credentials: false- - name: Configure temporary evidence paths- shell: pwsh- run: |- $ErrorActionPreference = 'Stop'- if ($IsWindows) {- if ([string]::IsNullOrWhiteSpace($env:USERPROFILE)) { throw 'USERPROFILE is required for the Windows extension home' }- if ($env:GITHUB_RUN_ID -notmatch '^[1-9][0-9]*$' -or $env:GITHUB_RUN_ATTEMPT -notmatch '^[1-9][0-9]*$') { throw 'GitHub run identity is invalid' }- $extensionHomeName = "cua-perception-extension-home-$($env:GITHUB_RUN_ID)-$($env:GITHUB_RUN_ATTEMPT)"- $userProfile = [IO.Path]::GetFullPath($env:USERPROFILE)- $userProfileItem = Get-Item -LiteralPath $userProfile -Force- if (-not $userProfileItem.PSIsContainer -or $userProfileItem.Attributes -band [IO.FileAttributes]::ReparsePoint) { throw 'Windows user profile must be a real directory' }- $extensionHome = [IO.Path]::GetFullPath((Join-Path $userProfile $extensionHomeName))- if ([IO.Path]::GetDirectoryName($extensionHome) -ne $userProfile -or [IO.Path]::GetFileName($extensionHome) -ne $extensionHomeName) { throw 'Windows extension home is not the expected USERPROFILE child' }- if (Test-Path -LiteralPath $extensionHome) { throw 'Windows extension home must be fresh' }- New-Item -ItemType Directory -Path $extensionHome | Out-Null- $extensionHomeItem = Get-Item -LiteralPath $extensionHome -Force- if (-not $extensionHomeItem.PSIsContainer -or $extensionHomeItem.Attributes -band [IO.FileAttributes]::ReparsePoint) { throw 'Windows extension home must be a real directory' }- } else {- $extensionHome = Join-Path $env:RUNNER_TEMP 'cua-perception-extension-home/mock'- }- "CUA_PERCEPTION_EXTENSION_HOME=$extensionHome" >> $env:GITHUB_ENV- "CUA_DRIVER_RS_HOME=$extensionHome" >> $env:GITHUB_ENV- "CUA_E2E_RECORDINGS_ROOT=$(Join-Path $env:RUNNER_TEMP 'cua-perception-recordings')" >> $env:GITHUB_ENV- "CUA_PERCEPTION_EVIDENCE_DIR=$(Join-Path $env:RUNNER_TEMP 'cua-perception-evidence/mock')" >> $env:GITHUB_ENV- - uses: dtolnay/rust-toolchain@4716b85f2fac3e324e64fa2810f6b5c3905760a5 # 1.97.1- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.12"- - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6- with:- version: "0.8.15"- - name: Download immutable signed candidate- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0- with:- artifact-ids: ${{ inputs.signed_candidate_artifact_id }}- run-id: ${{ needs.source.outputs.candidate_run_id }}- path: ${{ runner.temp }}/perception-candidate- github-token: ${{ github.token }}- merge-multiple: true- - name: Prepare Windows recording support- if: runner.os == 'Windows'- shell: pwsh- run: .\scripts\ci\windows\setup-ffmpeg.ps1- - name: Prepare Linux X11 desktop- if: runner.os == 'Linux'- shell: bash- run: |- set -euo pipefail- sudo apt-get update- sudo apt-get install -y --no-install-recommends xvfb x11-utils dbus-x11 at-spi2-core openbox picom python3-gi gir1.2-gtk-3.0 libgtk-3-dev clang pkg-config libdbus-1-dev libpipewire-0.3-dev libspa-0.2-dev libei-dev libx11-dev libxi-dev libxtst-dev libxext-dev libwebkit2gtk-4.1-dev libssl-dev libxdo-dev libayatana-appindicator3-dev librsvg2-dev ffmpeg jq- xvfb_pid="" dbus_pid="" openbox_pid="" picom_pid=""- dump_desktop_state() {- echo "Linux X11 desktop failed to become ready" >&2- for entry in "xvfb:$xvfb_pid" "dbus:$dbus_pid" "openbox:$openbox_pid" "picom:$picom_pid"; do- name="${entry%%:*}"; pid="${entry#*:}"- if [[ -n "$pid" ]]; then- echo "--- $name process ($pid) ---" >&2- ps -o pid=,ppid=,sid=,stat=,comm=,args= -p "$pid" >&2 || true- fi- echo "--- $name log ---" >&2- sed -n '1,200p' "$RUNNER_TEMP/$name.log" >&2 2>/dev/null || true- done- DISPLAY=:99 xprop -root _NET_SUPPORTED _NET_SUPPORTING_WM_CHECK _NET_CLIENT_LIST >&2 2>&1 || true- }- ewmh_ready() {- local state- state="$(DISPLAY=:99 xprop -root _NET_SUPPORTING_WM_CHECK _NET_CLIENT_LIST 2>/dev/null)" || return 1- grep -q '^_NET_SUPPORTING_WM_CHECK(WINDOW): window id # 0x' <<< "$state" &&- grep -q '^_NET_CLIENT_LIST(WINDOW):' <<< "$state"- }- handle_desktop_failure() {- local status=$?- dump_desktop_state- exit "$status"- }- trap handle_desktop_failure ERR-- pid_file="$RUNNER_TEMP/cua-linux-desktop.pids"- : > "$pid_file"- nohup env -u RUNNER_TRACKING_ID setsid Xvfb :99 -screen 0 1920x1080x24 -nolisten tcp \- >"$RUNNER_TEMP/xvfb.log" 2>&1 </dev/null &- xvfb_pid=$!- echo "xvfb=$xvfb_pid" >> "$pid_file"- for _ in {1..50}; do- kill -0 "$xvfb_pid" 2>/dev/null- if DISPLAY=:99 xdpyinfo >/dev/null 2>&1; then break; fi- sleep 0.2- done- DISPLAY=:99 xdpyinfo >/dev/null-- nohup env -u RUNNER_TRACKING_ID setsid dbus-daemon --session --nofork --print-address=1 \- >"$RUNNER_TEMP/dbus.log" 2>&1 </dev/null &- dbus_pid=$!- echo "dbus=$dbus_pid" >> "$pid_file"- dbus_address=""- for _ in {1..50}; do- kill -0 "$dbus_pid" 2>/dev/null- dbus_address="$(sed -n '1p' "$RUNNER_TEMP/dbus.log")"- if [[ "$dbus_address" == unix:* ]]; then break; fi- sleep 0.2- done- [[ "$dbus_address" == unix:* ]]-- nohup env -u RUNNER_TRACKING_ID DISPLAY=:99 DBUS_SESSION_BUS_ADDRESS="$dbus_address" \- setsid openbox >"$RUNNER_TEMP/openbox.log" 2>&1 </dev/null &- openbox_pid=$!- echo "openbox=$openbox_pid" >> "$pid_file"- nohup env -u RUNNER_TRACKING_ID DISPLAY=:99 DBUS_SESSION_BUS_ADDRESS="$dbus_address" \- setsid picom --backend xrender --config /dev/null >"$RUNNER_TEMP/picom.log" 2>&1 </dev/null &- picom_pid=$!- echo "picom=$picom_pid" >> "$pid_file"- for _ in {1..50}; do- kill -0 "$openbox_pid" 2>/dev/null- kill -0 "$picom_pid" 2>/dev/null- if ewmh_ready; then break; fi- sleep 0.2- done- ewmh_ready- DBUS_SESSION_BUS_ADDRESS="$dbus_address" dbus-send --session --dest=org.freedesktop.DBus \- --type=method_call --print-reply / org.freedesktop.DBus.ListNames >/dev/null- echo "DISPLAY=:99" >> "$GITHUB_ENV"- echo "DBUS_SESSION_BUS_ADDRESS=$dbus_address" >> "$GITHUB_ENV"- trap - ERR- - name: Resolve the measured review Driver and verify the signed candidate- shell: pwsh- env:- PLATFORM: ${{ matrix.platform }}- EXPECTED_TARGET: ${{ matrix.target }}- EXPECTED_DRIVER: ${{ matrix.driver }}- EXPECTED_SHA: ${{ needs.source.outputs.sha }}- run: |- $ErrorActionPreference = 'Stop'- if ((git rev-parse HEAD).Trim() -ne $env:EXPECTED_SHA) { throw 'checkout does not match source_sha' }- $candidate = Join-Path $env:RUNNER_TEMP "perception-candidate/$($env:PLATFORM)"- $catalog = Join-Path $candidate 'signed-catalog.json'- $measurements = Join-Path $candidate 'review-measurements.json'- @'- import base64, hashlib, json, os, pathlib, sys- root, measurements_path, env_path = map(pathlib.Path, sys.argv[1:4]); expected_sha, expected_target, expected_driver = sys.argv[4:]- measured = json.loads(measurements_path.read_text()); assert measured["review_only"] is True and measured["source_sha"] == expected_sha and measured["target"] == expected_target- assert measured["review_driver_build_profile"] == "debug-review-trust-root" and measured["review_driver_relative_path"] == expected_driver- assert measured["review_driver_version"] and measured["extension_version"] and measured["protocol_version"] > 0- assert measured["self_test"]["status"] == "passed" and measured["self_test"]["mismatch_rejection"] is True- assert [item["role"] for item in measured["models"]] == ["icon-detect", "ocr-detect", "ocr-recognize"]- assert measured["onnx_runtime"]["revision"] and len(measured["onnx_runtime"]["sha256"]) == 64- assert measured["key_id"] == "review-only-build-override" and measured["publisher_id"] == "cua-review-only" and measured["signature_algorithm"] == "ed25519"- assert measured["code_signing"] == {"status": "not-applicable", "format": "none", "identity": "none", "certificate_sha256": None, "designated_requirement": None}- public_key = base64.b64decode(measured["public_key_base64"], validate=True); assert len(public_key) == 32 and hashlib.sha256(public_key).hexdigest() == measured["public_key_sha256"]- driver = (root / expected_driver).resolve(); driver.relative_to(root.resolve()); assert driver.is_file() and hashlib.sha256(driver.read_bytes()).hexdigest() == measured["review_driver_sha256"]- catalog = (root / "signed-catalog.json").resolve(); assert catalog.is_file() and hashlib.sha256(catalog.read_bytes()).hexdigest() == measured["catalog_sha256"]- catalog_value = json.loads(catalog.read_text()); payload = catalog_value["payload"]; archive_relative = pathlib.PurePosixPath(payload["archive"]); assert not archive_relative.is_absolute() and ".." not in archive_relative.parts- archive = root.joinpath(*archive_relative.parts).resolve(); archive.relative_to(root.resolve()); assert archive.is_file() and hashlib.sha256(archive.read_bytes()).hexdigest() == measured["archive_sha256"] == payload["archive_sha256"]- checksums = root / "signed-candidate-checksums.txt"; entries = {}- for line in checksums.read_text().splitlines():- digest, relative_text = line.split(None, 1); relative = pathlib.PurePosixPath(relative_text.strip()); assert len(digest) == 64 and not relative.is_absolute() and ".." not in relative.parts- path = root.joinpath(*relative.parts).resolve(); path.relative_to(root.resolve()); assert path.is_file() and hashlib.sha256(path.read_bytes()).hexdigest() == digest; entries[relative.as_posix()] = digest- assert {expected_driver, "review-measurements.json", "signed-catalog.json", archive_relative.as_posix()} <= set(entries)- if os.name != "nt": driver.chmod(driver.stat().st_mode | 0o100)- with env_path.open("a") as stream: stream.write(f"CUA_DRIVER_BIN={driver}\nCUA_TEST_DRIVER_BIN={driver}\nCUA_CANDIDATE_MEASUREMENTS={measurements_path}\nCUA_PERCEPTION_CATALOG={catalog}\nCUA_PERCEPTION_EXTENSION_ARCHIVE={archive}\n")- '@ | python - $candidate $measurements $env:GITHUB_ENV $env:EXPECTED_SHA $env:EXPECTED_TARGET $env:EXPECTED_DRIVER- if ($LASTEXITCODE -ne 0) { throw 'review candidate measurement verification failed' }- $driver = (Resolve-Path -LiteralPath (Join-Path $candidate $env:EXPECTED_DRIVER)).Path- $inspect = Join-Path $env:RUNNER_TEMP 'perception-inspect.json'- $env:CUA_DRIVER_RS_HOME = $env:CUA_PERCEPTION_EXTENSION_HOME- & $driver extension inspect cua-perception --catalog $catalog --json | Set-Content $inspect -Encoding utf8- if ($LASTEXITCODE -ne 0) { throw 'signed catalog inspection failed' }- & $driver extension install cua-perception --catalog $catalog- if ($LASTEXITCODE -ne 0) { throw 'signed extension install failed' }- $status = Join-Path $env:RUNNER_TEMP 'perception-status.json'- & $driver extension status cua-perception --self-test --json | Set-Content $status -Encoding utf8- if ($LASTEXITCODE -ne 0) { throw 'installed extension self-test failed' }- $installed = (& $driver extension path cua-perception).Trim()- @'- import hashlib, json, os, pathlib, sys- inspect_path, status_path, catalog_path, installed_path, env_path, driver, measurements_path = sys.argv[1:]- inspect_path, status_path, catalog_path, installed_path, env_path = map(pathlib.Path, (inspect_path, status_path, catalog_path, installed_path, env_path))- preview = json.loads(inspect_path.read_text(encoding="utf-8-sig")); status = json.loads(status_path.read_text(encoding="utf-8-sig")); catalog = json.loads(catalog_path.read_text()); measured = json.loads(pathlib.Path(measurements_path).read_text())- assert preview["publisher_signature_verified"] is True and preview["trust"] == "review-only-publisher-verified"- assert status["installed"] is True and status["healthy"] is True and status["trust"] == "review-only-publisher-verified"- assert status["publisher_id"] == measured["publisher_id"] and status["publisher_key_id"] == measured["key_id"]- assert status["active_version"] == measured["extension_version"] and status["protocol_version"] == measured["protocol_version"]- assert catalog["signature_algorithm"] == measured["signature_algorithm"] == "ed25519" and preview["archive_sha256"] == measured["archive_sha256"] == catalog["payload"]["archive_sha256"]- archive_rel = pathlib.PurePosixPath(catalog["payload"]["archive"]); assert not archive_rel.is_absolute() and ".." not in archive_rel.parts- archive = catalog_path.parent.joinpath(*archive_rel.parts).resolve(); assert archive.is_file() and hashlib.sha256(archive.read_bytes()).hexdigest() == preview["archive_sha256"]- root = installed_path.resolve(); files = {item["path"]: item["sha256"] for item in preview["files"]}; model_paths, model_hashes = [], []- assert preview["models"]- for model in preview["models"]:- relative = pathlib.PurePosixPath(model["path"]); assert not relative.is_absolute() and ".." not in relative.parts- path = root.joinpath(*relative.parts).resolve(); path.relative_to(root); digest = hashlib.sha256(path.read_bytes()).hexdigest()- assert digest == files[model["path"]] == model["conversion_sha256"]- model_paths.append(str(path)); model_hashes.append(digest)- assert hashlib.sha256(catalog_path.read_bytes()).hexdigest() == measured["catalog_sha256"]- assert len(model_hashes) == 3 and measured["supplied_model_sha256"] in model_hashes- assert model_hashes == [item["converted_sha256"] for item in measured["models"]]- supplied_model_path = model_paths[model_hashes.index(measured["supplied_model_sha256"])]- runner_identity = {"name": os.environ.get("ImageOS", ""), "version": os.environ.get("ImageVersion", ""), "arch": os.environ.get("RUNNER_ARCH", "")}- assert all(runner_identity.values()), runner_identity- with env_path.open("a") as stream:- stream.write(f"CUA_PERCEPTION_MODEL={supplied_model_path}\nCUA_RUNNER_OS_NAME={runner_identity['name']}\nCUA_RUNNER_OS_VERSION={runner_identity['version']}\nCUA_RUNNER_OS_ARCH={runner_identity['arch']}\n")- '@ | python - $inspect $status $catalog $installed $env:GITHUB_ENV $driver $measurements- if ($LASTEXITCODE -ne 0) { throw 'candidate measurement failed' }- - name: Compile and measure the exact candidate test binary without credentials- shell: pwsh- run: |- $ErrorActionPreference = 'Stop'- $messages = Join-Path $env:RUNNER_TEMP 'candidate-test-build.jsonl'- cargo test --manifest-path libs/cua-driver/rust/Cargo.toml -p cua-driver-e2e --test authorized_live_jev_use_demo_test --locked --no-run --message-format=json-render-diagnostics | Set-Content $messages -Encoding utf8- if ($LASTEXITCODE -ne 0) { throw 'candidate test build failed' }- @'- import hashlib, json, os, pathlib, re, subprocess, sys- records = []- for line in pathlib.Path(sys.argv[1]).read_text(encoding="utf-8-sig").splitlines():- try: value = json.loads(line)- except json.JSONDecodeError: continue- if value.get("reason") == "compiler-artifact" and value.get("target", {}).get("name") == "authorized_live_jev_use_demo_test" and value.get("executable"): records.append(pathlib.Path(value["executable"]).resolve())- assert len(records) == 1 and records[0].is_file(), records- binary = records[0]- listing = subprocess.run([str(binary), "--list"], check=True, capture_output=True, text=True).stdout.splitlines()- available = [line.removesuffix(": test") for line in listing if line.endswith(": test")]- def resolve(short_name):- matches = [name for name in available if name == short_name or name.endswith(f"::{short_name}")]- assert len(matches) == 1, f"required candidate test {short_name!r} resolved to {matches!r}"- assert re.fullmatch(r"[A-Za-z0-9_]+(?:::[A-Za-z0-9_]+)*", matches[0]), matches[0]- return matches[0]- window_test = resolve("authorized_visual_only_window_demo")- desktop_test = resolve("authorized_visual_only_primary_desktop_demo")- with pathlib.Path(os.environ["GITHUB_ENV"]).open("a") as stream:- stream.write(f"CUA_CANDIDATE_TEST_BINARY={binary}\nCUA_CANDIDATE_TEST_BINARY_SHA256={hashlib.sha256(binary.read_bytes()).hexdigest()}\nCUA_CANDIDATE_WINDOW_TEST={window_test}\nCUA_CANDIDATE_DESKTOP_TEST={desktop_test}\n")- '@ | python - $messages- if ($LASTEXITCODE -ne 0) { throw 'candidate test binary measurement failed' }- - name: Verify Linux X11 desktop survived setup steps- if: runner.os == 'Linux'- shell: bash- run: |- set -euo pipefail- dump_desktop_state() {- echo "Linux X11 desktop is unavailable before the mock demos" >&2- pgrep -a -f 'Xvfb|dbus-daemon|openbox|picom' >&2 || true- DISPLAY="$DISPLAY" xprop -root _NET_SUPPORTED _NET_SUPPORTING_WM_CHECK _NET_CLIENT_LIST >&2 2>&1 || true- for name in xvfb dbus openbox picom; do- echo "--- $name log ---" >&2- sed -n '1,200p' "$RUNNER_TEMP/$name.log" >&2 2>/dev/null || true- done- }- handle_desktop_failure() {- local status=$?- dump_desktop_state- exit "$status"- }- trap handle_desktop_failure ERR- declare -A desktop_pids=()- while IFS='=' read -r name pid; do- [[ "$name" =~ ^(xvfb|dbus|openbox|picom)$ && "$pid" =~ ^[1-9][0-9]*$ ]]- desktop_pids["$name"]="$pid"- done < "$RUNNER_TEMP/cua-linux-desktop.pids"- for name in xvfb dbus openbox picom; do- [[ -n "${desktop_pids[$name]:-}" ]]- kill -0 "${desktop_pids[$name]}"- done- xdpyinfo >/dev/null- ewmh_state="$(xprop -root _NET_SUPPORTING_WM_CHECK _NET_CLIENT_LIST)"- grep -q '^_NET_SUPPORTING_WM_CHECK(WINDOW): window id # 0x' <<< "$ewmh_state"- grep -q '^_NET_CLIENT_LIST(WINDOW):' <<< "$ewmh_state"- dbus-send --session --dest=org.freedesktop.DBus --type=method_call --print-reply / \- org.freedesktop.DBus.ListNames >/dev/null- trap - ERR- - name: Run installed candidate with deterministic mock chooser- shell: pwsh- env:- CUA_JEV_MOCK_DEMO: "1"- CUA_TEST_DRIVER_STDERR: "1"- run: |- & $env:CUA_CANDIDATE_TEST_BINARY --ignored --exact $env:CUA_CANDIDATE_WINDOW_TEST --nocapture- if ($LASTEXITCODE -ne 0) { throw 'artifact-gated mock window demo failed' }- & $env:CUA_CANDIDATE_TEST_BINARY --ignored --exact $env:CUA_CANDIDATE_DESKTOP_TEST --nocapture- if ($LASTEXITCODE -ne 0) { throw 'artifact-gated mock primary-desktop demo failed' }- - name: Fully decode and validate redacted evidence- shell: pwsh- env:- EXPECTED_SHA: ${{ needs.source.outputs.sha }}- EXPECTED_PLATFORM: ${{ matrix.platform }}- run: |- $ErrorActionPreference = 'Stop'- $evidence = $env:CUA_PERCEPTION_EVIDENCE_DIR- foreach ($scope in @('window', 'primary-desktop')) {- $scopeEvidence = if ($scope -eq 'window') { $evidence } else { Join-Path $evidence $scope }- $recording = Join-Path $scopeEvidence 'recording.mp4'- $manifest = Join-Path $scopeEvidence 'manifest.json'- if (-not (Test-Path $recording -PathType Leaf) -or -not (Test-Path $manifest -PathType Leaf)) { throw "complete $scope mock evidence was not produced" }- ffmpeg -v error -xerror -i $recording -map 0:v:0 -f null -- if ($LASTEXITCODE -ne 0) { throw "$scope recording.mp4 did not fully decode" }- }- uv pip install --no-config --system --require-hashes -r .github/releases/cua-perception/test-requirements.lock- @'- import hashlib, json, os, pathlib, shutil, subprocess, sys- from jsonschema import Draft202012Validator- evidence, output, schema_path, measurements_path = map(pathlib.Path, sys.argv[1:])- schema = json.loads(schema_path.read_text()); Draft202012Validator.check_schema(schema); measured = json.loads(measurements_path.read_text())- routes = {- "window": (evidence, "window", "get_window_state", "background"),- "primary-desktop": (evidence / "primary-desktop", "desktop", "get_desktop_state", "foreground"),- }- output.mkdir(mode=0o700, parents=True, exist_ok=False)- for scope, (source, input_scope, capture_kind, delivery_mode) in routes.items():- manifest_path, recording = source / "manifest.json", source / "recording.mp4"- manifest = json.loads(manifest_path.read_text()); Draft202012Validator(schema).validate(manifest)- assert manifest["platform"] == os.environ["EXPECTED_PLATFORM"]- assert manifest["fixture"] == {"id": "visual-only-canvas/v1", "oracle": {"source": "fixture-journal", "initial_ready": True, "selected": "send", "action_count": 1, "result": "passed"}}- runtime = manifest["runtime"]; driver = runtime["driver"]; perception = runtime["perception"]; chooser = runtime["chooser"]- assert driver["source_sha"] == measured["source_sha"] == os.environ["EXPECTED_SHA"] and driver["version"] == measured["review_driver_version"] and driver["binary_sha256"] == measured["review_driver_sha256"]- assert driver["build"] == {"profile": measured["review_driver_build_profile"], "target": measured["target"], "sealed_artifact_manifest_sha256": measured["sealed_artifact_manifest_sha256"], "sealed_extension_manifest_sha256": measured["sealed_extension_manifest_sha256"]}- assert perception["signature_algorithm"] == measured["signature_algorithm"] == "ed25519"; assert perception["signed_extension_archive_sha256"] == measured["archive_sha256"]; assert perception["signing_key_sha256"] == measured["public_key_sha256"]; assert perception["signed_catalog_sha256"] == measured["catalog_sha256"]- assert perception["protocol_version"] == measured["protocol_version"] and perception["worker_sha256"] == measured["worker_sha256"] and perception["self_test"] == measured["self_test"] and perception["models"] == measured["models"] and perception["onnx_runtime"] == measured["onnx_runtime"]- assert chooser["mode"] == "mock" and chooser["provider"] == "fixture" and chooser["model_id"]- assert chooser["adapter_source_sha"] == os.environ["EXPECTED_SHA"] and chooser["source_sha"] == os.environ["CUA_JEV_SOURCE_SHA"]- result = manifest["result"]; observation = manifest["observation"]- assert observation["session_label"] == f'{os.environ["CUA_SESSION_LABEL"]}-{scope}'- assert (observation["input_scope"], observation["capture_kind"], manifest["environment"]["delivery_mode"]) == (input_scope, capture_kind, delivery_mode)- assert observation["capture_source"] == "driver-screenshot" and len(observation["acted_capture_id_sha256"]) == len(observation["fresh_capture_id_sha256"]) == len(observation["capture_trace_sha256"]) == 64- assert 2 <= len(observation["candidates"]) <= 18 and result["selected_candidate"] in {item["id"] for item in observation["candidates"]}- assert manifest["environment"] == {"os": {"name": os.environ["CUA_RUNNER_OS_NAME"], "version": os.environ["CUA_RUNNER_OS_VERSION"], "arch": os.environ["CUA_RUNNER_OS_ARCH"]}, "desktop_session": os.environ["CUA_DESKTOP_SESSION_TYPE"], "runner_identity_class": os.environ["CUA_RUNNER_IDENTITY_CLASS"], "delivery_mode": delivery_mode}- assert result["status"] == "passed" and result["stale_capture_refused"] is True- content = recording.read_bytes(); video_sha = hashlib.sha256(content).hexdigest(); assert manifest["artifacts"] == [{"kind": "video", "path": "recording.mp4", "sha256": video_sha, "size_bytes": len(content)}]- probe = json.loads(subprocess.run(["ffprobe", "-v", "error", "-select_streams", "v:0", "-show_entries", "stream=width,height,avg_frame_rate:format=duration", "-of", "json", recording], check=True, capture_output=True, text=True).stdout); stream = probe["streams"][0]; numerator, denominator = map(int, stream["avg_frame_rate"].split("/")); duration_ms = round(float(probe["format"]["duration"]) * 1000)- recording_value = manifest["recording"]; dimensions = {"width": stream["width"], "height": stream["height"]}; assert recording_value["original_dimensions"] == recording_value["delivered_dimensions"] == dimensions; assert recording_value["frame_rate"] == {"numerator": numerator, "denominator": denominator}; assert recording_value["cursor"] == {"agent_overlay": False, "system_cursor": "recorder-default"}; assert recording_value["edit_operations"] == [{"operation": "none", "speed": "1x"}]; assert recording_value["shots"] == [{"source_sha256": video_sha, "start_ms": 0, "end_ms": duration_ms}]; assert recording_value["final_sha256"] == video_sha and recording_value["size_bytes"] == len(content)- destination = output / scope; destination.mkdir(mode=0o700); shutil.copyfile(recording, destination / "recording.mp4"); shutil.copyfile(manifest_path, destination / "manifest.json"); assert sorted(path.name for path in destination.iterdir()) == ["manifest.json", "recording.mp4"]- assert sorted(path.name for path in output.iterdir()) == ["primary-desktop", "window"]- '@ | python - $evidence (Join-Path $env:RUNNER_TEMP 'publish-evidence') 'libs/cua-driver/tests/perception-demo/evidence-manifest.schema.json' $env:CUA_CANDIDATE_MEASUREMENTS- if ($LASTEXITCODE -ne 0) { throw 'redacted evidence validation failed' }- - name: Encrypt the validated evidence bundles- shell: pwsh- env:- CUA_PERCEPTION_EVIDENCE_RECIPIENT: ${{ vars.EVIDENCE_ARCHIVE_RECIPIENT_PUBLIC_KEY }}- run: |- $ErrorActionPreference = 'Stop'- $plaintext = Join-Path $env:RUNNER_TEMP 'publish-evidence'- $ciphertext = Join-Path $env:RUNNER_TEMP 'encrypted-evidence'- try {- if ([string]::IsNullOrWhiteSpace($env:CUA_PERCEPTION_EVIDENCE_RECIPIENT)) { throw 'EVIDENCE_ARCHIVE_RECIPIENT_PUBLIC_KEY environment variable is required' }- if (Test-Path -LiteralPath $ciphertext) { throw 'encrypted evidence output must be fresh' }- New-Item -ItemType Directory -Path $ciphertext | Out-Null- foreach ($scope in @('window', 'primary-desktop')) {- $fingerprint = python libs/cua-driver/tests/perception-demo/evidence_envelope.py encrypt --input (Join-Path $plaintext $scope) --output (Join-Path $ciphertext "$scope.cuae") --recipient-env CUA_PERCEPTION_EVIDENCE_RECIPIENT- if ($LASTEXITCODE -ne 0) { throw "$scope evidence encryption failed" }- if ($fingerprint -notmatch '^recipient_public_key_sha256=[0-9a-f]{64}$') { throw "$scope evidence encryption did not report a valid recipient fingerprint" }- Write-Host "$scope $fingerprint"- }- @'- import pathlib, sys- root = pathlib.Path(sys.argv[1])- assert sorted(path.name for path in root.iterdir()) == ["primary-desktop.cuae", "window.cuae"]- assert all(path.is_file() and not path.is_symlink() for path in root.iterdir())- '@ | python - $ciphertext- if ($LASTEXITCODE -ne 0) { throw 'encrypted evidence directory contract failed' }- } finally {- Remove-Item Env:CUA_PERCEPTION_EVIDENCE_RECIPIENT -ErrorAction SilentlyContinue- }- - name: Upload only encrypted evidence envelopes- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.2- with:- name: mock-jev-visual-${{ matrix.platform }}-${{ needs.source.outputs.sha }}- path: ${{ runner.temp }}/encrypted-evidence/- if-no-files-found: error- retention-days: 14- - name: Stop Linux X11 desktop- if: always() && runner.os == 'Linux'- shell: bash- run: |- set -euo pipefail- pid_file="$RUNNER_TEMP/cua-linux-desktop.pids"- [[ -f "$pid_file" ]] || exit 0- declare -A expected=(- [xvfb]=Xvfb- [dbus]=dbus-daemon- [openbox]=openbox- [picom]=picom- )- while IFS='=' read -r name pid; do- [[ -n "${expected[$name]:-}" && "$pid" =~ ^[1-9][0-9]*$ ]] || continue- if [[ -r "/proc/$pid/comm" && "$(<"/proc/$pid/comm")" == "${expected[$name]}" ]]; then- kill "$pid" 2>/dev/null || true- fi- done < "$pid_file"- - name: Remove plaintext evidence from the runner- if: always()- shell: pwsh- run: |- $ErrorActionPreference = 'Stop'- try {- if ($IsWindows -and -not [string]::IsNullOrWhiteSpace($env:CUA_PERCEPTION_EXTENSION_HOME)) {- if ([string]::IsNullOrWhiteSpace($env:USERPROFILE)) { throw 'USERPROFILE is required for Windows extension cleanup' }- if ($env:GITHUB_RUN_ID -notmatch '^[1-9][0-9]*$' -or $env:GITHUB_RUN_ATTEMPT -notmatch '^[1-9][0-9]*$') { throw 'GitHub run identity is invalid' }- $extensionHomeName = "cua-perception-extension-home-$($env:GITHUB_RUN_ID)-$($env:GITHUB_RUN_ATTEMPT)"- $userProfile = [IO.Path]::GetFullPath($env:USERPROFILE)- $userProfileItem = Get-Item -LiteralPath $userProfile -Force- if (-not $userProfileItem.PSIsContainer -or $userProfileItem.Attributes -band [IO.FileAttributes]::ReparsePoint) { throw 'Windows user profile must be a real directory' }- $extensionHome = [IO.Path]::GetFullPath($env:CUA_PERCEPTION_EXTENSION_HOME)- $expectedExtensionHome = [IO.Path]::GetFullPath((Join-Path $userProfile $extensionHomeName))- if ($extensionHome -ne $expectedExtensionHome -or [IO.Path]::GetDirectoryName($extensionHome) -ne $userProfile -or [IO.Path]::GetFileName($extensionHome) -ne $extensionHomeName) { throw 'refusing to clean an unexpected Windows extension home' }- if (Test-Path -LiteralPath $expectedExtensionHome) {- $extensionHomeItem = Get-Item -LiteralPath $expectedExtensionHome -Force- if ($extensionHomeItem.Attributes -band [IO.FileAttributes]::ReparsePoint) {- Remove-Item -LiteralPath $expectedExtensionHome -Force- } else {- Remove-Item -LiteralPath $expectedExtensionHome -Recurse -Force- }- }- }- } finally {- if ([string]::IsNullOrWhiteSpace($env:RUNNER_TEMP)) { throw 'RUNNER_TEMP is required for plaintext evidence cleanup' }- $runnerTemp = [IO.Path]::GetFullPath($env:RUNNER_TEMP)- $runnerTempItem = Get-Item -LiteralPath $runnerTemp -Force- if (-not $runnerTempItem.PSIsContainer -or $runnerTempItem.Attributes -band [IO.FileAttributes]::ReparsePoint) { throw 'RUNNER_TEMP must be a real directory' }- foreach ($name in @('cua-perception-recordings', 'cua-perception-evidence', 'perception-evidence', 'publish-evidence')) {- $target = [IO.Path]::GetFullPath((Join-Path $runnerTemp $name))- if ([IO.Path]::GetDirectoryName($target) -ne $runnerTemp -or [IO.Path]::GetFileName($target) -ne $name) { throw 'refusing to clean an unexpected plaintext evidence path' }- if (Test-Path -LiteralPath $target) {- $targetItem = Get-Item -LiteralPath $target -Force- if ($targetItem.Attributes -band [IO.FileAttributes]::ReparsePoint) {- Remove-Item -LiteralPath $target -Force- } else {- Remove-Item -LiteralPath $target -Recurse -Force- }- }- }- }diff --git a/.github/workflows/authorized-live-jev-use.yml b/.github/workflows/authorized-live-jev-use.ymldeleted file mode 100644index 0e3fbef0cb..0000000000--- a/.github/workflows/authorized-live-jev-use.yml+++ /dev/null@@ -1,154 +0,0 @@-name: "Authorized: mock jev-use"--on:- workflow_dispatch:- inputs:- commit_sha:- description: "Full 40-character canonical repository commit SHA"- required: true- trusted_branch:- description: "Canonical main or release branch that must contain the SHA"- required: true- default: "main"--permissions:- contents: read--env:- CARGO_NET_RETRY: "10"- CARGO_HTTP_TIMEOUT: "120"- CARGO_HTTP_MULTIPLEXING: "false"- # Cua programs and packages run here never send usage telemetry.- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--jobs:- source:- name: Validate canonical source- runs-on: ubuntu-latest- outputs:- sha: ${{ steps.validate.outputs.sha }}- steps:- - id: validate- name: Require a canonical trusted-branch commit- env:- GH_TOKEN: ${{ github.token }}- REQUESTED_SHA: ${{ inputs.commit_sha }}- TRUSTED_BRANCH: ${{ inputs.trusted_branch }}- run: |- set -euo pipefail- if [[ "$GITHUB_REPOSITORY" != "trycua/cua" ]]; then- echo "candidate validation runs only in trycua/cua" >&2- exit 2- fi- if [[ ! "$REQUESTED_SHA" =~ ^[0-9a-fA-F]{40}$ ]]; then- echo "commit_sha must be a full 40-character SHA" >&2- exit 2- fi- if [[ ! "$TRUSTED_BRANCH" =~ ^(main|release/[A-Za-z0-9._/-]+)$ ]]; then- echo "trusted_branch must be main or a canonical release/* branch" >&2- exit 2- fi- branch_sha="$(gh api "repos/$GITHUB_REPOSITORY/git/ref/heads/$TRUSTED_BRANCH" --jq .object.sha)"- status="$(gh api "repos/$GITHUB_REPOSITORY/compare/${REQUESTED_SHA,,}...$branch_sha" --jq .status)"- if [[ "$status" != "ahead" && "$status" != "identical" ]]; then- echo "$REQUESTED_SHA is not contained in $TRUSTED_BRANCH" >&2- exit 2- fi- gh api "repos/$GITHUB_REPOSITORY/commits/${REQUESTED_SHA,,}" --jq .sha- echo "sha=${REQUESTED_SHA,,}" >> "$GITHUB_OUTPUT"-- mock:- name: Deterministic mock Jev- needs: source- runs-on: ubuntu-latest- timeout-minutes: 45- env:- CUA_DRIVER_BIN: ${{ github.workspace }}/libs/cua-driver/rust/target/release/cua-driver- CUA_DRIVER_PERMISSION_MODE: unrestricted- CUA_DRIVER_DANGEROUSLY_BYPASS_APPROVALS: "1"- CUA_E2E_BROWSER_NO_SANDBOX: "1"- defaults:- run:- working-directory: libs/cua-driver/examples/jev-use- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- with:- ref: ${{ needs.source.outputs.sha }}- - uses: dtolnay/rust-toolchain@4716b85f2fac3e324e64fa2810f6b5c3905760a5 # 1.97.1- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.12"- - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6- with:- version: "0.8.15"- - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4- with:- node-version: "22"- - name: Install Linux desktop dependencies- working-directory: ${{ github.workspace }}- run: |- sudo apt-get update- sudo apt-get install -y --no-install-recommends \- xvfb dbus-x11 at-spi2-core openbox picom clang pkg-config \- libdbus-1-dev libpipewire-0.3-dev libspa-0.2-dev libei-dev \- libx11-dev libxi-dev libxtst-dev libxext-dev libssl-dev \- libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev- chrome_payload="$(readlink -f "$(command -v google-chrome)")"- test "$chrome_payload" = /opt/google/chrome/google-chrome- test "$(stat -c %u "$chrome_payload")" = 0- test $((8#$(stat -c %a "$chrome_payload") & 0022)) = 0- - name: Build candidate and install locked clients- working-directory: ${{ github.workspace }}- run: |- cargo build --locked --release -p cua-driver --features portal-input --manifest-path libs/cua-driver/rust/Cargo.toml- cd libs/cua-driver/examples/jev-use- uv sync --frozen- npm ci --ignore-scripts- echo "Candidate SHA: $(git rev-parse HEAD)"- "$CUA_DRIVER_BIN" --version- - name: Run bounded mock checks- working-directory: ${{ github.workspace }}- run: |- mock="$RUNNER_TEMP/jev-use-mock-proof"- python_bin="$GITHUB_WORKSPACE/libs/cua-driver/examples/jev-use/.venv/bin/python"- test -x "$python_bin"- # Match the repository's supported Linux X11 desktop stack while- # keeping every provider row on the deterministic mock chooser.- xvfb-run -a --server-args="-screen 0 1920x1080x24" \- dbus-run-session -- bash -lc \- 'openbox >/tmp/jev-use-openbox.log 2>&1 & picom --backend xrender --config /dev/null >/tmp/jev-use-picom.log 2>&1 & sleep 2; cd libs/cua-driver/examples/jev-use; "'$python_bin'" verify_setup.py --typescript --max-steps 2 --output-dir "'$mock'"'- - name: Verify bounded mock chooser CLI- run: .venv/bin/python verify_choice_cli.py- - name: Audit mock action bound and redact evidence- run: |- uv run python - "$RUNNER_TEMP/jev-use-mock-proof" <<'PY'- import json, pathlib, sys- root = pathlib.Path(sys.argv[1])- summary = json.loads((root / "summary.json").read_text())- assert summary["complete"] is True- assert summary["live_requested"] is False- assert summary["typescript_requested"] is True- assert len(summary["checks"]) == 2- mock = [item for item in summary["checks"] if item["provider"] == "mock"]- assert len(mock) == 2 and all(item["outcome"] == "verified" for item in mock)- mock_steps = 0- for path in root.glob("*-mock.jsonl"):- mock_steps += sum(json.loads(line).get("event") == "step" for line in path.read_text().splitlines())- assert mock_steps <= 4, mock_steps- forbidden = ("typesafe_api_key", "authorization", "environment", "image_base64", "screenshot")- for path in root.iterdir():- if path.name == "summary.json" or path.suffix == ".jsonl":- text = path.read_text().lower()- assert not any(value in text for value in forbidden), path- PY- - name: Upload redacted mock metadata- if: always()- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4- with:- name: jev-use-mock-${{ needs.source.outputs.sha }}- path: |- ${{ runner.temp }}/jev-use-mock-proof/summary.json- ${{ runner.temp }}/jev-use-mock-proof/*.jsonl- if-no-files-found: error- retention-days: 14diff --git a/.github/workflows/cd-container-cuabot.yml b/.github/workflows/cd-container-cuabot.ymldeleted file mode 100644index c28da7d18a..0000000000--- a/.github/workflows/cd-container-cuabot.yml+++ /dev/null@@ -1,21 +0,0 @@-name: "CD: Container CuaBot"--on:- push:- tags:- - "docker-cuabot-v*.*.*"- workflow_dispatch:--permissions:- contents: read--jobs:- publish:- uses: ./.github/workflows/docker-reusable-publish.yml- with:- image_name: cuabot- context_dir: libs/cuabot- tag_prefix: docker-cuabot-v- docker_hub_org: trycua- secrets:- DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}diff --git a/.github/workflows/cd-container-lumier.yml b/.github/workflows/cd-container-lumier.ymldeleted file mode 100644index 696500372c..0000000000--- a/.github/workflows/cd-container-lumier.yml+++ /dev/null@@ -1,20 +0,0 @@-name: "CD: Container Lumier"--on:- push:- tags:- - "docker-lumier-v*.*.*"--permissions:- contents: read--jobs:- publish:- uses: ./.github/workflows/docker-reusable-publish.yml- with:- image_name: lumier- context_dir: libs/lumier- tag_prefix: docker-lumier-v- docker_hub_org: trycua- secrets:- DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}diff --git a/.github/workflows/cd-cua-perception-candidate-manual.yml b/.github/workflows/cd-cua-perception-candidate-manual.ymldeleted file mode 100644index 1037a37ccf..0000000000--- a/.github/workflows/cd-cua-perception-candidate-manual.yml+++ /dev/null@@ -1,73 +0,0 @@-name: "CD: Cua Perception exact-SHA candidates"--on:- workflow_dispatch:- inputs:- source_sha:- description: "Exact 40-character SHA at the reviewed ref tip"- required: true- type: string- reviewed_ref:- description: "Reviewed PR head or immutable candidate tag"- required: true- type: string- payload_run_id:- description: "Run ID containing all three platform bundle inputs"- required: true- type: string- linux_payload_artifact:- description: "Linux x86_64 release-input bundle artifact"- required: true- default: "cua-perception-input-linux-x86_64"- type: string- macos_payload_artifact:- description: "macOS aarch64 release-input bundle artifact"- required: true- default: "cua-perception-input-macos-aarch64"- type: string- windows_payload_artifact:- description: "Windows x86_64 release-input bundle artifact"- required: true- default: "cua-perception-input-windows-x86_64"- type: string- catalog_version:- description: "Monotonic catalog version"- required: true- type: string- expires_unix:- description: "Catalog expiry before the active key expires"- required: true- type: string--permissions:- actions: read- contents: read--jobs:- candidate:- name: candidate ${{ matrix.target_triple }}- strategy:- fail-fast: false- matrix:- include:- - target_os: linux- target_triple: x86_64-unknown-linux-gnu- payload_artifact: ${{ inputs.linux_payload_artifact }}- - target_os: macos- target_triple: aarch64-apple-darwin- payload_artifact: ${{ inputs.macos_payload_artifact }}- - target_os: windows- target_triple: x86_64-pc-windows-msvc- payload_artifact: ${{ inputs.windows_payload_artifact }}- uses: ./.github/workflows/cd-cua-perception-candidate.yml- with:- payload_artifact: ${{ matrix.payload_artifact }}- payload_run_id: ${{ fromJSON(inputs.payload_run_id) }}- source_ref: ${{ inputs.source_sha }}- reviewed_ref: ${{ inputs.reviewed_ref }}- target_os: ${{ matrix.target_os }}- target_triple: ${{ matrix.target_triple }}- catalog_version: ${{ fromJSON(inputs.catalog_version) }}- expires_unix: ${{ fromJSON(inputs.expires_unix) }}- secrets:- PERCEPTION_ED25519_PRIVATE_KEY_BASE64: ${{ secrets.PERCEPTION_ED25519_PRIVATE_KEY_BASE64 }}diff --git a/.github/workflows/cd-image-linux.yml b/.github/workflows/cd-image-linux.ymlindex 46ec3f77a3..dd09820eb6 100644--- a/.github/workflows/cd-image-linux.yml+++ b/.github/workflows/cd-image-linux.yml@@ -91,7 +91,6 @@ on:- "libs/cua/crates/cua-vmm/src/density.rs"- "libs/cua/crates/cua-vmm/src/qemu/**"- ".github/workflows/cd-image-linux.yml"- - ".github/workflows/image-doctor.yml"workflow_dispatch:inputs:publish:diff --git a/.github/workflows/cd-macos-golden.yml b/.github/workflows/cd-macos-golden.ymldeleted file mode 100644index aff254b26b..0000000000--- a/.github/workflows/cd-macos-golden.yml+++ /dev/null@@ -1,236 +0,0 @@-name: "CD: Cua Spaces macOS Golden"--# Builds the "macOS golden" Lume image for Local (Lume macOS) Spaces: a-# disposable base that boots to an autologin desktop with the native agent-# stack (cua-driver + cua-spacesd) already code-signed and TCC-granted, so a cloned-# Space streams + drives with zero permission prompts.-#-# Two stages:-# 1) build-sign (GitHub-hosted macOS): build cua-driver + cua-spacesd and sign the-# .app bundles with the org Developer ID Application cert (same secrets as-# cd-rust-cua-driver.yml / cd-cua-spaces.yml). Ad-hoc signatures do NOT hold-# the seeded TCC grants, so a stable cert is mandatory here.-# 2) golden (SELF-HOSTED Apple-Silicon macOS + Lume): clone the base VM,-# install the signed apps, seed TCC, freeze, and lume-push to ghcr. The TCC-# seed only works inside a SIP-disabled VirtualMac, so this stage cannot run-# on a GitHub-hosted runner — it needs a self-hosted runner that has `lume`-# and a base image, labeled `[self-hosted, macOS, ARM64, lume]`.-#-# Required secrets (reuse the existing org Developer ID secrets):-# APPLICATION_CERT_BASE64, CERT_PASSWORD, DEVELOPER_NAME, TEAM_ID,-# APPLE_ID, APP_SPECIFIC_PASSWORD (signing + optional notarization)-# CERT_IDENTITY_SHA (SHA-1 of the signing identity)-# GHCR_PUSH_TOKEN (write:packages on trycua, for lume push)-#-# STATUS: trycua/cua-staging currently has NONE of these. `gh api-# repos/trycua/cua-staging/actions/secrets` returns an empty list and so does-# .../organization-secrets. They all live in trycua/cua. Until they are-# mirrored here (or this workflow lands there), build-sign cannot get past-# the certificate import. Secret VALUES cannot be copied programmatically -- GitHub-# never returns them -- so a human with the cert has to add them.-#-# SCOPE (resolved): build-macos-golden.sh used to be a SECOND definition of the-# golden and built a materially thinner image -- the driver, a capture daemon,-# node, Chrome, and nothing else. No Unity, no Blender, no skills, no ~/.cua-# payload, no sanitizer. Publishing that to the tag the app pulls would have-# looked like a successful release and shipped a broken product.-#-# It now delegates the entire provisioning phase to-# apps/cua-spaces/scripts/golden/build-golden.sh -- the same script a maintainer-# runs by hand -- and keeps only the CI concerns: VM creation, staging the-# signed artifacts, the push-credential preflight, and `lume push`. Two gates-# keep the paths from diverging again:-# * the `coverage` job below (static, seconds) fails if the CI script stops-# delegating or if build-golden.sh grows a step the image contract does not-# account for;-# * golden/verify-golden.sh runs in the guest as the LAST build step, after-# the sanitizer, and fails the build if the image is missing anything in-# golden/golden-required.txt.-# push_image is therefore safe to use: a thin image cannot reach the push.--on:- # `workflow_dispatch` only fires for a workflow file that is already on the- # default branch, so while this lives on a feature branch there is no way to- # start it by hand. A push trigger scoped to a throwaway `ci/macos-golden-*`- # branch makes it startable — and therefore testable — before it lands on- # main, without firing on every ordinary push.- push:- branches:- - "ci/macos-golden-*"- workflow_dispatch:- inputs:- base_image:- description: "Base Lume VM to clone (must be SIP-off, autologin, ssh lume/lume)"- default: "macos-tahoe"- type: string- push_image:- description: "Registry tag to push, e.g. macos-tahoe-cua-spaces:26.3.0 (blank = build only)"- default: ""- type: string--permissions:- contents: read--env:- # Cua programs and packages run here never send usage telemetry.- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--jobs:- # Seconds, on a free runner, and it gates both expensive jobs. This is the- # check that would have caught the CI path drifting into a thinner golden --- # and the one that caught `bash -n` failing on an apostrophe inside a- # single-quoted block, which left build-macos-golden.sh unrunnable for its- # entire life.- coverage:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v4- - name: Golden coverage + syntax gate- run: bash apps/cua-spaces/scripts/golden/check-golden-coverage.sh-- build-sign:- needs: coverage- runs-on: macos-26- env:- KEYCHAIN_PASSWORD: temporary-golden-keychain-pwd- # `secrets` is NOT an allowed context in a step-level `if:`. Referencing it- # there is not a step that gets skipped -- it fails the whole workflow at- # PARSE time, before any job is created, which is why every run of this- # file has been an instant `startup_failure` with no jobs and no log, and- # why the golden CD has never once executed. Hoisting the secret into the- # job env makes the same test legal as `env.APPLE_ID`.- APPLE_ID: ${{ secrets.APPLE_ID }}- steps:- - name: Checkout cua-staging- uses: actions/checkout@v4-- - name: Select Xcode 26- run: sudo xcode-select -s /Applications/Xcode_26.app || true-- - name: Import Developer ID certificate- env:- APPLICATION_CERT_BASE64: ${{ secrets.APPLICATION_CERT_BASE64 }}- CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }}- run: |- security create-keychain -p "$KEYCHAIN_PASSWORD" build.keychain- security default-keychain -s build.keychain- security unlock-keychain -p "$KEYCHAIN_PASSWORD" build.keychain- security set-keychain-settings -t 3600 -l build.keychain- echo "$APPLICATION_CERT_BASE64" | base64 --decode > application.p12- security import application.p12 -k build.keychain -P "$CERT_PASSWORD" -T /usr/bin/codesign > /dev/null 2>&1- security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" build.keychain > /dev/null 2>&1- # The substitution MUST word-split: list-keychains takes the existing- # keychains as separate arguments, and quoting it would pass the whole- # list as one bogus path, dropping every other keychain from the- # search list. Deliberate, hence the disable.- # shellcheck disable=SC2046- security list-keychains -d user -s "$HOME/Library/Keychains/build.keychain-db" $(security list-keychains -d user | tr -d '"')- rm -f application.p12- test "$(security find-identity -v -p codesigning build.keychain | grep -c 'Developer ID Application')" -ge 1-- - name: Build + sign cua-driver (CuaDriverLocal.app)- env:- CERT_IDENTITY_SHA: ${{ secrets.CERT_IDENTITY_SHA }}- run: |- # CUA_DRIVER_LOCAL_SIGNING_IDENTITY is NOT a display name. The helper- # in scripts/_local-signing.sh rejects anything that is not exactly 40- # hex characters and silently falls back to "-" (ad-hoc) -- which- # --require-stable-signing then fails on. Passing- # "Developer ID Application: <name> (<team>)" here could never have- # produced a signed build. It also has to be told WHICH keychain: the- # helper defaults to login.keychain, and the cert was imported into- # build.keychain two steps up.- test -n "$CERT_IDENTITY_SHA" || { echo "CERT_IDENTITY_SHA is unset"; exit 1; }- export CUA_DRIVER_LOCAL_SIGNING_IDENTITY="$CERT_IDENTITY_SHA"- export CUA_DRIVER_LOCAL_SIGNING_KEYCHAIN="$HOME/Library/Keychains/build.keychain-db"- bash libs/cua-driver/scripts/install-local.sh --release --require-stable-signing- # Prove the bundle is certificate-backed before it is handed to the- # golden. An ad-hoc signature does not hold seeded TCC grants, so a- # silent downgrade here is a golden that prompts on every clone.- codesign -dv --verbose=2 /Applications/CuaDriverLocal.app 2>&1 \- | grep -q "TeamIdentifier=" \- || { echo "CuaDriverLocal.app is not certificate-backed"; exit 1; }- ditto -c -k --keepParent /Applications/CuaDriverLocal.app CuaDriverLocal.app.zip-- - name: Build + sign cua-spacesd (Cua Spacesd.app)- env:- DEVELOPER_NAME: ${{ secrets.DEVELOPER_NAME }}- TEAM_ID: ${{ secrets.TEAM_ID }}- run: |- export CUA_ENV_CODESIGN_IDENTITY="Developer ID Application: ${DEVELOPER_NAME} (${TEAM_ID})"- export CUA_ENV_BUNDLE_ID="com.trycua.cua-env-driver"- bash libs/cua-spacesd/scripts/build-macos-app.sh- ditto -c -k --keepParent "libs/cua-spacesd/target/macos/Cua Spacesd.app" CuaSpacesd.app.zip-- # Optional but recommended for a public image: notarize the signed apps so- # Gatekeeper trusts them off this build machine.- - name: Notarize (optional)- if: ${{ env.APPLE_ID != '' }}- env:- TEAM_ID: ${{ secrets.TEAM_ID }}- APP_SPECIFIC_PASSWORD: ${{ secrets.APP_SPECIFIC_PASSWORD }}- run: |- for z in CuaDriverLocal.app.zip CuaSpacesd.app.zip; do- xcrun notarytool submit "$z" --apple-id "$APPLE_ID" --team-id "$TEAM_ID" \- --password "$APP_SPECIFIC_PASSWORD" --wait --timeout 30m || echo "notarize $z failed (non-fatal)"- done-- - name: Upload signed app bundles- uses: actions/upload-artifact@v4- with:- name: signed-golden-apps- path: |- CuaDriverLocal.app.zip- CuaSpacesd.app.zip-- golden:- needs: build-sign- # Self-hosted Apple-Silicon macOS runner with `lume` + a base image. The TCC- # seed + `lume push` cannot run on a GitHub-hosted runner.- runs-on: [self-hosted, macOS, ARM64, lume]- steps:- - name: Checkout cua-staging- uses: actions/checkout@v4-- - name: Download signed apps- uses: actions/download-artifact@v4- with:- name: signed-golden-apps- path: _apps-- - name: Unpack signed apps- run: |- ditto -x -k _apps/CuaDriverLocal.app.zip _apps/- ditto -x -k _apps/CuaSpacesd.app.zip _apps/-- - name: Ensure lume serve is running- run: |- curl -s --max-time 3 http://127.0.0.1:7777/lume/vms >/dev/null || (lume serve >/tmp/lume-serve.log 2>&1 &) && sleep 3-- # Cheap, and it would have caught a real one: build-macos-golden.sh sat in- # the tree unrunnable, because an apostrophe in the comment "Google's- # signature" inside a single-quoted vmssh block closed the string and- # inverted the quoting of the rest of the file. `bash -n` fails on that in- # milliseconds; the workflow instead burned the whole build-sign job first- # and then died on the very first line of the build. Never again.- - name: Syntax-check the build scripts- run: bash apps/cua-spaces/scripts/golden/check-golden-coverage.sh-- - name: Build (and optionally push) the golden- env:- BASE_IMAGE: ${{ inputs.base_image }}- GOLDEN: cua-spaces-golden- DRIVER_APP: ${{ github.workspace }}/_apps/CuaDriverLocal.app- SPACESD_APP: ${{ github.workspace }}/_apps/Cua Spacesd.app- PUSH_IMAGE: ${{ inputs.push_image }}- # `lume push` does its OWN ghcr token exchange from these env vars- # (ImageContainerRegistry.getCredentialsFromEnvironment) and never- # looks at docker's credential store. A `docker login` step here was- # decorative: the push would have failed authenticationFailed on the- # first real publish. The runner is self-hosted, so these must be- # scoped to the step rather than left in the environment.- GITHUB_USERNAME: trycua- GITHUB_TOKEN: ${{ secrets.GHCR_PUSH_TOKEN }}- run: |- bash apps/cua-spaces/scripts/build-macos-golden.shdiff --git a/.github/workflows/cd-py-sandbox-apps.yml b/.github/workflows/cd-py-sandbox-apps.ymldeleted file mode 100644index 4af89a9bb2..0000000000--- a/.github/workflows/cd-py-sandbox-apps.yml+++ /dev/null@@ -1,69 +0,0 @@-name: "CD: cua-sandbox-apps (PyPI)"--on:- push:- tags:- - "sandbox-apps-v*"- workflow_dispatch:- inputs:- version:- description: "Version to publish (without v prefix)"- required: true- default: "0.1.0"- workflow_call:- inputs:- version:- description: "Version to publish"- required: true- type: string--permissions:- contents: write--jobs:- prepare:- runs-on: macos-latest- outputs:- version: ${{ steps.get-version.outputs.version }}- steps:- - uses: actions/checkout@v4-- - name: Determine version- id: get-version- run: |- if [ -n "${{ inputs.version }}" ]; then- VERSION=${{ inputs.version }}- elif [ "${{ github.event_name }}" == "push" ]; then- if [[ "${{ github.ref }}" =~ ^refs/tags/sandbox-apps-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then- VERSION=${BASH_REMATCH[1]}- else- echo "Invalid tag format for sandbox-apps"- exit 1- fi- elif [ -n "${{ github.event.inputs.version }}" ]; then- VERSION=${{ github.event.inputs.version }}- else- echo "ERROR: No version found!"- exit 1- fi- echo "version=$VERSION" >> $GITHUB_OUTPUT-- publish:- needs: prepare- uses: ./.github/workflows/py-reusable-publish.yml- with:- package_name: "sandbox-apps"- package_dir: "libs/python/cua-sandbox-apps"- version: ${{ needs.prepare.outputs.version }}- base_package_name: "cua-sandbox-apps"- secrets:- PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}-- create-release:- needs: [prepare, publish]- uses: ./.github/workflows/release-github-reusable.yml- with:- tag_name: "sandbox-apps-v${{ needs.prepare.outputs.version }}"- release_name: "cua-sandbox-apps v${{ needs.prepare.outputs.version }}"- module_path: "libs/python/cua-sandbox-apps"- body: ""diff --git a/.github/workflows/cd-py-som.yml b/.github/workflows/cd-py-som.ymldeleted file mode 100644index c85f024759..0000000000--- a/.github/workflows/cd-py-som.yml+++ /dev/null@@ -1,78 +0,0 @@-name: "CD: cua-som (PyPI)"--on:- push:- tags:- - "som-v*"- workflow_dispatch:- inputs:- version:- description: "Version to publish (without v prefix)"- required: true- default: "0.1.0"- workflow_call:- inputs:- version:- description: "Version to publish"- required: true- type: string- outputs:- version:- description: "The version that was published"- value: ${{ jobs.determine-version.outputs.version }}--# Adding permissions at workflow level-permissions:- contents: write--jobs:- determine-version:- runs-on: macos-latest- outputs:- version: ${{ steps.get-version.outputs.version }}- steps:- - uses: actions/checkout@v4-- - name: Determine version- id: get-version- run: |- # Check inputs.version first (set by workflow_call)- if [ -n "${{ inputs.version }}" ]; then- VERSION=${{ inputs.version }}- elif [ "${{ github.event_name }}" == "push" ]; then- # Extract version from tag (for package-specific tags)- if [[ "${{ github.ref }}" =~ ^refs/tags/som-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then- VERSION=${BASH_REMATCH[1]}- else- echo "Invalid tag format for som"- exit 1- fi- elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then- # Use version from workflow dispatch- VERSION=${{ github.event.inputs.version }}- else- echo "No version provided"- exit 1- fi- echo "VERSION=$VERSION"- echo "version=$VERSION" >> $GITHUB_OUTPUT-- publish:- needs: determine-version- uses: ./.github/workflows/py-reusable-publish.yml- with:- package_name: "som"- package_dir: "libs/python/som"- version: ${{ needs.determine-version.outputs.version }}- base_package_name: "cua-som"- secrets:- PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}-- create-release:- needs: [determine-version, publish]- uses: ./.github/workflows/release-github-reusable.yml- with:- tag_name: "som-v${{ needs.determine-version.outputs.version }}"- release_name: "cua-som v${{ needs.determine-version.outputs.version }}"- module_path: "libs/python/som"- body: ""diff --git a/.github/workflows/cd-ts-core.yml b/.github/workflows/cd-ts-core.ymldeleted file mode 100644index cf8b54e4ca..0000000000--- a/.github/workflows/cd-ts-core.yml+++ /dev/null@@ -1,88 +0,0 @@-name: "CD: @trycua/core (npm)"--on:- push:- tags:- - "npm-core-v*"- workflow_dispatch:- inputs:- version:- description: "Version to publish (default: from package.json)"- required: false- default: ""- workflow_call:- inputs:- version:- description: "Version to publish (default: from package.json)"- required: false- type: string- default: ""--permissions:- id-token: write- contents: write--env:- # Cua programs and packages run here never send usage telemetry.- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--jobs:- prepare:- runs-on: ubuntu-latest- outputs:- version: ${{ steps.get-version.outputs.version }}- tag: ${{ steps.get-version.outputs.tag }}- steps:- - name: Checkout code- uses: actions/checkout@v4-- - name: Determine version- id: get-version- run: |- # Check inputs.version first (works for workflow_call)- if [ -n "${{ inputs.version }}" ]; then- VERSION="${{ inputs.version }}"- elif [ "${{ github.event_name }}" == "push" ]; then- # Extract version from tag- if [[ "${{ github.ref }}" =~ ^refs/tags/npm-core-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then- VERSION=${BASH_REMATCH[1]}- else- echo "ERROR: Invalid tag format for npm-core"- exit 1- fi- elif [ -n "${{ github.event.inputs.version }}" ]; then- VERSION="${{ github.event.inputs.version }}"- else- # Read from package.json- VERSION=$(node -p "require('./libs/typescript/core/package.json').version")- fi-- echo "Core version: $VERSION"- echo "version=${VERSION}" >> $GITHUB_OUTPUT- echo "tag=npm-core-v${VERSION}" >> $GITHUB_OUTPUT-- publish:- needs: prepare- uses: ./.github/workflows/ts-reusable-publish.yml- with:- package_name: "core"- package_dir: "libs/typescript/core"- package_manager: "pnpm"- version: ${{ needs.prepare.outputs.version }}- secrets:- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}-- create-release:- needs: [prepare, publish]- uses: ./.github/workflows/release-github-reusable.yml- with:- tag_name: ${{ needs.prepare.outputs.tag }}- release_name: "@trycua/core v${{ needs.prepare.outputs.version }}"- module_path: "libs/typescript/core"- body: |- ## Installation-- ```bash- npm install @trycua/core- ```diff --git a/.github/workflows/cd-ts-cuabot.yml b/.github/workflows/cd-ts-cuabot.ymldeleted file mode 100644index 592bf7be24..0000000000--- a/.github/workflows/cd-ts-cuabot.yml+++ /dev/null@@ -1,107 +0,0 @@-name: "CD: cuabot (npm)"--on:- push:- tags:- - "cuabot-v*"- workflow_dispatch:- inputs:- version:- description: "Version to publish (default: from package.json)"- required: false- default: ""- workflow_call:- inputs:- version:- description: "Version to publish"- required: false- type: string- default: ""--permissions:- id-token: write- contents: write--env:- # Cua programs and packages run here never send usage telemetry.- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--jobs:- prepare:- runs-on: ubuntu-latest- outputs:- version: ${{ steps.get-version.outputs.version }}- tag: ${{ steps.get-version.outputs.tag }}- steps:- - name: Checkout code- uses: actions/checkout@v4-- - name: Determine version- id: get-version- run: |- if [ -n "${{ inputs.version }}" ]; then- VERSION="${{ inputs.version }}"- elif [ "${{ github.event_name }}" == "push" ]; then- if [[ "${{ github.ref }}" =~ ^refs/tags/cuabot-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then- VERSION=${BASH_REMATCH[1]}- else- echo "ERROR: Invalid tag format"- exit 1- fi- else- VERSION=$(node -p "require('./libs/cuabot/package.json').version")- fi- echo "version=${VERSION}" >> $GITHUB_OUTPUT- echo "tag=cuabot-v${VERSION}" >> $GITHUB_OUTPUT-- publish-npm:- needs: prepare- uses: ./.github/workflows/ts-reusable-publish.yml- with:- package_name: "cuabot"- package_dir: "libs/cuabot"- package_manager: "pnpm"- version: ${{ needs.prepare.outputs.version }}- secrets:- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}-- create-release:- needs: [prepare, publish-npm]- uses: ./.github/workflows/release-github-reusable.yml- with:- tag_name: ${{ needs.prepare.outputs.tag }}- release_name: "cuabot v${{ needs.prepare.outputs.version }}"- module_path: "libs/cuabot"- body: |- ## Quick Start-- ```bash- npx cuabot- ```-- Or install globally:-- ```bash- npm install -g cuabot- cuabot- ```-- ## Usage-- ```bash- cuabot # Run default agent (or setup)- cuabot claude # Run Claude Code in sandbox- cuabot gemini # Run Gemini CLI in sandbox- cuabot codex # Run Codex CLI in sandbox- cuabot chromium # Open sandboxed Chromium-- cuabot --screenshot # Take screenshot- cuabot --type "hello" # Type text- cuabot --click 100 200 # Click at coordinates- ```-- ## Documentation-- - [Getting Started](https://cua.ai/docs/cuabot/cuabot)- - [Installation Guide](https://cua.ai/docs/cuabot/install)diff --git a/.github/workflows/cd-ts-playground.yml b/.github/workflows/cd-ts-playground.ymldeleted file mode 100644index 16a2b28565..0000000000--- a/.github/workflows/cd-ts-playground.yml+++ /dev/null@@ -1,88 +0,0 @@-name: "CD: @trycua/playground (npm)"--on:- push:- tags:- - "npm-playground-v*"- workflow_dispatch:- inputs:- version:- description: "Version to publish (default: from package.json)"- required: false- default: ""- workflow_call:- inputs:- version:- description: "Version to publish (default: from package.json)"- required: false- type: string- default: ""--permissions:- id-token: write- contents: write--env:- # Cua programs and packages run here never send usage telemetry.- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--jobs:- prepare:- runs-on: ubuntu-latest- outputs:- version: ${{ steps.get-version.outputs.version }}- tag: ${{ steps.get-version.outputs.tag }}- steps:- - name: Checkout code- uses: actions/checkout@v4-- - name: Determine version- id: get-version- run: |- # Check inputs.version first (works for workflow_call)- if [ -n "${{ inputs.version }}" ]; then- VERSION="${{ inputs.version }}"- elif [ "${{ github.event_name }}" == "push" ]; then- # Extract version from tag- if [[ "${{ github.ref }}" =~ ^refs/tags/npm-playground-v([0-9]+\.[0-9]+\.[0-9]+) ]]; then- VERSION=${BASH_REMATCH[1]}- else- echo "ERROR: Invalid tag format for npm-playground"- exit 1- fi- elif [ -n "${{ github.event.inputs.version }}" ]; then- VERSION="${{ github.event.inputs.version }}"- else- # Read from package.json- VERSION=$(node -p "require('./libs/typescript/playground/package.json').version")- fi-- echo "Playground version: $VERSION"- echo "version=${VERSION}" >> $GITHUB_OUTPUT- echo "tag=npm-playground-v${VERSION}" >> $GITHUB_OUTPUT-- publish:- needs: prepare- uses: ./.github/workflows/ts-reusable-publish.yml- with:- package_name: "playground"- package_dir: "libs/typescript/playground"- package_manager: "pnpm"- version: ${{ needs.prepare.outputs.version }}- secrets:- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}-- create-release:- needs: [prepare, publish]- uses: ./.github/workflows/release-github-reusable.yml- with:- tag_name: ${{ needs.prepare.outputs.tag }}- release_name: "@trycua/playground v${{ needs.prepare.outputs.version }}"- module_path: "libs/typescript/playground"- body: |- ## Installation-- ```bash- npm install @trycua/playground- ```diff --git a/.github/workflows/chaos-cua-compat.yml b/.github/workflows/chaos-cua-compat.ymldeleted file mode 100644index 9327714f90..0000000000--- a/.github/workflows/chaos-cua-compat.yml+++ /dev/null@@ -1,112 +0,0 @@-name: "Chaos: cua-compat leak checks"--# Seeded chaos testing of the compat gateways with a leak check after every-# run: nothing may be left that does not belong to a live wanted Space (no-# Space, VM, process, port, state record or cloud resource).-#-# pull_request hermetic and bounded: the cua-chaos tooling tests, and the-# E2B gateway over mock Spaces under a seeded plan (clients-# killed or abandoning mid-request, the gateway SIGKILLed and-# restarted, the Cua daemon down, a partition to it), a few-# seeds. A failure prints its seed; replay with-# CHAOS_SEEDS=<seed>.-# nightly real Spaces: the unmodified E2B SDK through the gateway on-# Linux vm Spaces (QEMU) with the same fault classes plus-# process kills inside Spaces, over many seeds, then the host-# inventory diff (cua-chaos). Longer campaigns on AWS and-# elastic pool hosts are run by tests/compat/chaos/aws-campaign.sh.--on:- pull_request:- paths:- - "libs/cua/crates/cua-chaos/**"- - "libs/cua/crates/cua-compat/**"- - "tests/compat/chaos/**"- - ".github/workflows/chaos-cua-compat.yml"- schedule:- - cron: "17 3 * * *"- workflow_dispatch:- inputs:- seeds:- description: "Seeds for the real-Spaces run (a..b)"- default: "0..40"--permissions:- contents: read--concurrency:- group: chaos-cua-compat-${{ github.ref }}-${{ github.event_name }}- cancel-in-progress: true--env:- CARGO_TERM_COLOR: always- CARGO_PROFILE_DEV_DEBUG: line-tables-only- CARGO_BUILD_JOBS: "4"- CARGO_INCREMENTAL: "0"- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--jobs:- hermetic:- name: hermetic chaos (mock Spaces, bounded seeds)- if: github.event_name != 'schedule'- runs-on: ubuntu-latest- timeout-minutes: 45- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: ./.github/actions/linux-rust-prep- - name: Install protoc- uses: ./.github/actions/setup-protoc- - name: Install pinned Rust toolchain- uses: dtolnay/[email protected]- - uses: ./.github/actions/rust-cache- with:- workspaces: libs/cua- shared-key: libs-cua-compat- - name: cua-chaos tooling (scheduler, inventories, runner)- run: cd libs/cua && cargo test --locked -p cua-chaos- - name: E2B gateway under seeded chaos, leak check after every seed- env:- CHAOS_SEEDS: "0..4"- run: cd libs/cua && cargo test --locked -p cua-compat --features testing --test chaos -- --nocapture-- spaces:- name: real Spaces chaos (QEMU), many seeds- if: github.event_name != 'pull_request'- runs-on: ubuntu-24.04- timeout-minutes: 240- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: ./.github/actions/linux-rust-prep- - name: Install protoc- uses: ./.github/actions/setup-protoc- - name: Install pinned Rust toolchain- uses: dtolnay/[email protected]- with:- targets: wasm32-unknown-unknown- - uses: ./.github/actions/rust-cache- with:- workspaces: |- libs/cua- libs/cua-spacesd- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.13"- - name: Build cua (Cua Spaces build), cua-chaos and the reference images- run: |- tests/e2e/cua-sdk/ci-setup.sh --images --disks- (cd libs/cua && cargo build --locked -p cua-spaces-cli -p cua-chaos)- echo "CUA=$PWD/libs/cua/target/debug/cua" >>"$GITHUB_ENV"- echo "CHAOS=$PWD/libs/cua/target/debug/cua-chaos" >>"$GITHUB_ENV"- arch=$(uname -m); case "$arch" in aarch64|arm64) a=arm64;; *) a=amd64;; esac- echo "LINUX_DISK=$HOME/.cache/cua-images-e2e/linux/$a/disk.img" >>"$GITHUB_ENV"- - name: Seeded chaos against the E2B gateway on vm Spaces, leak check per seed- env:- SEEDS: ${{ inputs.seeds || '0..40' }}- CHAOS_WORK: ${{ runner.temp }}/chaos- run: tests/compat/chaos/run-real.sh e2b "$SEEDS" -- --on local --kind vm --image "vm:$LINUX_DISK"- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4- if: always()- with:- name: cua-compat-chaos- path: ${{ runner.temp }}/chaosdiff --git a/.github/workflows/ci-cold-start-benchmark.yml b/.github/workflows/ci-cold-start-benchmark.ymldeleted file mode 100644index 0f13129aeb..0000000000--- a/.github/workflows/ci-cold-start-benchmark.yml+++ /dev/null@@ -1,49 +0,0 @@-name: "CI: Cold Start Benchmark"--on:- workflow_dispatch:--env:- # Cua programs and packages run here never send usage telemetry.- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--permissions:- contents: read--jobs:- benchmark:- runs-on: ubuntu-latest- steps:- - name: Checkout repository- uses: actions/checkout@v4-- - name: Set up uv and Python- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4- with:- python-version: "3.12"-- - name: Install dependencies- run: |- rm -rf .venv- uv venv --python 3.12- uv pip install -e libs/python/core -e libs/python/cua-sandbox-- - name: Run cold start benchmark- id: benchmark- timeout-minutes: 10- run: uv run python tests/cold_start_benchmark.py- env:- CUA_API_KEY: ${{ secrets.CUA_API_KEY }}- SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}-- - name: Send results to Slack- if: always()- uses: rtCamp/action-slack-notify@33ca3be66c6f378fe1610fd1d5258632dbed5e58 # v2- env:- SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}- SLACK_CHANNEL: ${{ vars.SLACK_CHANNEL }}- SLACK_TITLE: "Cloud Sandbox Cold Start Benchmark"- SLACK_COLOR: ${{ env.SLACK_COLOR }}- SLACK_MESSAGE: |- ${{ env.SLACK_MESSAGE }}diff --git a/.github/workflows/ci-container-cuabot.yml b/.github/workflows/ci-container-cuabot.ymldeleted file mode 100644index 83489817ea..0000000000--- a/.github/workflows/ci-container-cuabot.yml+++ /dev/null@@ -1,30 +0,0 @@-name: "CI: Container CuaBot"--on:- pull_request:- paths:- - "libs/cuabot/Dockerfile"- - "libs/cuabot/src/**"- - ".github/workflows/ci-container-cuabot.yml"- - ".github/workflows/docker-reusable-build.yml"--permissions:- contents: read--concurrency:- group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}- cancel-in-progress: ${{ github.event_name == 'pull_request' }}--jobs:- quick:- name: quick- if: github.event_name == 'pull_request'- uses: ./.github/workflows/ci-quick.yml-- build:- needs: quick- if: ${{ !failure() && !cancelled() }}- uses: ./.github/workflows/docker-reusable-build.yml- with:- image_name: cuabot- context_dir: libs/cuabotdiff --git a/.github/workflows/ci-container-lumier.yml b/.github/workflows/ci-container-lumier.ymldeleted file mode 100644index f3e534840d..0000000000--- a/.github/workflows/ci-container-lumier.yml+++ /dev/null@@ -1,29 +0,0 @@-name: "CI: Container Lumier"--on:- pull_request:- paths:- - "libs/lumier/**"- - ".github/workflows/ci-container-lumier.yml"- - ".github/workflows/docker-reusable-build.yml"--permissions:- contents: read--concurrency:- group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}- cancel-in-progress: ${{ github.event_name == 'pull_request' }}--jobs:- quick:- name: quick- if: github.event_name == 'pull_request'- uses: ./.github/workflows/ci-quick.yml-- build:- needs: quick- if: ${{ !failure() && !cancelled() }}- uses: ./.github/workflows/docker-reusable-build.yml- with:- image_name: lumier- context_dir: libs/lumierdiff --git a/.github/workflows/ci-cua-compat-modal.yml b/.github/workflows/ci-cua-compat-modal.ymldeleted file mode 100644index 6cf2f93655..0000000000--- a/.github/workflows/ci-cua-compat-modal.yml+++ /dev/null@@ -1,192 +0,0 @@-name: "CI: cua-compat Modal SDK conformance"--# The unmodified Modal SDKs (Python pinned and, off pull requests, latest;-# JavaScript; Go) against the cua-compat gateway: the shared cases over mock-# Spaces, the coverage matrix check, property tests, and the overhead guard.-# The weekly run also installs the latest `modal`, diffs its gRPC surface-# against the pinned descriptors, and runs the suites against it; the-# nightly lane runs the conformance cases and the Function suite on real-# Spaces.--on:- pull_request:- paths:- - "libs/cua/crates/cua-compat/**"- - "libs/cua/crates/cua-spacesd-client/**"- - "tests/compat/modal/**"- - "tests/compat/run_hermetic.sh"- - ".github/workflows/ci-cua-compat-modal.yml"- push:- branches: [main]- paths:- - "libs/cua/crates/cua-compat/**"- - "tests/compat/modal/**"- schedule:- - cron: "17 5 * * 1"- workflow_dispatch:--permissions:- contents: read--concurrency:- group: ci-cua-compat-modal-${{ github.ref }}-${{ github.event_name }}- cancel-in-progress: true--env:- CARGO_TERM_COLOR: always- CARGO_BUILD_JOBS: "4"- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--jobs:- conformance:- name: shared cases (pinned SDK)- runs-on: ubuntu-latest- timeout-minutes: 60- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: ./.github/actions/linux-rust-prep- - name: Install protoc- uses: ./.github/actions/setup-protoc- - name: Install pinned Rust toolchain- uses: dtolnay/[email protected]- - uses: ./.github/actions/rust-cache- with:- workspaces: libs/cua- shared-key: libs-cua-compat- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.13"- - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4- with:- node-version: "22"- - uses: actions/setup-go@v5- with:- go-version: "1.25"- - name: The descriptors are the pinned wheel's, and the coverage matrix covers its surface- run: |- python -m venv /tmp/cov- /tmp/cov/bin/pip install -q "modal==$(cat tests/compat/modal/PINNED)" python-dotenv- # The committed surface is what the pinned wheel's descriptors say.- /tmp/cov/bin/python libs/cua/crates/cua-compat/modal-proto/extract_descriptors.py --version "$(cat tests/compat/modal/PINNED)" --surface-only --out /tmp/descriptors- cmp /tmp/descriptors/surface-$(cat tests/compat/modal/PINNED).json libs/cua/crates/cua-compat/modal-proto/surface-$(cat tests/compat/modal/PINNED).json- /tmp/cov/bin/python tests/compat/modal/gen_coverage.py --check- /tmp/cov/bin/python tests/compat/modal/gen_coverage.py --markdown >/tmp/matrix.md- diff -u libs/cua/crates/cua-compat/maps/modal-coverage.md /tmp/matrix.md- - name: Wire tests, unit tests and property tests (bounded)- working-directory: libs/cua- env:- PROPTEST_CASES: "64"- run: |- cargo fmt -p cua-compat -p cua-spacesd-client -- --check- cargo clippy --locked -p cua-compat -p cua-spacesd-client --features cua-compat/testing --all-targets -- -D warnings- cargo test --locked -p cua-compat -p cua-spacesd-client --features cua-compat/testing- - name: Python SDK over mock Spaces, with the overhead guard- env:- PERF_CHECK: "1"- run: tests/compat/run_hermetic.sh modal "modal==$(cat tests/compat/modal/PINNED)"- - name: JavaScript and Go SDKs over mock Spaces- run: tests/compat/modal/run_js_go.sh- - name: Every RPC the JavaScript and Go SDKs call is served or a documented native error- run: |- mkdir /tmp/js && cp tests/compat/modal/js/package.json /tmp/js/ && (cd /tmp/js && npm install --silent --no-audit --no-fund)- go_dir=$(cd tests/compat/modal/go && go list -m -f '{{.Dir}}' github.com/modal-labs/modal-client/go)- python tests/compat/modal/sdk_calls.py --check --js /tmp/js/node_modules/modal/dist/index.js --go "$go_dir" >/dev/null-- drift:- name: latest SDK (drift)- if: github.event_name != 'pull_request'- runs-on: ubuntu-latest- timeout-minutes: 60- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: ./.github/actions/linux-rust-prep- - name: Install protoc- uses: ./.github/actions/setup-protoc- - name: Install pinned Rust toolchain- uses: dtolnay/[email protected]- - uses: ./.github/actions/rust-cache- with:- workspaces: libs/cua- shared-key: libs-cua-compat- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.13"- - name: The latest client's gRPC surface against what the gateway serves- run: |- python -m venv /tmp/latest- /tmp/latest/bin/pip install -q -U modal python-dotenv- latest=$(/tmp/latest/bin/python -c "import importlib.metadata as m; print(m.version('modal'))")- echo "modal $latest (pinned: $(cat tests/compat/modal/PINNED))"- /tmp/latest/bin/python libs/cua/crates/cua-compat/modal-proto/extract_descriptors.py --version "$latest" --surface-only --out /tmp/latest-surface- /tmp/latest/bin/python libs/cua/crates/cua-compat/modal-proto/drift.py \- libs/cua/crates/cua-compat/modal-proto/surface-$(cat tests/compat/modal/PINNED).json \- /tmp/latest-surface/surface-$latest.json \- --served libs/cua/crates/cua-compat/modal-proto/served-rpcs.txt- - name: The latest SDK's public surface is covered- run: /tmp/latest/bin/python tests/compat/modal/gen_coverage.py --check- - name: Latest Python SDK over mock Spaces- run: tests/compat/modal/run_hermetic.sh --latest- - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4- with:- node-version: "22"- - uses: actions/setup-go@v5- with:- go-version: "1.25"- - name: Latest JavaScript and Go SDKs over mock Spaces- env:- JS_MODAL: latest- GO_MODAL: latest- run: tests/compat/modal/run_js_go.sh- - name: Every RPC the latest JavaScript and Go SDKs call is served or a documented native error- run: |- mkdir /tmp/jsl && cp tests/compat/modal/js/package.json /tmp/jsl/ && (cd /tmp/jsl && npm install --silent --no-audit --no-fund modal@latest)- cp -R tests/compat/modal/go /tmp/gol && (cd /tmp/gol && go get github.com/modal-labs/modal-client/go@latest && go mod tidy)- go_dir=$(cd /tmp/gol && go list -m -f '{{.Dir}}' github.com/modal-labs/modal-client/go)- python tests/compat/modal/sdk_calls.py --check --js /tmp/jsl/node_modules/modal/dist/index.js --go "$go_dir" >/dev/null- - name: Overhead guard (1.5x the committed baseline)- run: PERF_CHECK=1 tests/compat/run_hermetic.sh modal "modal==$(cat tests/compat/modal/PINNED)"-- spaces:- name: conformance on real Spaces (QEMU)- if: github.event_name != 'pull_request'- runs-on: ubuntu-24.04- timeout-minutes: 150- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: ./.github/actions/linux-rust-prep- - name: Install protoc- uses: ./.github/actions/setup-protoc- - name: Install pinned Rust toolchain- uses: dtolnay/[email protected]- with:- targets: wasm32-unknown-unknown- - uses: ./.github/actions/rust-cache- with:- workspaces: |- libs/cua- libs/cua-spacesd- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.12"- - uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6- - name: Build cua (Cua Spaces build), the reference images and disks- run: |- tests/e2e/cua-sdk/ci-setup.sh --images --disks- (cd libs/cua && cargo build --locked -p cua-spaces-cli)- echo "CUA=$PWD/libs/cua/target/debug/cua" >>"$GITHUB_ENV"- arch=$(uname -m); case "$arch" in aarch64|arm64) a=arm64;; *) a=amd64;; esac- echo "LINUX_DISK=$HOME/.cache/cua-images-e2e/linux/$a/disk.img" >>"$GITHUB_ENV"- - name: Start the daemon- run: |- "$CUA" daemon start --foreground >"$RUNNER_TEMP/daemon.log" 2>&1 &- for i in $(seq 100); do "$CUA" daemon status >/dev/null 2>&1 && break; sleep 0.3; done- - name: Conformance and Functions, pinned SDK- run: SDKS="modal==$(cat tests/compat/modal/PINNED)" OUT="$RUNNER_TEMP/modal-space" tests/compat/modal/run_space.sh --on local --kind vm --image "vm:$LINUX_DISK"- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4- if: always()- with:- name: compat-modal-spaces- path: |- ${{ runner.temp }}/modal-space- ${{ runner.temp }}/daemon.logdiff --git a/.github/workflows/ci-py-som.yml b/.github/workflows/ci-py-som.ymldeleted file mode 100644index 514d873c4d..0000000000--- a/.github/workflows/ci-py-som.yml+++ /dev/null@@ -1,22 +0,0 @@-name: "CI: cua-som"--on:- pull_request:- paths:- - "libs/python/som/**"- - ".github/workflows/ci-py-som.yml"- - ".github/workflows/py-reusable-build.yml"--permissions:- contents: read--concurrency:- group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}- cancel-in-progress: ${{ github.event_name == 'pull_request' }}--jobs:- build:- uses: ./.github/workflows/py-reusable-build.yml- with:- package_name: "som"- package_dir: "libs/python/som"diff --git a/.github/workflows/ci-test-models.yml b/.github/workflows/ci-test-models.ymldeleted file mode 100644index 78e26cf703..0000000000--- a/.github/workflows/ci-test-models.yml+++ /dev/null@@ -1,365 +0,0 @@-name: "CI: Test Models"--# This workflow tests all supported Cua models with API keys-# Runs weekly on Monday or manually via workflow_dispatch--on:- workflow_dispatch:- inputs:- test_models:- description: "Test all supported models (requires API keys)"- required: false- default: true- type: boolean- schedule:- - cron: '0 9 * * 1' # Every Monday at 9:00 UTC--env:- # Cua programs and packages run here never send usage telemetry.- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--permissions:- contents: read--jobs:- # Single source of truth for the model list: .github/model-matrix.txt.- # `test-all-models` and `test-summary` both derive from this job's output, so- # the matrix and the summary's EXPECTED_MODELS filter cannot drift apart.- resolve-models:- runs-on: ubuntu-latest- outputs:- models: ${{ steps.list.outputs.models }}- steps:- - name: Checkout repository- uses: actions/checkout@v4-- - name: Read model matrix- id: list- shell: bash- run: |- set -euo pipefail- # Strip comments (whole-line and trailing) and blank lines, then emit- # a compact JSON array for `fromJSON`.- models=$(sed -e 's/[[:space:]]*#.*$//' -e 's/[[:space:]]*$//' \- .github/model-matrix.txt | grep -v '^$' | jq -R . | jq -sc .)- if [ "$models" = "[]" ]; then- echo "::error::.github/model-matrix.txt lists no models." >&2- exit 1- fi- echo "models=$models" >> "$GITHUB_OUTPUT"- echo "Resolved models: $models"-- # Test all Cua models - runs on PRs, pushes to main, or when manually triggered- test-all-models:- needs: resolve-models- runs-on: ubuntu-latest- strategy:- fail-fast: false- matrix:- model: ${{ fromJSON(needs.resolve-models.outputs.models) }}- steps:- - name: Checkout repository- uses: actions/checkout@v4-- - name: Set up uv and Python- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4- with:- python-version: "3.12"-- - name: Cache system packages- uses: actions/cache@v4- with:- path: /var/cache/apt- key: ${{ runner.os }}-apt-${{ hashFiles('**/Dockerfile') }}- restore-keys: |- ${{ runner.os }}-apt--- - name: Install system dependencies- timeout-minutes: 20- run: |- sudo apt-get update- sudo apt-get install -y libgl1-mesa-dri libglib2.0-0-- - name: Cache Python dependencies (uv)- uses: actions/cache@v4- with:- path: |- ~/.cache/uv- .venv- key: ${{ runner.os }}-uv-${{ hashFiles('pyproject.toml', 'uv.lock', 'libs/python/**/pyproject.toml') }}- restore-keys: |- ${{ runner.os }}-uv--- - name: Install Cua dependencies (uv)- run: |- # Remove existing venv if it exists (from cache restore) to avoid interactive prompt- rm -rf .venv- uv venv --python 3.12- uv pip install -e libs/python/agent -e libs/python/cua-sandbox- uv pip install -e libs/python/core- uv pip install "cua-agent[uitars-hf,internvl-hf,opencua-hf,moondream3]"- # The omniparser+ models need cua-som (deprecated, AGPL-3.0), which- # cua-agent no longer pulls in; install it on its own.- uv pip install "cua-som>=0.1.0,<0.2.0"- uv pip install pytest-- - name: Cache HuggingFace models- uses: actions/cache@v4- with:- path: ~/.cache/huggingface- key: ${{ runner.os }}-hf-models-v1- restore-keys: |- ${{ runner.os }}-hf-models-- # Large cache - models can be several GB each and are reused across runs-- - name: Record test start time- run: echo "TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV- env:- # Ensure HuggingFace uses consistent cache location- HF_HOME: ~/.cache/huggingface-- - name: Test model with agent loop- id: test_model- timeout-minutes: 20- continue-on-error: true- run: |- cd tests/agent_loop_testing- uv run python agent_test.py --model "${{ matrix.model }}"- env:- ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}- OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}- GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}- OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}- HF_TOKEN: ${{ secrets.HF_TOKEN }}- CUA_API_KEY: ${{ secrets.CUA_API_KEY }}-- - name: Calculate test duration and prepare message- if: always()- run: |- TEST_END_TIME=$(date +%s)-- # Handle case where TEST_START_TIME might not be set- if [ -z "$TEST_START_TIME" ]; then- TEST_START_TIME=$TEST_END_TIME- fi-- TEST_DURATION=$((TEST_END_TIME - TEST_START_TIME))-- # Convert seconds to minutes and seconds- MINUTES=$((TEST_DURATION / 60))- SECONDS=$((TEST_DURATION % 60))-- # Format duration- if [ $MINUTES -gt 0 ]; then- DURATION_STR="${MINUTES}m ${SECONDS}s"- else- DURATION_STR="${SECONDS}s"- fi-- # Determine status icon based on test step outcome- if [ "${{ steps.test_model.outcome }}" == "success" ]; then- STATUS_ICON="✅"- STATUS_TEXT="PASSED"- SLACK_COLOR="#36a64f"- else- STATUS_ICON="❌"- STATUS_TEXT="FAILED"- SLACK_COLOR="#dc3545"- fi-- # Prepare Slack message- echo "TESTS_CONTENT<<EOF" >> $GITHUB_ENV- echo "*Cua Model Test Results*" >> $GITHUB_ENV- echo "" >> $GITHUB_ENV- echo "*Model:* ${{ matrix.model }}" >> $GITHUB_ENV- echo "*Status:* ${STATUS_ICON} ${STATUS_TEXT}" >> $GITHUB_ENV- echo "*Duration:* ${DURATION_STR}" >> $GITHUB_ENV- echo "*Run:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_ENV- echo "EOF" >> $GITHUB_ENV-- # Set color based on outcome- echo "SLACK_COLOR=${SLACK_COLOR}" >> $GITHUB_ENV-- # Save result to JSON file for summary- mkdir -p test_summary- MODEL_NAME="${{ matrix.model }}"- # Sanitize model name for filename- SAFE_MODEL_NAME=$(echo "$MODEL_NAME" | sed 's/[^a-zA-Z0-9]/_/g')-- # Determine pass status- if [ "${{ steps.test_model.outcome }}" == "success" ]; then- PASSED_VAL="true"- else- PASSED_VAL="false"- fi-- # Create JSON file using printf to avoid YAML parsing issues- printf '{\n "model": "%s",\n "status": "%s",\n "status_icon": "%s",\n "duration": "%s",\n "duration_seconds": %d,\n "passed": %s\n}' \- "${MODEL_NAME}" "${STATUS_TEXT}" "${STATUS_ICON}" "${DURATION_STR}" "${TEST_DURATION}" "${PASSED_VAL}" \- > "test_summary/${SAFE_MODEL_NAME}.json"- # Expose safe model name for subsequent steps (artifact naming)- echo "SAFE_MODEL_NAME=${SAFE_MODEL_NAME}" >> $GITHUB_ENV-- - name: Upload test results- if: always()- uses: actions/upload-artifact@v4- with:- name: test-results-${{ matrix.model }}- path: |- tests/agent_loop_testing/test_images/- *.log- if-no-files-found: ignore- retention-days: 7-- - name: Upload test summary data- if: always()- uses: actions/upload-artifact@v4- with:- # Unique, slash-free artifact name per matrix entry- name: test-summary-${{ env.SAFE_MODEL_NAME }}- path: test_summary/- if-no-files-found: ignore- retention-days: 1-- - name: Set default Slack color- if: always() && env.SLACK_COLOR == ''- run: echo "SLACK_COLOR=#36a64f" >> $GITHUB_ENV-- # Individual model notifications disabled - only summary is sent- # - name: Notify Slack with test results- # if: always()- # uses: rtCamp/action-slack-notify@33ca3be66c6f378fe1610fd1d5258632dbed5e58 # v2- # env:- # SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}- # SLACK_CHANNEL: ${{ vars.SLACK_CHANNEL }}- # SLACK_TITLE: Cua Model Test Update- # SLACK_COLOR: ${{ env.SLACK_COLOR }}- # SLACK_MESSAGE: |- # ${{ env.TESTS_CONTENT }}-- # Summary job that aggregates all model test results- test-summary:- if: ${{ always() }}- needs: [resolve-models, test-all-models]- runs-on: ubuntu-latest- steps:- - name: Install jq- run: sudo apt-get update && sudo apt-get install -y jq-- - name: Download all test summary artifacts- continue-on-error: true- uses: actions/download-artifact@v4- with:- pattern: test-summary-*- merge-multiple: true- path: all_summaries-- - name: Generate and send summary- if: always()- shell: bash- run: |- # Create directory if it doesn't exist- mkdir -p all_summaries-- # Get list of models being tested in this run from the matrix- # This helps filter out artifacts from previous runs when testing locally- EXPECTED_MODELS="${{ join(fromJSON(needs.resolve-models.outputs.models), ' ') }}"-- # Aggregate all results- PASSED_COUNT=0- FAILED_COUNT=0- TOTAL_DURATION=0- SUMMARY_MESSAGE="*🚀 Model Summaries*\n\n"-- # Process each JSON file (find all JSON files recursively)- # Save to temp file first to avoid subshell issues- find all_summaries -name "*.json" -type f 2>/dev/null > /tmp/json_files.txt || true-- # Use associative array to deduplicate by model name- declare -A processed_models-- while IFS= read -r json_file; do- if [ -f "$json_file" ]; then- MODEL=$(jq -r '.model' "$json_file")-- # Skip if we've already processed this model- if [ "${processed_models[$MODEL]}" = "1" ]; then- echo "Skipping duplicate model: $MODEL"- continue- fi-- # Filter: Only include models that are in the current matrix- # This prevents including artifacts from previous workflow runs- if [ -n "$EXPECTED_MODELS" ]; then- if ! echo "$EXPECTED_MODELS" | grep -q "$MODEL"; then- echo "Skipping model from previous run: $MODEL"- continue- fi- fi-- # Mark as processed- processed_models[$MODEL]="1"-- STATUS_ICON=$(jq -r '.status_icon' "$json_file")- STATUS=$(jq -r '.status' "$json_file")- DURATION=$(jq -r '.duration' "$json_file")- DURATION_SEC=$(jq -r '.duration_seconds' "$json_file")- PASSED=$(jq -r '.passed' "$json_file")-- # Add to summary as clean line format- SUMMARY_MESSAGE="${SUMMARY_MESSAGE}${STATUS_ICON} ${STATUS} - \`${MODEL}\` - ${DURATION}\n"-- if [ "$PASSED" = "true" ]; then- PASSED_COUNT=$((PASSED_COUNT + 1))- else- FAILED_COUNT=$((FAILED_COUNT + 1))- fi- TOTAL_DURATION=$((TOTAL_DURATION + DURATION_SEC))- fi- done < /tmp/json_files.txt-- # Check if we found any results- TOTAL_COUNT=$((PASSED_COUNT + FAILED_COUNT))- if [ $TOTAL_COUNT -eq 0 ]; then- SUMMARY_MESSAGE="${SUMMARY_MESSAGE}⚠️ No test results found (workflow may have been canceled)\n"- SLACK_COLOR="#ffa500"- else- # Add summary stats- SUMMARY_MESSAGE="${SUMMARY_MESSAGE}\n*Results:* ${PASSED_COUNT} passed, ${FAILED_COUNT} failed out of ${TOTAL_COUNT} models\n"-- # Calculate total duration- TOTAL_MIN=$((TOTAL_DURATION / 60))- TOTAL_SEC=$((TOTAL_DURATION % 60))- if [ $TOTAL_MIN -gt 0 ]; then- TOTAL_DURATION_STR="${TOTAL_MIN}m ${TOTAL_SEC}s"- else- TOTAL_DURATION_STR="${TOTAL_SEC}s"- fi- SUMMARY_MESSAGE="${SUMMARY_MESSAGE}*Total Duration:* ${TOTAL_DURATION_STR}\n"-- # Determine color based on results- if [ $FAILED_COUNT -eq 0 ]; then- SLACK_COLOR="#36a64f"- elif [ $PASSED_COUNT -eq 0 ]; then- SLACK_COLOR="#dc3545"- else- SLACK_COLOR="#ffa500"- fi- fi-- SUMMARY_MESSAGE="${SUMMARY_MESSAGE}*Run:* ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"-- # Export for use in next step- echo "SUMMARY_MESSAGE<<EOF" >> $GITHUB_ENV- echo -e "${SUMMARY_MESSAGE}" >> $GITHUB_ENV- echo "EOF" >> $GITHUB_ENV- echo "SLACK_COLOR=${SLACK_COLOR}" >> $GITHUB_ENV-- # The weekly Slack summary was retired (CUA-1564): it posted to a- # dedicated #tests channel nobody read. Failures show as a red run; the- # summary stays on the run page.- - name: Write summary to the job summary- if: always()- run: printf '%s\n' "$SUMMARY_MESSAGE" >> "$GITHUB_STEP_SUMMARY"-diff --git a/.github/workflows/ci-ts-core.yml b/.github/workflows/ci-ts-core.ymldeleted file mode 100644index 2421693dc6..0000000000--- a/.github/workflows/ci-ts-core.yml+++ /dev/null@@ -1,28 +0,0 @@-name: "CI: @trycua/core"--on:- pull_request:- paths:- - "libs/typescript/core/**"- - ".github/workflows/ci-ts-core.yml"- - ".github/workflows/ts-reusable-build.yml"--env:- # Cua programs and packages run here never send usage telemetry.- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--permissions:- contents: read--concurrency:- group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}- cancel-in-progress: ${{ github.event_name == 'pull_request' }}--jobs:- build:- uses: ./.github/workflows/ts-reusable-build.yml- with:- package_name: "core"- package_dir: "libs/typescript/core"- package_manager: "pnpm"diff --git a/.github/workflows/claude-auto-fix.yml b/.github/workflows/claude-auto-fix.ymlindex 5d4c0c6b73..8ad80b29f9 100644--- a/.github/workflows/claude-auto-fix.yml+++ b/.github/workflows/claude-auto-fix.yml@@ -39,10 +39,8 @@ jobs:"CI: Test Scripts": "ci-test-scripts.yml","CI: cua-agent": "ci-py-agent.yml","CI: cua-core": "ci-py-core.yml",- "CI: cua-som": "ci-py-som.yml","CI: cua-bench": "ci-py-bench.yml",- "CI: cua-bench-ui": "ci-py-bench-ui.yml",- "CI: @trycua/core": "ci-ts-core.yml"+ "CI: cua-bench-ui": "ci-py-bench-ui.yml"};console.log(`Looking for failed runs on branch: ${targetBranch}`);diff --git a/.github/workflows/compat-drift.yml b/.github/workflows/compat-drift.ymldeleted file mode 100644index 5ae4e7463e..0000000000--- a/.github/workflows/compat-drift.yml+++ /dev/null@@ -1,333 +0,0 @@-name: "Compat drift (E2B, Daytona, Modal SDKs)"--# Keeps the claim "the provider's unmodified SDK works on Cua" honest as the-# SDKs move. The versions Cua claims live in ONE file, tests/compat/SDK_VERSIONS.json.-#-# weekly / dispatch-# versions latest release of every SDK (PyPI and npm) next to the claimed ones-# surface the latest release's public surface (Python and TypeScript, E2B,-# Daytona, Modal) against the committed fixture of the newest claimed-# version, and every claimed version against its own fixture; a-# readable REMOVED / CHANGED / ADDED list, nonzero on any difference-# coverage the E2B coverage matrix still maps every public symbol-# gateway the provider suites with the LATEST SDKs against the gateway over-# mock Spaces (hermetic) and on real Linux Spaces (QEMU, KVM runner)-# live-e2b with the E2B_API_KEY secret: the shared cases (Python and TypeScript-# runners, pinned and latest SDKs) against live E2B, compared with the-# committed recordings; plus the cross-language check-# pull request (paths below)-# fixtures claimed SDK versions against their committed fixtures; Python and-# TypeScript recordings of the shared cases agree with each other-#-# It opens nothing automatically: a failing run is the report. The E2B Python surface-# and live conformance also run in ci-cua-compat.yml; the per-provider fuzz and-# perf work is in the provider suites, not here.--on:- pull_request:- paths:- - "tests/compat/SDK_VERSIONS.json"- - "tests/compat/drift/**"- - "tests/compat/e2b/fixtures/**"- - "tests/compat/daytona/fixtures/**"- - ".github/workflows/compat-drift.yml"- schedule:- - cron: "23 6 * * 1"- workflow_dispatch:--permissions:- contents: read--concurrency:- group: compat-drift-${{ github.ref }}-${{ github.event_name }}- cancel-in-progress: true--env:- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"- CARGO_TERM_COLOR: always- CARGO_BUILD_JOBS: "4"--jobs:- versions:- name: latest releases vs claimed- runs-on: ubuntu-latest- timeout-minutes: 10- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.12"- - name: Latest releases next to the claimed versions- working-directory: tests/compat/drift- run: |- python latest_versions.py | tee "$RUNNER_TEMP/versions.txt"- { echo '### SDK versions'; echo '```'; cat "$RUNNER_TEMP/versions.txt"; echo '```'; } >>"$GITHUB_STEP_SUMMARY"-- fixtures:- name: claimed versions match their fixtures- runs-on: ubuntu-latest- timeout-minutes: 30- strategy:- fail-fast: false- matrix:- include:- - {provider: daytona, lang: py}- - {provider: daytona, lang: ts}- - {provider: modal, lang: py}- - {provider: modal, lang: ts}- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.12"- - uses: actions/setup-node@v4- with:- node-version: "22"- - name: Each fixture is reproduced by its own release- working-directory: tests/compat/drift- run: |- set -e- status=0- for f in fixtures/${{ matrix.provider }}-${{ matrix.lang }}-*.json; do- ver="${f##*-}"; ver="${ver%.json}"- echo "== ${{ matrix.provider }} ${{ matrix.lang }} $ver"- ./dump.sh ${{ matrix.provider }} ${{ matrix.lang }} "$ver" >"$RUNNER_TEMP/cur.json"- python surface_diff.py "$f" "$RUNNER_TEMP/cur.json" || status=1- done- exit $status-- crosslang-fixtures:- name: Python and TypeScript recordings agree- runs-on: ubuntu-latest- timeout-minutes: 5- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.12"- - name: E2B shared cases, recorded Python vs TypeScript- run: |- status=0- shopt -s nullglob- for py in tests/compat/e2b/fixtures/cases-py-*.json; do- ver="${py##*cases-py-}"; ts="tests/compat/e2b/fixtures/cases-ts-$ver"- [ -f "$ts" ] || { echo "::warning::no TypeScript recording for $ver"; continue; }- echo "== e2b $ver"- python tests/compat/drift/crosslang.py "$py" "$ts" --allow tests/compat/drift/crosslang-allow-e2b.json || status=1- done- exit $status-- surface:- name: latest ${{ matrix.provider }} ${{ matrix.lang }} surface- if: github.event_name != 'pull_request'- runs-on: ubuntu-latest- timeout-minutes: 20- strategy:- fail-fast: false- matrix:- include:- - {provider: daytona, lang: py}- - {provider: daytona, lang: ts}- - {provider: modal, lang: py}- - {provider: modal, lang: ts}- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.12"- - uses: actions/setup-node@v4- with:- node-version: "22"- - name: The latest release against the newest claimed fixture- working-directory: tests/compat/drift- run: |- newest=$(ls fixtures/${{ matrix.provider }}-${{ matrix.lang }}-*.json | sort -V | tail -1)- ./dump.sh ${{ matrix.provider }} ${{ matrix.lang }} latest >"$RUNNER_TEMP/latest.json"- echo "newest claimed fixture: $newest"- python surface_diff.py "$newest" "$RUNNER_TEMP/latest.json" | tee "$RUNNER_TEMP/diff.txt" || rc=$?- { echo '### ${{ matrix.provider }} ${{ matrix.lang }}: latest vs newest claimed'; echo '```'; cat "$RUNNER_TEMP/diff.txt"; echo '```'; } >>"$GITHUB_STEP_SUMMARY"- if [ "${rc:-0}" != 0 ]; then- echo "::error::the latest ${{ matrix.provider }} ${{ matrix.lang }} SDK changed its public surface: decide what the gateway does with each new or changed member (coverage matrix), record a fixture, add the version to tests/compat/SDK_VERSIONS.json"- exit 1- fi-- e2b-ts-surface:- name: latest e2b TypeScript surface and coverage matrix- if: github.event_name != 'pull_request'- runs-on: ubuntu-latest- timeout-minutes: 20- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.12"- - uses: actions/setup-node@v4- with:- node-version: "22"- - name: Latest e2b (npm) against the newest TypeScript snapshot- run: |- if [ ! -f tests/compat/e2b/surface_ts.mjs ]; then- echo "::warning::tests/compat/e2b/surface_ts.mjs is not in the tree yet: using the generic surface tool"- tests/compat/drift/dump.sh e2b ts latest >"$RUNNER_TEMP/e2b-ts-latest.json"- newest=$(ls tests/compat/drift/fixtures/e2b-ts-*.json 2>/dev/null | sort -V | tail -1)- [ -n "$newest" ] || { echo "::warning::no committed e2b TypeScript fixture yet"; exit 0; }- python tests/compat/drift/surface_diff.py "$newest" "$RUNNER_TEMP/e2b-ts-latest.json"- exit 0- fi- mkdir -p "$RUNNER_TEMP/e2b-ts" && cd "$RUNNER_TEMP/e2b-ts"- npm init -y >/dev/null && npm install --ignore-scripts --no-audit --no-fund --silent e2b@latest typescript@5- cd "$GITHUB_WORKSPACE"- newest=$(ls tests/compat/e2b/fixtures/surface-ts-*.json | sort -V | tail -1)- node tests/compat/e2b/surface_ts.mjs --diff "$newest" "$RUNNER_TEMP/e2b-ts/node_modules/e2b" "$RUNNER_TEMP/e2b-ts/node_modules/typescript"- - name: Every public symbol of every claimed e2b is mapped (coverage matrix)- run: |- if [ -f tests/compat/e2b/coverage.py ]; then python tests/compat/e2b/coverage.py --check- else echo "::warning::tests/compat/e2b/coverage.py is not in the tree yet: coverage matrix not checked"; fi-- gateway-hermetic:- name: gateway over mock Spaces with the latest SDKs- if: github.event_name != 'pull_request'- runs-on: ubuntu-latest- timeout-minutes: 60- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: ./.github/actions/linux-rust-prep- - name: Install protoc- uses: ./.github/actions/setup-protoc- - name: Install pinned Rust toolchain- uses: dtolnay/[email protected]- - uses: ./.github/actions/rust-cache- with:- workspaces: libs/cua- shared-key: libs-cua-compat- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.12"- - uses: actions/setup-node@v4- with:- node-version: "22"- - name: E2B SDK, pinned and latest- run: tests/compat/run_hermetic.sh e2b- - name: Daytona SDKs (Python sync, async, TypeScript), pinned and latest- run: |- if [ -f tests/compat/daytona/run_hermetic.sh ]; then- tests/compat/daytona/run_hermetic.sh --latest- else- echo "::warning::tests/compat/daytona/run_hermetic.sh is not in the tree yet: running the shared hermetic script"- tests/compat/run_hermetic.sh daytona- fi- - name: Modal SDK, latest- run: |- if [ -f tests/compat/modal/run_hermetic.sh ]; then- tests/compat/modal/run_hermetic.sh --latest- else- echo "::warning::tests/compat/modal/run_hermetic.sh is not in the tree yet: the Modal gateway has no hermetic drift run"- fi-- gateway-spaces:- name: gateway on real Spaces (QEMU) with the latest SDKs- if: github.event_name != 'pull_request'- runs-on: ubuntu-24.04- timeout-minutes: 150- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: ./.github/actions/linux-rust-prep- - name: Install protoc- uses: ./.github/actions/setup-protoc- - name: Install pinned Rust toolchain- uses: dtolnay/[email protected]- with:- targets: wasm32-unknown-unknown- - uses: ./.github/actions/rust-cache- with:- workspaces: |- libs/cua- libs/cua-spacesd- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.12"- - uses: actions/setup-node@v4- with:- node-version: "22"- - uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6- - name: Build cua (Cua Spaces build), the reference images and disks- run: |- tests/e2e/cua-sdk/ci-setup.sh --images --disks- (cd libs/cua && cargo build --locked -p cua-spaces-cli)- echo "CUA=$PWD/libs/cua/target/debug/cua" >>"$GITHUB_ENV"- arch=$(uname -m); case "$arch" in aarch64|arm64) a=arm64;; *) a=amd64;; esac- echo "LINUX_DISK=$HOME/.cache/cua-images-e2e/linux/$a/disk.img" >>"$GITHUB_ENV"- - name: Start the daemon- run: |- "$CUA" daemon start --foreground >"$RUNNER_TEMP/daemon.log" 2>&1 &- for i in $(seq 100); do "$CUA" daemon status >/dev/null 2>&1 && break; sleep 0.3; done- - name: E2B conformance, latest SDK- run: SDKS="e2b" OUT="$RUNNER_TEMP/drift-e2b" tests/compat/run_space.sh e2b --on local --kind vm --image "vm:$LINUX_DISK"- - name: Daytona conformance, latest SDK- run: SDKS="daytona" OUT="$RUNNER_TEMP/drift-daytona" tests/compat/run_space.sh daytona --on local --kind vm --image "vm:$LINUX_DISK"- - name: E2B shared cases, Python and TypeScript runners, latest SDKs- run: |- if [ -f tests/compat/run_cases_space.sh ]; then- export PY_SDKS=latest TS_SDKS=latest CASES_WORK="$RUNNER_TEMP/cases-e2b"- tests/compat/run_cases_space.sh -- --on local --kind vm --image "vm:$LINUX_DISK"- else- echo "::warning::tests/compat/run_cases_space.sh is not in the tree yet"- fi- - name: Python and TypeScript agree (cross-language)- run: |- d="$RUNNER_TEMP/cases-e2b"- py=$(ls "$d"/cases-py-*.json 2>/dev/null | sort -V | tail -1); ts=$(ls "$d"/cases-ts-*.json 2>/dev/null | sort -V | tail -1)- if [ -z "$py" ] || [ -z "$ts" ]; then echo "::warning::no shared-case runs to compare"; exit 0; fi- python tests/compat/drift/crosslang.py "$py" "$ts" --allow tests/compat/drift/crosslang-allow-e2b.json- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4- if: always()- with:- name: compat-drift-spaces- path: |- ${{ runner.temp }}/drift-*- ${{ runner.temp }}/cases-e2b- ${{ runner.temp }}/daemon.log-- live-e2b:- name: live E2B shared cases and cross-language- if: github.event_name != 'pull_request'- runs-on: ubuntu-latest- timeout-minutes: 45- env:- E2B_API_KEY: ${{ secrets.E2B_API_KEY }}- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.12"- - uses: actions/setup-node@v4- with:- node-version: "22"- - name: Shared cases against live E2B (pinned and latest, Python and TypeScript)- if: env.E2B_API_KEY != ''- run: |- if [ ! -f tests/compat/run_cases.sh ]; then- echo "::warning::tests/compat/run_cases.sh is not in the tree yet: using the conformance suite"- python -m venv "$RUNNER_TEMP/v" && "$RUNNER_TEMP/v/bin/pip" install -q -U e2b- "$RUNNER_TEMP/v/bin/python" tests/compat/e2b/conformance.py >"$RUNNER_TEMP/live.json"- python tests/compat/e2b/compare.py "$(ls tests/compat/e2b/fixtures/e2b-*.json | sort -V | tail -1)" "$RUNNER_TEMP/live.json"- exit 0- fi- export CASES_WORK="$RUNNER_TEMP/cases-live"- tests/compat/run_cases.sh --rules tests/compat/e2b/rules.json- - name: Python and TypeScript agree on the live run- if: env.E2B_API_KEY != ''- run: |- d="$RUNNER_TEMP/cases-live"- ls "$d"/cases-py-*.json >/dev/null 2>&1 || { echo "::warning::no shared-case runs to compare"; exit 0; }- py=$(ls "$d"/cases-py-*.json | sort -V | tail -1); ts=$(ls "$d"/cases-ts-*.json | sort -V | tail -1)- python tests/compat/drift/crosslang.py "$py" "$ts" --allow tests/compat/drift/crosslang-allow-e2b.json- - name: No E2B_API_KEY secret- if: env.E2B_API_KEY == ''- run: echo "::warning::E2B_API_KEY is not set; the live E2B drift check did not run"- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4- if: always() && env.E2B_API_KEY != ''- with:- name: compat-drift-live-e2b- path: ${{ runner.temp }}/cases-livediff --git a/.github/workflows/e2b-conformance.yml b/.github/workflows/e2b-conformance.ymldeleted file mode 100644index 05bd2aab12..0000000000--- a/.github/workflows/e2b-conformance.yml+++ /dev/null@@ -1,207 +0,0 @@-name: "e2b conformance (cua-e2b)"--# cua-e2b claims the e2b 2.42.0, 2.56.0 and 2.58.0 Python APIs (2.58 is the-# newest golden). This workflow keeps that claim honest:-#-# - hermetic: the whole cua-e2b test suite over the in-memory backend, with-# hypothesis, the shim-overhead perf guard (1.5x of the committed baseline)-# and the coverage matrix check (PRs that touch cua-e2b, and weekly).-# - api: each pinned e2b release must still dump exactly its committed API-# and public-surface golden, and the latest e2b release is diffed against-# the newest golden, so a new or changed signature, dataclass field,-# module, class or exception base fails loudly (weekly, and on PRs that-# touch cua-e2b). When a newer release changes the API, record its goldens-# (`python -m conformance.api`, `python -m conformance.surface`), make-# cua-e2b meet it, and add it to PINNED_E2B.-# - live-e2b: with the E2B_API_KEY secret, the conformance suite runs against-# E2B through the latest e2b release and is compared with the committed-# behaviour golden: a changed return shape or error fails (weekly).-# - live-cua: on a runner that can boot Linux VMs (`vars.CUA_E2B_VM_RUNNER`,-# a self-hosted macOS label), the same suite runs through cua-e2b against-# real Linux `vm` Spaces (weekly and on demand).--on:- pull_request:- paths:- - "libs/python/cua-e2b/**"- - ".github/workflows/e2b-conformance.yml"- schedule:- - cron: "17 6 * * 1"- workflow_dispatch:--permissions:- contents: read--env:- PINNED_E2B: "2.42.0 2.56.0 2.58.0"- NEWEST_E2B: "2.58.0"- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--concurrency:- group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}- cancel-in-progress: ${{ github.event_name == 'pull_request' }}--jobs:- hermetic:- name: Hermetic suite, properties, perf guard, coverage matrix- runs-on: ubuntu-latest- timeout-minutes: 20- defaults:- run:- working-directory: libs/python/cua-e2b- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6- - name: Tests (surface of three e2b releases, semantics, sync API, properties, matrix)- run: |- uv run --no-project --isolated --python 3.12 --with pytest --with pytest-asyncio \- --with hypothesis --with-editable . python -m pytest -q -p no:cacheprovider tests- - name: Shim overhead stays within 1.5x of the committed baseline- env:- CUA_E2B_PERF: "1"- run: |- uv run --no-project --isolated --python 3.12 --with pytest --with pytest-asyncio \- --with-editable . python -m pytest -q -p no:cacheprovider -m perf tests/test_perf_guard.py-- api:- name: API golden (pinned and latest e2b)- runs-on: ubuntu-latest- defaults:- run:- working-directory: libs/python/cua-e2b/tests- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6- - name: The pinned releases still match their goldens- run: |- for v in $PINNED_E2B; do- uv run --no-project --isolated --python 3.12 --with "e2b==$v" \- python -m conformance.api > /tmp/pinned.json- diff -u conformance/golden/e2b-$v-api.json /tmp/pinned.json- done- - name: The pinned releases still match their public-surface goldens- run: |- for v in $PINNED_E2B; do- uv run --no-project --isolated --python 3.12 --with "e2b==$v" \- python -m conformance.surface > /tmp/pinned-surface.json- cmp conformance/golden/e2b-$v-surface.json /tmp/pinned-surface.json- done- # A new e2b release drifting is news for the weekly run, not a reason- # to block an unrelated PR.- - name: The latest release has not drifted from the golden- if: github.event_name != 'pull_request'- run: |- uv run --no-project --isolated --python 3.12 --with e2b \- python -c "import importlib.metadata as m; print('latest e2b', m.version('e2b'))"- uv run --no-project --isolated --python 3.12 --with e2b \- python -m conformance.api > /tmp/latest.json- uv run --no-project --python 3.12 python - <<'EOF'- import json, sys- from conformance import api- golden = json.load(open(f"conformance/golden/e2b-{__import__('os').environ['NEWEST_E2B']}-api.json"))- latest = json.load(open("/tmp/latest.json"))- problems = api.compare(golden, latest)- added = sorted(set(latest["callables"]) - set(golden["callables"]))- for p in problems:- print("DRIFT:", p)- if problems:- sys.exit("the latest e2b changed the API cua-e2b covers; update cua-e2b and the golden")- print("no drift in the covered API", "(new members: %s)" % added if added else "")- EOF- - name: The latest release has no public name, signature or field the newest golden lacks- if: github.event_name != 'pull_request'- run: |- uv run --no-project --isolated --python 3.12 --with e2b \- python -m conformance.surface > /tmp/latest-surface.json- uv run --no-project --python 3.12 python - <<'EOF'- import json, os, sys- from conformance import surface- golden = json.load(open(f"conformance/golden/e2b-{os.environ['NEWEST_E2B']}-surface.json"))- latest = json.load(open("/tmp/latest-surface.json"))- problems = surface.compare(latest, golden) # what the latest has that the golden lacks- for p in problems:- print("DRIFT:", p)- if problems:- sys.exit("the latest e2b changed or added public API; record its goldens and make cua-e2b meet it")- print("no drift in the public surface")- EOF- - name: cua-e2b matches the golden- run: |- uv run --no-project --isolated --python 3.12 --with pytest --with pytest-asyncio \- --with-editable .. python -m pytest -q -p no:cacheprovider test_conformance.py -k api-- live-e2b:- name: Behaviour golden (live E2B, latest e2b)- if: github.event_name != 'pull_request'- runs-on: ubuntu-latest- timeout-minutes: 30- defaults:- run:- working-directory: libs/python/cua-e2b/tests- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6- - name: Run the suite against E2B and compare- env:- E2B_API_KEY: ${{ secrets.E2B_API_KEY }}- run: |- if [ -z "$E2B_API_KEY" ]; then- echo "::warning::E2B_API_KEY is not set: the live E2B drift check did not run"- exit 0- fi- uv run --no-project --isolated --python 3.12 --with e2b \- python -m conformance.suite > /tmp/e2b.json- uv run --no-project --python 3.12 python - <<'EOF'- import json, sys- from conformance import suite- golden = json.load(open("conformance/golden/e2b-2.56.0-behavior.json"))["results"]- diffs = suite.compare(golden, json.load(open("/tmp/e2b.json"))["results"])- for d in diffs:- print("DRIFT:", d)- sys.exit(1 if diffs else 0)- EOF-- live-cua:- name: Behaviour golden (cua-e2b on Linux vm Spaces)- if: github.event_name != 'pull_request' && vars.CUA_E2B_VM_RUNNER != ''- runs-on: ${{ fromJSON(format('["self-hosted","macOS","ARM64","{0}"]', vars.CUA_E2B_VM_RUNNER)) }}- timeout-minutes: 90- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6- - name: Build the SDK wheel- working-directory: libs/cua- run: |- cargo build --locked --release -p cua-sdk -p cua-cli- node scripts/stage-uniffi-library.mjs --only=python- cd python && uv run --no-project --python 3.12 --with build python build_wheel.py --cli ../target/release/cua --out-dir dist- - name: Run the suite through cua-e2b and compare- working-directory: libs/python/cua-e2b/tests- run: |- export CUA_HOME="$RUNNER_TEMP/cua-home" CUA_E2B_ON=local CONFORMANCE_SCHEME=http- WHEEL=$(ls ../../../cua/python/dist/cua-[0-9]*.whl); CLI_WHEEL=$(ls ../../../cua/python/dist/cua_cli-*.whl)- uv run --no-project --isolated --python 3.12 --with "$WHEEL" --with "$CLI_WHEEL" --with-editable .. \- python -m conformance.suite > "$RUNNER_TEMP/cua.json"- uv run --no-project --python 3.12 python - <<'EOF'- import json, os, sys- from conformance import suite- got = json.load(open(os.path.join(os.environ["RUNNER_TEMP"], "cua.json")))- diffs = []- for version, allow in (("2.56.0", ()), ("2.42.0", suite.SINCE_2_56)):- golden = json.load(open(f"conformance/golden/e2b-{version}-behavior.json"))["results"]- skip = set(got["results"]) - set(golden) # a release without the case- diffs += [f"[e2b {version}] {d}" for d in suite.compare(golden, got["results"], skip=skip, allow=allow)]- for d in diffs:- print("DRIFT:", d)- print("timings:", got["timings"])- sys.exit(1 if diffs else 0)- EOF- - name: Delete what the run left- if: always()- run: |- export CUA_HOME="$RUNNER_TEMP/cua-home"- for s in $(libs/cua/target/release/cua spaces ls --json 2>/dev/null | python3 -c 'import json,sys; print(" ".join(x["id"] for x in json.load(sys.stdin) if x["name"].startswith("e2b-")))' 2>/dev/null); do- libs/cua/target/release/cua spaces delete "$s" --force || true- done- libs/cua/target/release/cua daemon stop || truediff --git a/.github/workflows/e2e-cua-compat-daytona.yml b/.github/workflows/e2e-cua-compat-daytona.ymldeleted file mode 100644index ecd984da22..0000000000--- a/.github/workflows/e2e-cua-compat-daytona.yml+++ /dev/null@@ -1,66 +0,0 @@-name: "E2E: cua-compat Daytona on Spaces"--# The shared Daytona SDK cases (Python sync and async, TypeScript) on real-# Spaces (QEMU VMs on a KVM runner), including the cases that need a real-# shell, git, LSP servers, a desktop and recordings.--on:- schedule:- - cron: "37 5 * * *"- workflow_dispatch:--permissions:- contents: read--concurrency:- group: e2e-cua-compat-daytona-${{ github.ref }}- cancel-in-progress: true--env:- CARGO_TERM_COLOR: always- CARGO_BUILD_JOBS: "4"- CUA_TELEMETRY: "0"- # a VM restored from the auto pool cannot be checkpointed again (BUGS.md, cua-vmm): the snapshot and fork cases need cold VMs- CUA_POOL_AUTO: "off"- DO_NOT_TRACK: "1"--jobs:- spaces:- name: Daytona SDK cases on QEMU Spaces- runs-on: ubuntu-24.04- timeout-minutes: 150- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: ./.github/actions/linux-rust-prep- - name: Install protoc- uses: ./.github/actions/setup-protoc- - name: Install pinned Rust toolchain- uses: dtolnay/[email protected]- with:- targets: wasm32-unknown-unknown- - uses: ./.github/actions/rust-cache- with:- workspaces: |- libs/cua- libs/cua-spacesd- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.13"- - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4- with:- node-version: "22"- - name: Install ffmpeg (recordings)- run: sudo apt-get install -y -q ffmpeg- - name: Build cua (Cua Spaces build) and the reference images- run: |- tests/e2e/cua-sdk/ci-setup.sh --images --disks- (cd libs/cua && cargo build --locked -p cua-spaces-cli)- echo "CUA=$PWD/libs/cua/target/debug/cua" >>"$GITHUB_ENV"- arch=$(uname -m); case "$arch" in aarch64|arm64) a=arm64;; *) a=amd64;; esac- echo "LINUX_DISK=$HOME/.cache/cua-images-e2e/linux/$a/disk.img" >>"$GITHUB_ENV"- - name: Start the daemon- run: |- "$CUA" daemon start --foreground >"$RUNNER_TEMP/daemon.log" 2>&1 &- for i in $(seq 100); do "$CUA" daemon status >/dev/null 2>&1 && break; sleep 0.3; done- - name: Daytona SDK cases (pinned) on QEMU Spaces- run: OUT="$RUNNER_TEMP/compat-daytona" tests/compat/daytona/run_space.sh --on local --kind vm --image "vm:$LINUX_DISK"diff --git a/.github/workflows/e2e-cua-compat-e2b-cases.yml b/.github/workflows/e2e-cua-compat-e2b-cases.ymldeleted file mode 100644index 211e9576d5..0000000000--- a/.github/workflows/e2e-cua-compat-e2b-cases.yml+++ /dev/null@@ -1,92 +0,0 @@-name: "E2E: cua-compat E2B shared cases and overhead guard (QEMU)"--# The shared E2B cases (tests/compat/e2b/cases, Python and TypeScript runners,-# every claimed SDK version) against `cua compat serve` on real Linux VM Spaces,-# compared with the recordings from the real E2B; then the overhead guard: the-# E2B SDK through the gateway against the same operations done directly-# through the Cua SDK, with a committed baseline and a 1.5x threshold.--on:- schedule:- - cron: "37 5 * * *"- workflow_dispatch:- inputs:- write_baseline:- description: "Write tests/compat/e2b/perf/baseline.json from this run (uploaded as an artifact)"- type: boolean- default: false--permissions:- contents: read--concurrency:- group: e2e-cua-compat-e2b-cases-${{ github.ref }}- cancel-in-progress: true--env:- CARGO_TERM_COLOR: always- CARGO_BUILD_JOBS: "4"- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--jobs:- spaces:- name: cases and overhead on QEMU Spaces- runs-on: ubuntu-24.04- timeout-minutes: 240- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: ./.github/actions/linux-rust-prep- - name: Install protoc- uses: ./.github/actions/setup-protoc- - name: Install pinned Rust toolchain- uses: dtolnay/[email protected]- with:- targets: wasm32-unknown-unknown- - uses: ./.github/actions/rust-cache- with:- workspaces: |- libs/cua- libs/cua-spacesd- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.13"- - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4- with:- node-version: "22"- - name: Build cua (Cua Spaces build), the reference images and disks- run: |- tests/e2e/cua-sdk/ci-setup.sh --images --disks- (cd libs/cua && cargo build --locked -p cua-spaces-cli && cargo build --locked -p cua-compat --example bench_direct)- echo "CUA=$PWD/libs/cua/target/debug/cua" >>"$GITHUB_ENV"- echo "BENCH_DIRECT=$PWD/libs/cua/target/debug/examples/bench_direct" >>"$GITHUB_ENV"- arch=$(uname -m); case "$arch" in aarch64|arm64) a=arm64;; *) a=amd64;; esac- echo "LINUX_DISK=$HOME/.cache/cua-images-e2e/linux/$a/disk.img" >>"$GITHUB_ENV"- - name: Start the daemon- run: |- "$CUA" daemon start --foreground >"$RUNNER_TEMP/daemon.log" 2>&1 &- for i in $(seq 100); do "$CUA" daemon status >/dev/null 2>&1 && break; sleep 0.3; done- - name: Shared cases, Python and TypeScript, every claimed SDK version, against the recordings- run: |- claimed=$(python -c 'import json; d=json.load(open("tests/compat/SDK_VERSIONS.json"))["e2b"]; print(" ".join(d["py"]["claimed"]))')- export PY_SDKS="$claimed" TS_SDKS="$claimed" CASES_WORK="$RUNNER_TEMP/cases-e2b"- # e2b-code-interpreter against the code-interpreter-v1 template, after the cases- python -m venv "$RUNNER_TEMP/ci-venv" && "$RUNNER_TEMP/ci-venv/bin/pip" install -q e2b-code-interpreter- # ... and 16 sandboxes at once (asyncio.gather of create + command + file)- export CASES_AFTER="$RUNNER_TEMP/ci-venv/bin/python $PWD/tests/compat/e2b/code_interpreter_check.py $PWD/tests/compat/e2b/fixtures/code-interpreter.json && $RUNNER_TEMP/ci-venv/bin/python $PWD/tests/compat/e2b/parallel_check.py 16"- tests/compat/run_cases_space.sh --rules tests/compat/e2b/rules-space.json -- --on local --kind vm --image "vm:$LINUX_DISK"- - name: Overhead guard (gateway against the direct Cua SDK)- env:- PERF_WORK: ${{ runner.temp }}/perf-e2b- run: |- if [ "${{ inputs.write_baseline }}" = true ]; then flag=--write; else flag=""; fi- tests/compat/run_perf.sh $flag -- --on local --kind vm --image "vm:$LINUX_DISK" --cpus 2 --memory-mb 2048- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4- if: always()- with:- name: cua-compat-e2b-cases- path: |- ${{ runner.temp }}/cases-e2b- ${{ runner.temp }}/perf-e2b- ${{ runner.temp }}/daemon.log- tests/compat/e2b/perf/baseline.jsondiff --git a/.github/workflows/e2e-cua-compat.yml b/.github/workflows/e2e-cua-compat.ymldeleted file mode 100644index 085716605f..0000000000--- a/.github/workflows/e2e-cua-compat.yml+++ /dev/null@@ -1,72 +0,0 @@-name: "E2E: cua-compat on Spaces"--# Other providers' SDKs, unchanged, against real Cua Spaces (QEMU VMs on a-# KVM runner), compared with the fixtures recorded against the providers:-#-# nightly E2B (pinned and latest) and Daytona conformance through-# `cua compat serve`.-# dispatch the same, on demand.--on:- schedule:- - cron: "17 5 * * *"- workflow_dispatch:--permissions:- contents: read--concurrency:- group: e2e-cua-compat-${{ github.ref }}- cancel-in-progress: true--env:- CARGO_TERM_COLOR: always- CARGO_BUILD_JOBS: "4"- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"--jobs:- spaces:- name: SDK conformance (QEMU)- runs-on: ubuntu-24.04- timeout-minutes: 180- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: ./.github/actions/linux-rust-prep- - name: Install protoc- uses: ./.github/actions/setup-protoc- - name: Install pinned Rust toolchain- uses: dtolnay/[email protected]- with:- targets: wasm32-unknown-unknown- - uses: ./.github/actions/rust-cache- with:- workspaces: |- libs/cua- libs/cua-spacesd- - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5- with:- python-version: "3.13"- - uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6- - name: Build cua (Cua Spaces build), the reference images and disks- run: |- tests/e2e/cua-sdk/ci-setup.sh --images --disks- (cd libs/cua && cargo build --locked -p cua-spaces-cli)- echo "CUA=$PWD/libs/cua/target/debug/cua" >>"$GITHUB_ENV"- arch=$(uname -m); case "$arch" in aarch64|arm64) a=arm64;; *) a=amd64;; esac- echo "LINUX_DISK=$HOME/.cache/cua-images-e2e/linux/$a/disk.img" >>"$GITHUB_ENV"- - name: Start the daemon- run: |- "$CUA" daemon start --foreground >"$RUNNER_TEMP/daemon.log" 2>&1 &- for i in $(seq 100); do "$CUA" daemon status >/dev/null 2>&1 && break; sleep 0.3; done- - name: E2B SDK conformance (pinned and latest) on QEMU Spaces- run: OUT="$RUNNER_TEMP/compat-e2b" tests/compat/run_space.sh e2b --on local --kind vm --image "vm:$LINUX_DISK"- - name: Daytona SDK conformance (pinned and latest) on QEMU Spaces- run: OUT="$RUNNER_TEMP/compat-daytona" tests/compat/run_space.sh daytona --on local --kind vm --image "vm:$LINUX_DISK"- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4- if: always()- with:- name: cua-compat-e2e- path: |- ${{ runner.temp }}/compat-*- ${{ runner.temp }}/daemon.logdiff --git a/.github/workflows/fleet-mirror-guard.yml b/.github/workflows/fleet-mirror-guard.ymldeleted file mode 100644index e466f01f05..0000000000--- a/.github/workflows/fleet-mirror-guard.yml+++ /dev/null@@ -1,26 +0,0 @@-name: Fleet Mirror Guard--# libs/fleet no longer exists, so there is nothing to guard. This stub only-# keeps the `fleet-mirror-guard` check reporting while it is still listed as a-# required check in the branch ruleset. Delete this file once that entry is-# removed from the ruleset.--on:- pull_request:- types: [opened, synchronize, reopened]- merge_group:--permissions:- contents: read--concurrency:- group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.event.pull_request.number || github.run_id }}- cancel-in-progress: ${{ github.event_name == 'pull_request' }}--jobs:- fleet-mirror-guard:- if: github.event_name != 'merge_group'- runs-on: ubuntu-latest- timeout-minutes: 1- steps:- - run: echo "libs/fleet has been removed; nothing to guard."diff --git a/.github/workflows/image-doctor.yml b/.github/workflows/image-doctor.ymldeleted file mode 100644index b21d8a8ebc..0000000000--- a/.github/workflows/image-doctor.yml+++ /dev/null@@ -1,498 +0,0 @@-name: "Image doctor"--# Runs `cua-spacesd doctor` (the image self-test: capabilities against the-# image's /etc/cua-image/manifest.json claims, input/screenshot/a11y on-# doctor-owned fixture windows, every compiled encoder, audio, auth mode,-# init units, compat links) against image refs, one job per lane.-# Callable from other workflows (cd-image-linux.yml, the nightly,-# trycua/cloud) and by hand. Refs are pulled from their registry, or, when-# the caller passes rootfs_artifact / disk_artifact, loaded from artifacts of-# the calling run (cd-image-linux.yml gates unpublished builds that way, so-# nothing is pushed before every gate passed). The lane logic is scripts/images/image-doctor-lane.sh,-# the same script the build job runs before pushing.-#-# Lanes:-# runc, runsc rootfs under docker / gVisor, native runner per arch-# conformance the 22 core + 11 desktop conformance tests against the-# real spacesd in the image (runc and runsc)-# claim-token the Fleet per-claim token path in a container (runc and-# runsc): await-token-file install / rotate / revoke-# qemu the containerDisk payload booted under QEMU+KVM, doctor-# over ssh as root; also once with the token delivered-# through a real virtio-fs claim-secrets share-# windows the Windows containerDisk under QEMU+KVM (hosted ubuntu-24.04-# exposes /dev/kvm; vars.CUA_WINDOWS_DOCTOR_RUNNER overrides the-# runner): `cua-spacesd doctor` in the guest, or the doctor-# shim for images without cua-spacesd-# parity eval parity (Linux, amd64+KVM): the rootfs under gVisor and-# the containerDisk under QEMU side by side; doctor on both,-# fidelity diff, and the same evaluator score for each task-# in oracle/null/partial modes (`cua doctor parity`)-# lume macOS golden under Lume on a self-hosted Mac, doctor-# shim or cua-spacesd when the image ships it-# (gated: vars.CUA_MACOS_LUME_RUNNER)-# arm64 QEMU needs KVM, which hosted arm64 runners lack: it runs only on-# vars.CUA_ARM64_KVM_RUNNER (a self-hosted Graviton metal label).-#-# Tiers: callers gate each tier on its own by calling this once per tier-# (cd-image-linux.yml doctor-post: name linux-slim-post / linux-full-post).-# The doctor enforces-# each tier's own claims (/etc/cua-image/manifest.json `tier`, `apps`,-# `tools`).-#-# Every lane uploads doctor-<name>-<arch>-<lane> (report.json, JUnit, logs);-# the summary job renders one table and fails when any lane failed.--on:- workflow_call:- inputs:- rootfs_ref:- description: "Digest-pinned rootfs ref (runc, runsc, conformance, claim-token lanes)"- type: string- default: ""- disk_ref:- description: "Digest-pinned containerDisk ref (qemu lanes; /disk/disk.img is extracted)"- type: string- default: ""- rootfs_artifact:- description: "Artifact of the calling run holding rootfs.tar.zst (docker save of rootfs_ref); loaded instead of pulled"- type: string- default: ""- disk_artifact:- description: "Artifact of the calling run holding disk.img; used instead of extracting disk_ref"- type: string- default: ""- arch:- description: "amd64 or arm64"- type: string- default: amd64- name:- description: "Short image name for artifact names"- type: string- default: image- lanes:- description: "Comma-separated lanes"- type: string- default: "runc,runsc,qemu"- strict:- type: boolean- default: true- windows_ref:- type: string- default: ""- macos_ref:- type: string- default: ""- outputs:- status:- description: "pass or fail"- value: ${{ jobs.summary.outputs.status }}- workflow_dispatch:- inputs:- rootfs_ref:- type: string- default: ""- disk_ref:- type: string- default: ""- arch:- type: choice- options: [amd64, arm64]- default: amd64- name:- type: string- default: image- lanes:- type: string- default: "runc,runsc,qemu"- strict:- type: boolean- default: true- windows_ref:- type: string- default: ""- macos_ref:- type: string- default: ""--permissions:- contents: read- packages: read--env:- CARGO_NET_RETRY: "10"- CARGO_HTTP_TIMEOUT: "120"- CARGO_HTTP_MULTIPLEXING: "false"- # Cua programs and packages run here never send usage telemetry.- CUA_TELEMETRY: "0"- DO_NOT_TRACK: "1"- CARGO_BUILD_JOBS: "4"--jobs:- plan:- runs-on: ubuntu-latest- outputs:- container: ${{ steps.plan.outputs.container }}- qemu: ${{ steps.plan.outputs.qemu }}- qemu_runner: ${{ steps.plan.outputs.qemu_runner }}- conformance: ${{ steps.plan.outputs.conformance }}- claim: ${{ steps.plan.outputs.claim }}- parity: ${{ steps.plan.outputs.parity }}- windows: ${{ steps.plan.outputs.windows }}- windows_runner: ${{ steps.plan.outputs.windows_runner }}- lume: ${{ steps.plan.outputs.lume }}- steps:- - id: plan- env:- LANES: ${{ inputs.lanes }}- ARCH: ${{ inputs.arch }}- ROOTFS: ${{ inputs.rootfs_ref }}- DISK: ${{ inputs.disk_ref }}- ARM_KVM: ${{ vars.CUA_ARM64_KVM_RUNNER }}- WIN_RUNNER: ${{ vars.CUA_WINDOWS_DOCTOR_RUNNER }}- LUME_RUNNER: ${{ vars.CUA_MACOS_LUME_RUNNER }}- WINDOWS_REF: ${{ inputs.windows_ref }}- MACOS_REF: ${{ inputs.macos_ref }}- run: |- set -euo pipefail- has() { [[ ",$LANES," == *",$1,"* ]]; }- container='[]'- for lane in runc runsc; do- if has "$lane" && [ -n "$ROOTFS" ]; then container="$(jq -c --arg l "$lane" '. + [$l]' <<<"$container")"; fi- done- echo "container=$container" >>"$GITHUB_OUTPUT"- qemu=false; runner=ubuntu-24.04- if has qemu && [ -n "$DISK" ]; then- if [ "$ARCH" = amd64 ]; then qemu=true- elif [ -n "$ARM_KVM" ]; then qemu=true; runner="$ARM_KVM"- else echo "::notice::arm64 QEMU lane skipped: set vars.CUA_ARM64_KVM_RUNNER to a KVM-capable arm64 runner label"- fi- fi- echo "qemu=$qemu" >>"$GITHUB_OUTPUT"- echo "qemu_runner=$runner" >>"$GITHUB_OUTPUT"- conformance=false; has conformance && [ -n "$ROOTFS" ] && conformance=true- echo "conformance=$conformance" >>"$GITHUB_OUTPUT"- claim=false; has claim-token && [ -n "$ROOTFS" ] && claim=true- echo "claim=$claim" >>"$GITHUB_OUTPUT"- parity=false- if has parity && [ -n "$ROOTFS" ] && [ -n "$DISK" ]; then- if [ "$ARCH" = amd64 ]; then parity=true- else echo "::notice::parity lane runs on amd64 (KVM) only"; fi- fi- echo "parity=$parity" >>"$GITHUB_OUTPUT"- windows=false- if has windows && [ -n "$WINDOWS_REF" ]; then windows=true; fi- echo "windows=$windows" >>"$GITHUB_OUTPUT"- echo "windows_runner=${WIN_RUNNER:-ubuntu-24.04}" >>"$GITHUB_OUTPUT"- lume=false- if has lume && [ -n "$MACOS_REF" ]; then- if [ -n "$LUME_RUNNER" ]; then lume=true- else echo "::notice::lume lane skipped: needs a self-hosted Mac with Lume (vars.CUA_MACOS_LUME_RUNNER)"; fi- fi- echo "lume=$lume" >>"$GITHUB_OUTPUT"-- container:- needs: plan- if: needs.plan.outputs.container != '[]'- strategy:- fail-fast: false- matrix:- lane: ${{ fromJSON(needs.plan.outputs.container) }}- runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}- timeout-minutes: 40- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - name: Install gVisor- if: matrix.lane == 'runsc'- run: scripts/images/install-gvisor.sh- - name: Fetch the rootfs artifact- if: inputs.rootfs_artifact != ''- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4- with:- name: ${{ inputs.rootfs_artifact }}- path: ${{ runner.temp }}/rootfs- - name: Load or pull- env:- REF: ${{ inputs.rootfs_ref }}- ARTIFACT: ${{ inputs.rootfs_artifact }}- run: scripts/images/load-image-artifact.sh "$REF" "${ARTIFACT:+$RUNNER_TEMP/rootfs/rootfs.tar.zst}"- - name: Doctor (${{ matrix.lane }})- run: |- scripts/images/image-doctor-lane.sh --lane "${{ matrix.lane }}" --image "${{ inputs.rootfs_ref }}" \- --out "$RUNNER_TEMP/doctor" ${{ inputs.strict && '--strict' || '--no-strict' }}- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4- if: always()- with:- name: doctor-${{ inputs.name }}-${{ inputs.arch }}-${{ matrix.lane }}- path: ${{ runner.temp }}/doctor- if-no-files-found: warn- retention-days: 30-- conformance:- needs: plan- if: needs.plan.outputs.conformance == 'true'- strategy:- fail-fast: false- matrix:- runtime: [runc, runsc]- runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}- timeout-minutes: 90- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - name: Install gVisor- if: matrix.runtime == 'runsc'- run: scripts/images/install-gvisor.sh- - name: Build the conformance client image- run: docker build -t cua-envdesktop-test libs/cua-spacesd/crates/cua-spacesd-desktop/tests/docker- - name: Fetch the rootfs artifact- if: inputs.rootfs_artifact != ''- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4- with:- name: ${{ inputs.rootfs_artifact }}- path: ${{ runner.temp }}/rootfs- - name: Load or pull- env:- REF: ${{ inputs.rootfs_ref }}- ARTIFACT: ${{ inputs.rootfs_artifact }}- run: scripts/images/load-image-artifact.sh "$REF" "${ARTIFACT:+$RUNNER_TEMP/rootfs/rootfs.tar.zst}"- - name: Core (22) + desktop (11) conformance against the image's spacesd- run: |- libs/cua-spacesd/crates/cua-spacesd-desktop/tests/docker/run-against-image.sh "${{ matrix.runtime }}" "${{ inputs.rootfs_ref }}"-- claim-token:- needs: plan- if: needs.plan.outputs.claim == 'true'- strategy:- fail-fast: false- matrix:- runtime: [runc, runsc]- runs-on: ${{ inputs.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}- timeout-minutes: 30- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - name: Install gVisor- if: matrix.runtime == 'runsc'- run: scripts/images/install-gvisor.sh- - name: Fetch the rootfs artifact- if: inputs.rootfs_artifact != ''- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4- with:- name: ${{ inputs.rootfs_artifact }}- path: ${{ runner.temp }}/rootfs- - name: Load or pull- env:- REF: ${{ inputs.rootfs_ref }}- ARTIFACT: ${{ inputs.rootfs_artifact }}- run: scripts/images/load-image-artifact.sh "$REF" "${ARTIFACT:+$RUNNER_TEMP/rootfs/rootfs.tar.zst}"- - name: Per-claim token path (await-token-file)- run: |- libs/images/linux/smoke-claim-token.sh --image "${{ inputs.rootfs_ref }}" \- --runtime "${{ matrix.runtime }}" --evidence "$RUNNER_TEMP/claim-token"- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4- if: always()- with:- name: claim-token-${{ inputs.name }}-${{ inputs.arch }}-${{ matrix.runtime }}- path: ${{ runner.temp }}/claim-token- if-no-files-found: ignore- retention-days: 14-- qemu:- needs: plan- if: needs.plan.outputs.qemu == 'true'- strategy:- fail-fast: false- matrix:- mode: [env-token, claim-secrets]- runs-on: ${{ needs.plan.outputs.qemu_runner }}- timeout-minutes: 60- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - name: Install QEMU, firmware, virtiofsd and crane- run: |- set -euo pipefail- sudo apt-get update -qq- fw=ovmf; [ "${{ inputs.arch }}" = arm64 ] && fw=qemu-efi-aarch64- sudo apt-get install -y -qq --no-install-recommends qemu-utils qemu-system-x86 qemu-system-arm "$fw" genisoimage virtiofsd- if [ -e /dev/kvm ]; then sudo chmod 666 /dev/kvm; fi- go install github.com/google/go-containerregistry/cmd/[email protected]- echo "$(go env GOPATH)/bin" >>"$GITHUB_PATH"- - name: Fetch the disk artifact- if: inputs.disk_artifact != ''- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4- with:- name: ${{ inputs.disk_artifact }}- path: ${{ runner.temp }}/disk/disk- - name: Extract disk.img from the containerDisk- if: inputs.disk_artifact == ''- run: |- set -euo pipefail- mkdir -p "$RUNNER_TEMP/disk"- crane export --platform "linux/${{ inputs.arch }}" "${{ inputs.disk_ref }}" - | tar -x -C "$RUNNER_TEMP/disk" disk/disk.img- ls -la "$RUNNER_TEMP/disk/disk"- - name: Doctor in the VM (${{ matrix.mode }})- run: |- claim=(); [ "${{ matrix.mode }}" = claim-secrets ] && claim=(--claim-secrets)- scripts/images/image-doctor-lane.sh --lane qemu --disk "$RUNNER_TEMP/disk/disk/disk.img" \- --arch "${{ inputs.arch }}" --out "$RUNNER_TEMP/doctor" "${claim[@]}" \- ${{ inputs.strict && '--strict' || '--no-strict' }}- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4- if: always()- with:- name: doctor-${{ inputs.name }}-${{ inputs.arch }}-qemu-${{ matrix.mode }}- path: ${{ runner.temp }}/doctor- if-no-files-found: warn- retention-days: 30-- parity:- needs: plan- if: needs.plan.outputs.parity == 'true'- runs-on: ubuntu-24.04- timeout-minutes: 90- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - name: Install QEMU, gVisor, crane and protoc- run: |- set -euo pipefail- sudo apt-get update -qq- sudo apt-get install -y -qq --no-install-recommends qemu-utils qemu-system-x86 genisoimage protobuf-compiler libprotobuf-dev- sudo chmod 666 /dev/kvm- scripts/images/install-gvisor.sh- go install github.com/google/go-containerregistry/cmd/[email protected]- echo "$(go env GOPATH)/bin" >>"$GITHUB_PATH"- - uses: dtolnay/[email protected]- - uses: ./.github/actions/rust-cache- with:- workspaces: libs/cua- - name: Build the cua CLI- working-directory: libs/cua- run: cargo build --release --locked -p cua-cli --features byoc- - name: Fetch the rootfs artifact- if: inputs.rootfs_artifact != ''- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4- with:- name: ${{ inputs.rootfs_artifact }}- path: ${{ runner.temp }}/rootfs- - name: Fetch the disk artifact- if: inputs.disk_artifact != ''- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4- with:- name: ${{ inputs.disk_artifact }}- path: ${{ runner.temp }}/disk/disk- - name: Parity (rootfs under gVisor vs containerDisk under QEMU)- env:- ARTIFACT: ${{ inputs.rootfs_artifact }}- DISK_ARTIFACT: ${{ inputs.disk_artifact }}- run: |- set -euo pipefail- if [ -z "$DISK_ARTIFACT" ]; then- mkdir -p "$RUNNER_TEMP/disk"- crane export --platform linux/amd64 "${{ inputs.disk_ref }}" - | tar -x -C "$RUNNER_TEMP/disk" disk/disk.img- fi- scripts/images/load-image-artifact.sh "${{ inputs.rootfs_ref }}" "${ARTIFACT:+$RUNNER_TEMP/rootfs/rootfs.tar.zst}"- scripts/images/image-parity-lane.sh --rootfs "${{ inputs.rootfs_ref }}" \- --disk "$RUNNER_TEMP/disk/disk/disk.img" --arch amd64 --runtime runsc \- --cua libs/cua/target/release/cua --out "$RUNNER_TEMP/parity"- - name: Summary- if: always()- run: cat "$RUNNER_TEMP/parity/parity.md" >>"$GITHUB_STEP_SUMMARY" 2>/dev/null || true- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4- if: always()- with:- name: parity-${{ inputs.name }}-amd64- path: ${{ runner.temp }}/parity- if-no-files-found: warn- retention-days: 30-- windows:- needs: plan- if: needs.plan.outputs.windows == 'true'- # Hosted ubuntu-24.04 runners expose /dev/kvm; a 2 vCPU / 7 GB runner- # boots the guest with 4 GiB (cd-image-windows.yml does the same).- runs-on: ${{ needs.plan.outputs.windows_runner }}- timeout-minutes: 90- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - name: Free disk space- run: |- sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /opt/hostedtoolcache/CodeQL || true- df -h /- - name: Install QEMU, OVMF, crane and grpcurl- run: |- set -euo pipefail- sudo apt-get update -qq- sudo apt-get install -y -qq --no-install-recommends qemu-utils qemu-system-x86 ovmf- sudo chmod 666 /dev/kvm- go install github.com/google/go-containerregistry/cmd/[email protected]- go install github.com/fullstorydev/grpcurl/cmd/[email protected]- echo "$(go env GOPATH)/bin" >>"$GITHUB_PATH"- - name: Build the cua CLI (doctor shim, images without cua-spacesd)- working-directory: libs/cua- run: |- if crane manifest "${{ inputs.windows_ref }}" | jq -e '.annotations["ai.cua.spacesd"] == "true"' >/dev/null; then- echo "the image runs cua-spacesd; no shim needed"; exit 0- fi- cargo build --release --locked -p cua-cli --features byoc- - name: Boot the Windows disk and run the doctor- run: |- cua=(); [ -x libs/cua/target/release/cua ] && cua=(--cua libs/cua/target/release/cua)- scripts/images/image-doctor-windows.sh --image "${{ inputs.windows_ref }}" "${cua[@]}" \- --mem 4G --smp "$(nproc)" --out "$RUNNER_TEMP/doctor" \- ${{ inputs.strict && '--strict' || '' }}- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4- if: always()- with:- name: doctor-${{ inputs.name }}-amd64-windows- path: ${{ runner.temp }}/doctor- if-no-files-found: warn- retention-days: 30-- lume:- needs: plan- if: needs.plan.outputs.lume == 'true'- runs-on: ${{ fromJSON(format('["self-hosted","macOS","ARM64","{0}"]', vars.CUA_MACOS_LUME_RUNNER)) }}- timeout-minutes: 90- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - name: Build the cua CLI- working-directory: libs/cua- run: cargo build --release --locked -p cua-cli --features byoc- - name: Clone, boot and doctor the macOS image under Lume- run: |- scripts/images/image-doctor-lume.sh --image "${{ inputs.macos_ref }}" \- --cua libs/cua/target/release/cua --out "$RUNNER_TEMP/doctor" \- ${{ inputs.strict && '--strict' || '' }}- - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4- if: always()- with:- name: doctor-${{ inputs.name }}-arm64-lume- path: ${{ runner.temp }}/doctor- if-no-files-found: warn- retention-days: 30-- summary:- needs: [plan, container, conformance, claim-token, qemu, parity, windows, lume]- if: always()- runs-on: ubuntu-latest- outputs:- status: ${{ steps.verdict.outputs.status }}- steps:- - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4- - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4- with:- pattern: doctor-${{ inputs.name }}-*- path: reports- - name: Summary- run: python3 scripts/images/doctor_ledger.py summary reports >>"$GITHUB_STEP_SUMMARY"- - id: verdict- env:- RESULTS: ${{ toJSON(needs) }}- run: |- set -euo pipefail- # A lane that ran and failed fails the gate; skipped lanes (gated- # on missing infra) do not.- bad="$(jq -r 'to_entries[] | select(.key != "plan") | select(.value.result == "failure" or .value.result == "cancelled") | .key' <<<"$RESULTS")"- if [ -n "$bad" ]; then- echo "status=fail" >>"$GITHUB_OUTPUT"- echo "failed lanes: $bad"; exit 1- fi- echo "status=pass" >>"$GITHUB_OUTPUT"diff --git a/libs/cua-driver-fixtures/README.md b/libs/cua-driver-fixtures/README.mddeleted file mode 100644index d6594e3f4c..0000000000--- a/libs/cua-driver-fixtures/README.md+++ /dev/null@@ -1,107 +0,0 @@-# cua-driver-fixtures--Canonical HTML test fixtures used by the cua-driver test harness. One source-of truth; the driver integration tests reference these files via relative-symlinks from their existing `tests/integration/fixtures/` and `assets/` trees.--## Files--| File | Purpose |-|------|---------|-| `interactive.html` | 31-line minimal click + type-mirror harness. Stable IDs: `#counter`, `#clicker`, `#textbox`, `#typed`. Used by `test_background_focus.py`, opened via `file://`. |-| `form_all_inputs.html` | Every HTML5 input type (text, password, email, number, tel, textarea, select, checkbox, radio, range, date, color). Submit handler stores result in `window._submitted`; live read via `getFieldValues()`. Used by `test_drag_slider_delivery.py`, `test_hermes_form_fill*.py`. |-| `test_page.html` | Richer Safari/Chrome/Electron harness: button counter, text input, checkbox, dropdown, textarea, link, canvas. Served via local `html_server` HTTP fixture. Used by `test_chrome.py`, `test_safari.py`, `test_electron.py`. |-| `gesture_panels.html` | **New**: extends the same ID-convention style as `test_page.html` with panels for the four gestures not currently covered by the v2 harness: hotkey + modifier-state propagation, pixel-coord pinpoint accuracy, drag-and-drop event sequence, scroll position. See **Why** below. |--All four files are vanilla HTML with no external deps, no build step. Open-directly in any browser:--```bash-open libs/cua-driver-fixtures/test_page.html-```--## Where the driver references the canonical copy--Existing driver test paths are preserved as symlinks. Tests that read these-paths (`os.path.join(_THIS_DIR, "fixtures", "interactive.html")`,-`f"{html_server}/test_page.html"`) work unchanged.--```-libs/cua-driver/rust/tests/integration/-├── fixtures/-│ └── interactive.html → ../../../../cua-driver-fixtures/interactive.html-└── v2/assets/- └── test_page.html → ../../../../../cua-driver-fixtures/test_page.html-```--Edits to a fixture now propagate to the driver tests in a single commit.-Drift is impossible by construction.--## Why `gesture_panels.html` was added--`test_page.html` covers Safari/Chrome/Electron interaction surfaces well-but doesn't probe four gestures that the Windows cua-driver stress-test (May 2026) showed need explicit harness coverage:--1. **Hotkey + modifier-state propagation** (`#hotkey-focus` + `#hotkey-status`):- PostMessage-based hotkey paths inject keystrokes without updating the- OS modifier state, so the page-level `KeyboardEvent.ctrlKey` reads- `false` even after a routed `ctrl+s`. SendInput updates `GetKeyState`,- so the same event reads `ctrl=true`. The status div prints- `ctrl=true|false` directly: single assertion per routing path.--2. **Pixel-coord pinpoint** (`#coord-area` + `#coord-status`): a known- target at viewport `(60, 60)` inside the box; status shows the- distance from the target in pixels. Asserting `dist < 2` is a clean- precision test for coordinate-routed clicks.--3. **Drag-and-drop sequence** (`#drag-source` + `#drag-target` +- `#drag-status`): the page records each HTML5 drag event in order so- tests can assert the full `dragstart → dragover → drop` chain reached- the page (not just that the driver moved the cursor).--4. **Scroll position** (`#scroll-area` + `#scroll-status`): a scrollable- container whose `scrollTop` is printed live: tests can assert scroll- direction + amount after a routed scroll gesture.--Like `test_page.html`, each panel exposes a global accessor:-`window.getGesturePanelState()` returns a JSON snapshot of all four-panels' state. Tests can poll it via `page` with-`action: "execute_javascript"` (when running with Chromium's-`--remote-debugging-port`) or read the visible status divs via UIA / OCR.--### Known browser-coverage gaps (May 2026)--When driving Chromium-based browsers (Edge / Chrome / Electron) on-Windows, the integration tests should be aware of:--- **GPU-composited content blanks PrintWindow.** `cua-driver screenshot`- captures the browser chrome + a white body. Workaround: launch the- target browser with `--remote-debugging-port=<port>` and use- `page` (`action: "execute_javascript"`) for both inputs and verification.-- **Chromium auto-disables full a11y** unless an AT-grade client is- detected. UIA on the rendered DOM returns empty until the page is- flagged accessibility-active. Workaround: enable Chromium's- `--force-renderer-accessibility` flag (or rely on `--remote-debugging-port`).-- **`hotkey` SendInput injection requires the daemon at UIAccess- integrity.** Otherwise `SetForegroundWindow` is rejected and the- injected events land on the wrong window: `SendInput inserted only 0- of 4 events`. Workaround: run `cua-driver` via the- `cua-driver-uia.exe` worker (PR #1593) which carries the manifest.--These are environmental requirements for any DOM-level verification of-gesture behavior in a Chromium target on Windows; they don't affect the-canonical fixtures, only how they're driven.--## Adding new fixtures--1. Add the new HTML file directly to this dir-2. Document it in the table above (purpose + stable IDs + who uses it)-3. Add a relative symlink under whichever driver test path needs it-4. Commit the new file + symlink(s) in the same PR--Do **not** create copies under the driver tree. Symlink only.--## License--Same as the parent project (MIT, see `LICENSE.md`).diff --git a/libs/cua-driver-fixtures/form_all_inputs.html b/libs/cua-driver-fixtures/form_all_inputs.htmldeleted file mode 100644index 74ae4addfe..0000000000--- a/libs/cua-driver-fixtures/form_all_inputs.html+++ /dev/null@@ -1,164 +0,0 @@-<!DOCTYPE html>-<html>-<head>-<meta charset="utf-8">-<title>All Inputs Test Form</title>-<style>-body { font-family: -apple-system, sans-serif; padding: 30px; background: #f0f0f0; max-width: 640px; }-h1 { font-size: 22px; margin-bottom: 20px; }-.field { margin-bottom: 16px; }-label { display: block; font-weight: bold; margin-bottom: 4px; font-size: 14px; }-input[type=text], input[type=password], input[type=email],-input[type=number], input[type=tel], input[type=url], input[type=search],-textarea, select {- width: 100%; padding: 8px; font-size: 16px; box-sizing: border-box;- border: 1px solid #bbb; border-radius: 4px;-}-textarea { height: 80px; resize: vertical; }-.radio-group label, .checkbox-group label { font-weight: normal; display: inline; margin-left: 6px; }-input[type=range] { width: 100%; }-input[type=color] { width: 80px; height: 40px; border: none; cursor: pointer; }-button#submit-btn {- background: #007AFF; color: white; border: none; padding: 12px 28px;- font-size: 16px; border-radius: 6px; cursor: pointer; margin-top: 10px;-}-button#submit-btn:hover { background: #0066DD; }-#result {- margin-top: 24px; padding: 16px; background: white; border: 1px solid #ccc;- border-radius: 6px; font-size: 13px; white-space: pre-wrap; display: none;-}-#submitted { display: none; font-size: 18px; color: green; font-weight: bold; margin-top: 16px; }-</style>-</head>-<body>-<h1>All Inputs Test Form</h1>-<form id="test-form" onsubmit="handleSubmit(event)" autocomplete="off">-- <div class="field">- <label for="f-text">Text</label>- <input type="text" id="f-text" name="text_field" placeholder="Enter text...">- </div>-- <div class="field">- <label for="f-password">Password</label>- <input type="password" id="f-password" name="password_field" placeholder="Enter password...">- </div>-- <div class="field">- <label for="f-email">Email</label>- <input type="email" id="f-email" name="email_field" placeholder="[email protected]">- </div>-- <div class="field">- <label for="f-number">Number</label>- <input type="number" id="f-number" name="number_field" placeholder="42" min="0" max="999">- </div>-- <div class="field">- <label for="f-tel">Phone</label>- <input type="tel" id="f-tel" name="tel_field" placeholder="555-1234">- </div>-- <div class="field">- <label for="f-textarea">Message (Textarea)</label>- <textarea id="f-textarea" name="textarea_field" placeholder="Type a message..."></textarea>- </div>-- <div class="field">- <label for="f-select">Favourite colour (Select)</label>- <select id="f-select" name="select_field">- <option value="">-- pick one --</option>- <option value="red">Red</option>- <option value="green">Green</option>- <option value="blue">Blue</option>- <option value="yellow">Yellow</option>- </select>- </div>-- <div class="field checkbox-group">- <label>Checkbox</label><br>- <input type="checkbox" id="f-checkbox" name="checkbox_field" value="checked">- <label for="f-checkbox">I agree to the terms</label>- </div>-- <div class="field radio-group">- <label>Radio buttons — Preferred fruit</label><br>- <input type="radio" id="r-apple" name="radio_field" value="apple">- <label for="r-apple">Apple</label> - <input type="radio" id="r-banana" name="radio_field" value="banana">- <label for="r-banana">Banana</label> - <input type="radio" id="r-cherry" name="radio_field" value="cherry">- <label for="r-cherry">Cherry</label>- </div>-- <div class="field">- <label for="f-range">Range / Slider (0–100)</label>- <input type="range" id="f-range" name="range_field" min="0" max="100" value="50">- <span id="range-display">50</span>- </div>-- <div class="field">- <label for="f-date">Date</label>- <input type="date" id="f-date" name="date_field">- </div>-- <div class="field">- <label for="f-color">Colour picker</label><br>- <input type="color" id="f-color" name="color_field" value="#4488ff">- </div>-- <button type="submit" id="submit-btn">Submit Form</button>-</form>--<div id="submitted">✓ Form Submitted!</div>-<div id="result"></div>--<script>-document.getElementById('f-range').addEventListener('input', function() {- document.getElementById('range-display').textContent = this.value;-});--function handleSubmit(e) {- e.preventDefault();- var form = document.getElementById('test-form');- var data = {- text: document.getElementById('f-text').value,- password: document.getElementById('f-password').value,- email: document.getElementById('f-email').value,- number: document.getElementById('f-number').value,- tel: document.getElementById('f-tel').value,- textarea: document.getElementById('f-textarea').value,- select: document.getElementById('f-select').value,- checkbox: document.getElementById('f-checkbox').checked,- radio: (document.querySelector('input[name=radio_field]:checked') || {}).value || '',- range: document.getElementById('f-range').value,- date: document.getElementById('f-date').value,- color: document.getElementById('f-color').value,- };- document.getElementById('submitted').style.display = 'block';- document.getElementById('result').style.display = 'block';- document.getElementById('result').textContent = JSON.stringify(data, null, 2);- window._submitted = data;-}--// Expose live field state for test assertions (no submit required)-function getFieldValues() {- return JSON.stringify({- text: document.getElementById('f-text').value,- password: document.getElementById('f-password').value,- email: document.getElementById('f-email').value,- number: document.getElementById('f-number').value,- tel: document.getElementById('f-tel').value,- textarea: document.getElementById('f-textarea').value,- select: document.getElementById('f-select').value,- checkbox: document.getElementById('f-checkbox').checked,- radio: (document.querySelector('input[name=radio_field]:checked') || {}).value || '',- range: document.getElementById('f-range').value,- date: document.getElementById('f-date').value,- color: document.getElementById('f-color').value,- submitted: typeof window._submitted !== 'undefined',- });-}-</script>-</body>-</html>diff --git a/libs/cua-driver-fixtures/gesture_panels.html b/libs/cua-driver-fixtures/gesture_panels.htmldeleted file mode 100644index 8b9d196a83..0000000000--- a/libs/cua-driver-fixtures/gesture_panels.html+++ /dev/null@@ -1,140 +0,0 @@-<!DOCTYPE html>-<html>-<head>-<meta charset="utf-8">-<title>CUA Driver Gesture Panels (test_page.html companion)</title>-<style>-body { font-family: -apple-system, sans-serif; padding: 30px; background: #f0f0f0; }-h2 { margin: 20px 0 8px; font-size: 16px; color: #555; }-.section { background: white; border-radius: 8px; padding: 16px; margin-bottom: 12px; }-.status { font-size: 14px; margin-top: 6px; color: #333; font-family: monospace; }-#hotkey-focus { font-size: 16px; padding: 10px; width: 360px; border: 1px solid #ccc; border-radius: 4px; }-#coord-area { position: relative; width: 240px; height: 240px; background: #fafafa; border: 1px solid #ccc; cursor: crosshair; }-#coord-target { position: absolute; left: 60px; top: 60px; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: #1a73e8; }-#drag-source { width: 80px; height: 80px; background: #1a73e8; color: white; display: flex; align-items: center; justify-content: center; cursor: grab; user-select: none; border-radius: 6px; }-#drag-target { width: 120px; height: 120px; background: #fafafa; border: 2px dashed #999; margin-top: 12px; display: flex; align-items: center; justify-content: center; color: #999; }-#drag-target.over { background: #e3f2fd; border-color: #1a73e8; }-#scroll-area { width: 360px; height: 150px; overflow-y: scroll; border: 1px solid #ccc; padding: 8px; background: white; }-#scroll-inner { height: 1200px; background: linear-gradient(180deg, #fff 0%, #1a73e8 100%); }-</style>-</head>-<body>--<div class="section">- <h2>Hotkey / modifier-state probe</h2>- <p style="font-size:13px;color:#666;margin:0 0 8px">- Focus this field, then send <code>hotkey ["ctrl","s"]</code>. The status line must report- <code>ctrl=true key=s</code>. PostMessage-only paths report <code>ctrl=false</code> because- the OS modifier state is never updated. SendInput-routed hotkeys report <code>ctrl=true</code>.- </p>- <input type="text" id="hotkey-focus" placeholder="Focus here, then send a hotkey...">- <div id="hotkey-status" class="status">hotkey: (no key seen)</div>-</div>--<div class="section">- <h2>Pixel-coordinate pinpoint</h2>- <p style="font-size:13px;color:#666;margin:0 0 8px">- Click on the blue dot at (60, 60) inside the box. Status shows the absolute viewport- pixel and the offset from the target center — <2px is a passing precision test.- </p>- <div id="coord-area">- <div id="coord-target"></div>- </div>- <div id="coord-status" class="status">coord: (no click)</div>-</div>--<div class="section">- <h2>Drag and drop</h2>- <p style="font-size:13px;color:#666;margin:0 0 8px">- Drag the blue square into the dashed target. Status must show all three events:- <code>dragstart → dragover → drop</code> with the source label.- </p>- <div id="drag-source" draggable="true">DRAG ME</div>- <div id="drag-target">drop here</div>- <div id="drag-status" class="status">drag: (no events)</div>-</div>--<div class="section">- <h2>Scroll</h2>- <p style="font-size:13px;color:#666;margin:0 0 8px">- Scroll this container with the <code>scroll</code> tool. Status shows the current- <code>scrollTop</code> in pixels.- </p>- <div id="scroll-area">- <div id="scroll-inner">scroll me</div>- </div>- <div id="scroll-status" class="status">scroll: 0</div>-</div>--<script>-// Hotkey / modifier-state probe ----------------------------------------------document.getElementById('hotkey-focus').addEventListener('keydown', function(e) {- var parts = [- 'key=' + e.key,- 'code=' + e.code,- 'ctrl=' + e.ctrlKey,- 'alt=' + e.altKey,- 'shift=' + e.shiftKey,- 'meta=' + e.metaKey- ];- document.getElementById('hotkey-status').textContent = 'hotkey: ' + parts.join(' ');- window._lastHotkey = { key: e.key, code: e.code, ctrl: e.ctrlKey, alt: e.altKey, shift: e.shiftKey, meta: e.metaKey };- // Prevent browser from acting on common chords during the test.- if (e.ctrlKey || e.metaKey) e.preventDefault();-});--// Pixel-coordinate pinpoint --------------------------------------------------document.getElementById('coord-area').addEventListener('click', function(e) {- var rect = e.currentTarget.getBoundingClientRect();- var x = Math.round(e.clientX - rect.left);- var y = Math.round(e.clientY - rect.top);- var dx = x - 60, dy = y - 60;- var dist = Math.sqrt(dx*dx + dy*dy).toFixed(1);- document.getElementById('coord-status').textContent = 'coord: (' + x + ',' + y + ') dist=' + dist + 'px';- window._lastCoord = { x: x, y: y, dist: parseFloat(dist) };-});--// Drag and drop --------------------------------------------------------------var dragEvents = [];-var src = document.getElementById('drag-source');-var tgt = document.getElementById('drag-target');-src.addEventListener('dragstart', function(e) {- dragEvents.push('dragstart');- e.dataTransfer.setData('text/plain', 'DRAG ME');- document.getElementById('drag-status').textContent = 'drag: ' + dragEvents.join(' → ');-});-tgt.addEventListener('dragover', function(e) {- e.preventDefault();- if (dragEvents[dragEvents.length-1] !== 'dragover') dragEvents.push('dragover');- tgt.classList.add('over');- document.getElementById('drag-status').textContent = 'drag: ' + dragEvents.join(' → ');-});-tgt.addEventListener('dragleave', function() { tgt.classList.remove('over'); });-tgt.addEventListener('drop', function(e) {- e.preventDefault();- dragEvents.push('drop');- tgt.classList.remove('over');- var payload = e.dataTransfer.getData('text/plain');- document.getElementById('drag-status').textContent = 'drag: ' + dragEvents.join(' → ') + ' payload=' + payload;- window._lastDrag = { events: dragEvents.slice(), payload: payload };-});--// Scroll ---------------------------------------------------------------------document.getElementById('scroll-area').addEventListener('scroll', function(e) {- var st = e.currentTarget.scrollTop;- document.getElementById('scroll-status').textContent = 'scroll: ' + st;- window._lastScroll = st;-});--// Expose for cua-driver get_window_state polling ---------------------------window.getGesturePanelState = function() {- return JSON.stringify({- hotkey: window._lastHotkey || null,- coord: window._lastCoord || null,- drag: window._lastDrag || null,- scroll: typeof window._lastScroll === 'number' ? window._lastScroll : null,- });-};-</script>-</body>-</html>diff --git a/libs/cua-driver-fixtures/interactive.html b/libs/cua-driver-fixtures/interactive.htmldeleted file mode 100644index e67b6fee1f..0000000000--- a/libs/cua-driver-fixtures/interactive.html+++ /dev/null@@ -1,31 +0,0 @@-<!DOCTYPE html>-<html>-<head>-<meta charset="utf-8">-<title>CUA Driver Test Page</title>-<style>-body { font-family: -apple-system, sans-serif; padding: 40px; background: #f5f5f5; }-#counter { font-size: 48px; font-weight: bold; margin: 20px 0; }-button { font-size: 24px; padding: 12px 32px; cursor: pointer; }-input { font-size: 24px; padding: 12px; width: 400px; margin-top: 20px; display: block; }-#typed { font-size: 20px; color: #333; margin-top: 10px; }-</style>-</head>-<body>-<h1>Interactive Test Page</h1>-<div id="counter">clicks: 0</div>-<button id="clicker" onclick="bump()">Click Me</button>-<input id="textbox" type="text" placeholder="Type here..." oninput="mirror()">-<div id="typed">typed: </div>-<script>-var n = 0;-function bump() {- n++;- document.getElementById('counter').textContent = 'clicks: ' + n;-}-function mirror() {- document.getElementById('typed').textContent = 'typed: ' + document.getElementById('textbox').value;-}-</script>-</body>-</html>diff --git a/libs/cua-driver-fixtures/test_page.html b/libs/cua-driver-fixtures/test_page.htmldeleted file mode 100644index cf07c04b14..0000000000--- a/libs/cua-driver-fixtures/test_page.html+++ /dev/null@@ -1,135 +0,0 @@-<!DOCTYPE html>-<html>-<head>-<meta charset="utf-8">-<title>CUA Driver Test Page v2</title>-<style>-body { font-family: -apple-system, sans-serif; padding: 30px; background: #f0f0f0; }-h2 { margin: 20px 0 8px; font-size: 16px; color: #555; }-.section { background: white; border-radius: 8px; padding: 16px; margin-bottom: 12px; }-#btn-counter { font-size: 36px; font-weight: bold; color: #1a73e8; }-button { font-size: 18px; padding: 10px 24px; cursor: pointer; border-radius: 6px; }-input[type=text], textarea { font-size: 16px; padding: 10px; width: 360px; border: 1px solid #ccc; border-radius: 4px; }-textarea { height: 80px; resize: none; }-select { font-size: 16px; padding: 8px; border-radius: 4px; }-#checkbox-label { font-size: 16px; margin-left: 8px; }-a { font-size: 16px; color: #1a73e8; }-canvas { border: 2px solid #999; cursor: crosshair; background: white; }-#canvas-status { font-size: 14px; margin-top: 6px; color: #555; }-</style>-</head>-<body>--<div class="section">- <h2>Button</h2>- <div id="btn-counter">clicks: 0</div>- <button id="clicker" onclick="bumpClick()">Click Me</button>-</div>--<div class="section">- <h2>Text Input</h2>- <input type="text" id="textbox" placeholder="Type here..." oninput="mirrorText()">- <div id="text-mirror" style="font-size:14px;margin-top:6px;color:#333">typed: </div>-</div>--<div class="section">- <h2>Checkbox</h2>- <input type="checkbox" id="checkbox" onchange="updateCheckbox()">- <span id="checkbox-label">unchecked</span>-</div>--<div class="section">- <h2>Select / Dropdown</h2>- <select id="dropdown" onchange="updateSelect()">- <option value="a">Option A</option>- <option value="b">Option B</option>- <option value="c">Option C</option>- </select>- <div id="select-label" style="font-size:14px;margin-top:6px;color:#333">selected: Option A</div>-</div>--<div class="section">- <h2>Textarea</h2>- <textarea id="textarea" placeholder="Multi-line text..." oninput="mirrorTextarea()"></textarea>- <div id="textarea-mirror" style="font-size:14px;margin-top:6px;color:#333">content: </div>-</div>--<div class="section">- <h2>Link</h2>- <a href="#anchor" id="testlink" onclick="trackLink(event)">Test Link</a>- <div id="link-status" style="font-size:14px;margin-top:4px;color:#333">link: not clicked</div>-</div>--<div class="section">- <h2>Canvas</h2>- <canvas id="mycanvas" width="300" height="150"></canvas>- <div id="canvas-status">canvas: no click</div>-</div>--<div id="anchor" style="height:1px"></div>--<script>-// Button-var clickCount = 0;-function bumpClick() {- clickCount++;- document.getElementById('btn-counter').textContent = 'clicks: ' + clickCount;-}--// Text input-function mirrorText() {- document.getElementById('text-mirror').textContent = 'typed: ' + document.getElementById('textbox').value;-}--// Checkbox-function updateCheckbox() {- var cb = document.getElementById('checkbox');- document.getElementById('checkbox-label').textContent = cb.checked ? 'checked' : 'unchecked';-}--// Select-function updateSelect() {- var sel = document.getElementById('dropdown');- var txt = sel.options[sel.selectedIndex].text;- document.getElementById('select-label').textContent = 'selected: ' + txt;-}--// Textarea-function mirrorTextarea() {- document.getElementById('textarea-mirror').textContent = 'content: ' + document.getElementById('textarea').value;-}--// Link-function trackLink(e) {- document.getElementById('link-status').textContent = 'link: clicked';-}--// Canvas — draw on click, record last position-var canvas = document.getElementById('mycanvas');-var ctx = canvas.getContext('2d');-// Draw initial grey background-ctx.fillStyle = '#eee';-ctx.fillRect(0, 0, canvas.width, canvas.height);-ctx.fillStyle = '#999';-ctx.font = '14px sans-serif';-ctx.fillText('Click to draw', 90, 80);--canvas.addEventListener('mousedown', function(e) {- var rect = canvas.getBoundingClientRect();- var x = Math.round(e.clientX - rect.left);- var y = Math.round(e.clientY - rect.top);- canvas.dataset.lastX = x;- canvas.dataset.lastY = y;- // Draw a red dot- ctx.clearRect(0, 0, canvas.width, canvas.height);- ctx.fillStyle = '#eee';- ctx.fillRect(0, 0, canvas.width, canvas.height);- ctx.beginPath();- ctx.arc(x, y, 12, 0, Math.PI * 2);- ctx.fillStyle = '#e53935';- ctx.fill();- document.getElementById('canvas-status').textContent = 'canvas: clicked at (' + x + ',' + y + ')';-});-</script>-</body>-</html>diff --git a/libs/cua-driver/examples/jev-use/python/tests/test_authorized_workflow.py b/libs/cua-driver/examples/jev-use/python/tests/test_authorized_workflow.pydeleted file mode 100644index db6bce75ae..0000000000--- a/libs/cua-driver/examples/jev-use/python/tests/test_authorized_workflow.py+++ /dev/null@@ -1,44 +0,0 @@-from __future__ import annotations--import re-import unittest-from pathlib import Path---class AuthorizedWorkflowTest(unittest.TestCase):- @classmethod- def setUpClass(cls) -> None:- root = Path(__file__).resolve().parents[6]- cls.workflow = (- root / ".github/workflows/authorized-live-jev-use.yml"- ).read_text(encoding="utf-8")-- def test_actions_are_pinned_to_commits(self) -> None:- action_refs = re.findall(r"^\s*(?:-\s+)?uses:\s*[^@\s]+@([^\s]+)", self.workflow, re.MULTILINE)- self.assertTrue(action_refs)- self.assertTrue(all(re.fullmatch(r"[0-9a-f]{40}", ref) for ref in action_refs))-- def test_workflow_is_credential_free(self) -> None:- self.assertNotIn("TYPESAFE_API_KEY", self.workflow)- self.assertNotIn("secrets.", self.workflow)- self.assertNotIn("run_live", self.workflow)- self.assertNotIn("--live", self.workflow)-- def test_mock_steps_use_preinstalled_python_and_audit_mock_rows(self) -> None:- self.assertIn(- 'python_bin="$GITHUB_WORKSPACE/libs/cua-driver/examples/jev-use/.venv/bin/python"',- self.workflow,- )- self.assertIn("verify_setup.py --typescript --max-steps 2", self.workflow)- self.assertIn(".venv/bin/python verify_choice_cli.py", self.workflow)- self.assertIn('assert summary["live_requested"] is False', self.workflow)- self.assertIn('assert summary["typescript_requested"] is True', self.workflow)- mock_checks = re.search(- r"name: Run bounded mock checks\n(?:[^\n]*\n)*?.*?verify_setup\.py --typescript",- self.workflow,- )- self.assertIsNotNone(mock_checks)---if __name__ == "__main__":- unittest.main()diff --git a/libs/cua-driver/tests/manual-e2e-allowlist.txt b/libs/cua-driver/tests/manual-e2e-allowlist.txtindex 6167c5b583..8f42869300 100644--- a/libs/cua-driver/tests/manual-e2e-allowlist.txt+++ b/libs/cua-driver/tests/manual-e2e-allowlist.txt@@ -45,6 +45,8 @@ protocol_schema_test::cursor_motion_knobs_are_applied | Ignored on macOS only, wtransport_config_persistence_test::cli_set_config_visible_across_daemon_backed_invocations | Mutates the real per-user driver config through a daemon-backed CLI; manual onlyprivate_worker_test::service_untrusted_child_probe | Subprocess probe that the routed private_worker_test parent spawns itself; never a standalone rowauthorized_live_jev_use_demo_test::authorized_live_jev_no_matching_action_control | Needs the reviewed live Jev chooser and a protected credential; Actions deliberately runs only the mock chooser+authorized_live_jev_use_demo_test::authorized_visual_only_primary_desktop_demo | Needs the reviewed live Jev chooser and a protected credential; its dispatch workflow (authorized-live-jev-use-demo) was removed in CUA-3571, so manual only+authorized_live_jev_use_demo_test::authorized_visual_only_window_demo | Needs the reviewed live Jev chooser and a protected credential; its dispatch workflow (authorized-live-jev-use-demo) was removed in CUA-3571, so manual only# Packaged Notepad reads VK_PACKET ahead of translation (#4830). Manual on the Windows Space image.installed_app_notepad_windows_test::foreground_type_text_round_trips_through_notepad_save | Windows Space gate: packaged Notepad VK_PACKET read-ahead (#4830); record build, Notepad version, layout and IMEdiff --git a/libs/typescript/agent/README.md b/libs/typescript/agent/README.mddeleted file mode 100644index 450191d3f1..0000000000--- a/libs/typescript/agent/README.md+++ /dev/null@@ -1,5 +0,0 @@-# @trycua/agent--TypeScript SDK for Cua agent interaction via HTTP/HTTPS or peer-to-peer (WebRTC) connections.--**[Documentation](https://cua.ai/docs/cua/reference/agent-sdk)** - Installation, guides, and configuration.diff --git a/libs/typescript/agent/examples/README.md b/libs/typescript/agent/examples/README.mddeleted file mode 100644index 3e8b61412a..0000000000--- a/libs/typescript/agent/examples/README.md+++ /dev/null@@ -1,62 +0,0 @@-# Cua Agent Client Examples--This directory contains examples demonstrating how to use the `@trycua/agent` client library.--## Browser Example--### `playground-example.html`--A simple HTML page that demonstrates using the Cua Agent Client in a browser environment.--**Features:**--- Connect to HTTP/HTTPS or P2P (peer://) agent proxies-- Send text messages to any supported model-- View responses in real-time-- Health check functionality-- Clear, simple interface with no external dependencies--**Usage:**--1. **Build the library first:**-- ```bash- cd ../- pnpm build- ```--2. **Start a local web server** (required for ES modules):-- ```bash- # Option 1: Using Python- python -m http.server 8080-- # Option 2: Using Node.js (if you have http-server installed)- npx http-server -p 8080-- # Option 3: Using any other local server- ```--3. **Open in browser:**- Navigate to `http://localhost:8080/examples/playground-example.html`--4. **Configure and test:**- - Enter an agent URL (e.g., `https://localhost:8000` or `peer://some-peer-id`)- - Enter a model name (e.g., `anthropic/claude-sonnet-4-5-20250929`)- - Type a message and click "Send Message" or press Enter- - View the response in the output textarea--**Supported URLs:**--- **HTTP/HTTPS**: `https://localhost:8000`, `http://my-agent-server.com:8080`-- **Peer-to-Peer**: `peer://computer-agent-proxy`, `peer://any-peer-id`--**Example Models:**--- `anthropic/claude-sonnet-4-5-20250929`-- `openai/gpt-4`-- `huggingface-local/microsoft/UI-TARS-7B`--**Note:** A Cua agent proxy must be running at the URL you enter. The request-handlers live in `cua_agent.proxy` ([libs/python/agent](../../../python/agent));-`python -m cua_agent.proxy.examples` sends sample requests to one.diff --git a/libs/typescript/agent/examples/playground-example.html b/libs/typescript/agent/examples/playground-example.htmldeleted file mode 100644index bdc54aa5e7..0000000000--- a/libs/typescript/agent/examples/playground-example.html+++ /dev/null@@ -1,163 +0,0 @@-<!doctype html>-<html lang="en">- <head>- <meta charset="UTF-8" />- <meta name="viewport" content="width=device-width, initial-scale=1.0" />- <title>Cua Agent Playground Example</title>- </head>-- <body>- <h1>Cua Agent Playground Example</h1>-- <div>- <h2>Configuration</h2>- <label for="url">Agent URL:</label><br />- <input- type="text"- id="url"- placeholder="https://localhost:8000 or peer://peer-id"- value="https://localhost:8000"- style="width: 400px"- /><br /><br />-- <label for="model">Model:</label><br />- <input- type="text"- id="model"- placeholder="anthropic/claude-opus-4-1-20250805"- value="anthropic/claude-opus-4-1-20250805"- style="width: 400px"- /><br /><br />- </div>-- <div>- <h2>Chat</h2>- <label for="message">Message:</label><br />- <input- type="text"- id="message"- placeholder="Enter your message here..."- style="width: 400px"- /><br /><br />-- <button onclick="sendMessage()">Send Message</button>- <!-- <button onclick="checkHealth()">Check Health</button> -->- <button onclick="clearOutput()">Clear Output</button><br /><br />-- <label for="output">Output:</label><br />- <textarea id="output" rows="20" cols="80" readonly></textarea>- </div>-- <script src="https://unpkg.com/[email protected]/dist/peerjs.min.js"></script>- <script type="module">- // Import the AgentClient from the built library- import AgentClient from '/dist/index.js';-- let client = null;-- // Make functions available globally- window.sendMessage = sendMessage;- window.checkHealth = checkHealth;- window.clearOutput = clearOutput;-- function log(message) {- const output = document.getElementById('output');- const timestamp = new Date().toLocaleTimeString();- output.value += `[${timestamp}] ${message}\n`;- output.scrollTop = output.scrollHeight;- }-- function getClient() {- const url = document.getElementById('url').value.trim();- if (!url) {- log('ERROR: Please enter a URL');- return null;- }-- // Create new client if URL changed or client doesn't exist- if (!client || client.url !== url) {- try {- client = new AgentClient(url);- client.url = url; // Store URL for comparison- log(`Created new client for: ${url}`);- } catch (error) {- log(`ERROR creating client: ${error.message}`);- return null;- }- }-- return client;- }-- async function sendMessage() {- const messageInput = document.getElementById('message');- const modelInput = document.getElementById('model');-- const message = messageInput.value.trim();- const model = modelInput.value.trim();-- if (!message) {- log('ERROR: Please enter a message');- return;- }-- if (!model) {- log('ERROR: Please enter a model');- return;- }-- const agentClient = getClient();- if (!agentClient) return;-- try {- log(`Sending message: "${message}"`);- log(`Using model: ${model}`);-- const request = {- model: model,- input: message,- };-- log('Sending request...');- const response = await agentClient.responses.create(request);-- log('Response received:');- log(JSON.stringify(response, null, 2));-- // Clear the message input- messageInput.value = '';- } catch (error) {- log(`ERROR: ${error.message}`);- }- }-- async function checkHealth() {- const agentClient = getClient();- if (!agentClient) return;-- try {- log('Checking health...');- const health = await agentClient.health();- log(`Health status: ${health.status}`);- } catch (error) {- log(`ERROR checking health: ${error.message}`);- }- }-- function clearOutput() {- document.getElementById('output').value = '';- }-- // Allow sending message with Enter key- document.getElementById('message').addEventListener('keypress', function (e) {- if (e.key === 'Enter') {- sendMessage();- }- });-- // Log initial message- log('Cua Agent Client Browser Example loaded');- log('Enter a URL (HTTP/HTTPS or peer://) and model, then send a message');- </script>- </body>-</html>diff --git a/libs/typescript/agent/package.json b/libs/typescript/agent/package.jsondeleted file mode 100644index 67fa8facd0..0000000000--- a/libs/typescript/agent/package.json+++ /dev/null@@ -1,54 +0,0 @@-{- "name": "@trycua/agent",- "version": "0.1.0",- "packageManager": "[email protected]",- "description": "TypeScript SDK for Cua agent interaction",- "type": "module",- "license": "MIT",- "homepage": "https://github.com/trycua/cua/tree/main/libs/typescript/agent",- "bugs": {- "url": "https://github.com/trycua/cua/issues"- },- "repository": {- "type": "git",- "url": "git+https://github.com/trycua/cua.git"- },- "author": "cua",- "files": [- "dist"- ],- "main": "./dist/index.js",- "module": "./dist/index.js",- "types": "./dist/index.d.ts",- "exports": {- ".": "./dist/index.js",- "./package.json": "./package.json"- },- "publishConfig": {- "access": "public"- },- "scripts": {- "lint": "prettier --check .",- "lint:fix": "prettier --write .",- "build": "tsdown",- "dev": "tsdown --watch",- "test": "vitest",- "typecheck": "tsc --noEmit",- "release": "bumpp && pnpm publish",- "prepublishOnly": "pnpm run build"- },- "dependencies": {- "@trycua/core": "workspace:^",- "peerjs": "^1.5.4",- "pino": "^9.7.0"- },- "devDependencies": {- "@types/node": "^22.15.17",- "bumpp": "^10.1.0",- "happy-dom": "^20.8.9",- "tsdown": "^0.14.1",- "typescript": "^5.7.2",- "vitest": "^4.1.0",- "vite": "^7.3.5"- }-}diff --git a/libs/typescript/agent/src/client.ts b/libs/typescript/agent/src/client.tsdeleted file mode 100644index 4b4a9723af..0000000000--- a/libs/typescript/agent/src/client.ts+++ /dev/null@@ -1,298 +0,0 @@-import { Peer } from 'peerjs';-import { Telemetry } from '@trycua/core';-import { randomUUID } from 'node:crypto';-import { cuaVersionHeaders } from '@trycua/core';-import type { AgentRequest, AgentResponse, ConnectionType, AgentClientOptions } from './types';--/**- * The model name as telemetry sends it: `provider/model` stays, but a local- * path, URL or custom deployment (anything path-like, with a scheme, or- * longer than 64 characters) becomes `<provider>/custom` or `custom`.- */-export function telemetryModel(model: string | undefined): string {- const m = (model ?? '').trim();- if (!m) return 'unknown';- const provider = m.includes('/') ? m.split('/')[0] : '';- const pathLike =- m.includes('://') ||- m.includes('\\') ||- m.startsWith('/') ||- m.startsWith('~') ||- m.split('/').length > 2;- if (pathLike || m.length > 64 || !/^[A-Za-z0-9._:@\/-]+$/.test(m)) {- return /^[a-z0-9_-]{1,32}$/.test(provider) && !m.includes('://')- ? `${provider}/custom`- : 'custom';- }- return m;-}--export class AgentClient {- private url: string;- private connectionType: ConnectionType;- private options: AgentClientOptions;- private peer?: Peer;- private connection?: any;- private telemetry: Telemetry;- private sessionId: string;-- constructor(url: string, options: AgentClientOptions = {}) {- this.url = url;- this.options = {- timeout: 30000,- retries: 3,- ...options,- };- this.telemetry = new Telemetry();- this.sessionId = randomUUID();-- // Determine connection type from URL- if (url.startsWith('http://') || url.startsWith('https://')) {- this.connectionType = url.startsWith('https://') ? 'https' : 'http';- } else if (url.startsWith('peer://')) {- this.connectionType = 'peer';- } else {- throw new Error('Invalid URL format. Must start with http://, https://, or peer://');- }-- // Emit agent_client_initialized event- this.telemetry.recordEvent('agent_client_initialized', {- session_id: this.sessionId,- connection_type: this.connectionType,- has_api_key: !!options.apiKey,- node_version: process.version,- });- }-- // Main responses API matching the desired usage pattern- public responses = {- create: async (request: AgentRequest): Promise<AgentResponse> => {- return this.sendRequest(request);- },- };-- private async sendRequest(request: AgentRequest): Promise<AgentResponse> {- const requestId = randomUUID();- const startTime = Date.now();-- // Emit agent_request_start event- this.telemetry.recordEvent('agent_request_start', {- session_id: this.sessionId,- request_id: requestId,- model: telemetryModel(request.model),- connection_type: this.connectionType,- has_computer_kwargs: !!request.computer_kwargs,- has_agent_kwargs: !!request.agent_kwargs,- });-- try {- let response: AgentResponse;- switch (this.connectionType) {- case 'http':- case 'https':- response = await this.sendHttpRequest(request);- break;- case 'peer':- response = await this.sendPeerRequest(request);- break;- default:- throw new Error(`Unsupported connection type: ${this.connectionType}`);- }-- // Emit agent_request_end event on success- this.telemetry.recordEvent('agent_request_end', {- session_id: this.sessionId,- request_id: requestId,- model: telemetryModel(request.model),- duration_ms: Date.now() - startTime,- status: response.status,- num_messages: response.output?.length ?? 0,- prompt_tokens: response.usage?.prompt_tokens ?? 0,- completion_tokens: response.usage?.completion_tokens ?? 0,- total_tokens: response.usage?.total_tokens ?? 0,- response_cost: response.usage?.response_cost ?? 0,- });-- return response;- } catch (error) {- // Emit agent_request_error event on failure. Only the classified error- // type is sent; the raw message can contain URLs, paths or prompt text.- const errorMessage = error instanceof Error ? error.message : 'Unknown error';- const errorType = this.classifyError(errorMessage);-- this.telemetry.recordEvent('agent_request_error', {- session_id: this.sessionId,- request_id: requestId,- model: telemetryModel(request.model),- duration_ms: Date.now() - startTime,- error_type: errorType,- });-- throw error;- }- }-- private classifyError(errorMessage: string): string {- if (errorMessage.includes('timeout') || errorMessage.includes('abort')) {- return 'timeout';- }- if (errorMessage.includes('HTTP error')) {- return 'http_error';- }- if (errorMessage.includes('parse') || errorMessage.includes('JSON')) {- return 'parse_error';- }- if (- errorMessage.includes('network') ||- errorMessage.includes('fetch') ||- errorMessage.includes('connect')- ) {- return 'network';- }- if (errorMessage.includes('Peer')) {- return 'peer_error';- }- return 'unknown';- }-- private async sendHttpRequest(request: AgentRequest): Promise<AgentResponse> {- const controller = new AbortController();- const timeoutId = setTimeout(() => controller.abort(), this.options.timeout);-- try {- const headers: Record<string, string> = {- 'Content-Type': 'application/json',- ...cuaVersionHeaders('agent', __CUA_VERSION__),- };- if (this.options.apiKey) {- headers['X-API-Key'] = this.options.apiKey;- }-- const response = await fetch(`${this.url}/responses`, {- method: 'POST',- headers,- body: JSON.stringify(request),- signal: controller.signal,- });-- clearTimeout(timeoutId);-- if (!response.ok) {- throw new Error(`HTTP error! status: ${response.status}`);- }-- const data = await response.json();- return data as AgentResponse;- } catch (error) {- clearTimeout(timeoutId);- if (error instanceof Error) {- throw new Error(`Failed to send HTTP request: ${error.message}`);- }- throw error;- }- }-- private async sendPeerRequest(request: AgentRequest): Promise<AgentResponse> {- // Extract peer ID from peer:// URL- const peerId = this.url.replace('peer://', '');-- if (!this.peer) {- // Initialize peer connection with default options as requested- this.peer = new Peer();-- return new Promise<AgentResponse>((resolve, reject) => {- const timeout = setTimeout(() => {- reject(new Error('Peer connection timeout'));- }, this.options.timeout);-- this.peer!.on('open', () => {- // Connect to the target peer- this.connection = this.peer!.connect(peerId);-- this.connection.on('open', () => {- // Send the request- this.connection!.send(JSON.stringify(request));- });-- this.connection.on('data', (data: any) => {- clearTimeout(timeout);- try {- const response = typeof data === 'string' ? JSON.parse(data) : data;- resolve(response as AgentResponse);- } catch (error) {- reject(new Error('Failed to parse peer response'));- }- });-- this.connection.on('error', (error: any) => {- clearTimeout(timeout);- reject(new Error(`Peer connection error: ${error}`));- });- });-- this.peer!.on('error', (error: any) => {- clearTimeout(timeout);- reject(new Error(`Peer error: ${error}`));- });- });- } else {- // Reuse existing connection- return new Promise<AgentResponse>((resolve, reject) => {- const timeout = setTimeout(() => {- reject(new Error('Peer request timeout'));- }, this.options.timeout);-- if (this.connection && this.connection.open) {- this.connection.send(JSON.stringify(request));-- const handleData = (data: any) => {- clearTimeout(timeout);- this.connection!.off('data', handleData);- try {- const response = typeof data === 'string' ? JSON.parse(data) : data;- resolve(response as AgentResponse);- } catch (error) {- reject(new Error('Failed to parse peer response'));- }- };-- this.connection.on('data', handleData);- } else {- clearTimeout(timeout);- reject(new Error('Peer connection not available'));- }- });- }- }-- // Health check method- async health(): Promise<{ status: string }> {- if (this.connectionType === 'peer') {- return { status: this.peer?.open ? 'connected' : 'disconnected' };- }-- try {- const response = await fetch(`${this.url}/health`);- if (response.ok) {- return { status: 'healthy' };- }- return { status: 'unhealthy' };- } catch {- return { status: 'unreachable' };- }- }-- // Clean up resources- async disconnect(): Promise<void> {- if (this.connection) {- this.connection.close();- this.connection = undefined;- }- if (this.peer) {- this.peer.destroy();- this.peer = undefined;- }- // Flush and shutdown telemetry- await this.telemetry.shutdown();- }-}diff --git a/libs/typescript/agent/src/globals.d.ts b/libs/typescript/agent/src/globals.d.tsdeleted file mode 100644index f78c5ad001..0000000000--- a/libs/typescript/agent/src/globals.d.ts+++ /dev/null@@ -1,2 +0,0 @@-/** Build-time constant injected by tsdown `define`. */-declare const __CUA_VERSION__: string;diff --git a/libs/typescript/agent/src/index.ts b/libs/typescript/agent/src/index.tsdeleted file mode 100644index 6f83a360ab..0000000000--- a/libs/typescript/agent/src/index.ts+++ /dev/null@@ -1,39 +0,0 @@-import { Telemetry } from '@trycua/core';--// Emit module_init event when the agent package is imported-const telemetry = new Telemetry();-telemetry.recordEvent('module_init', {- module: 'agent',- version: process.env.npm_package_version || '0.1.0',- node_version: process.version,-});--// Export the main AgentClient class as default-export { AgentClient as default } from './client.js';--// Also export as named export for flexibility-export { AgentClient } from './client.js';--// Export types for TypeScript users-export type {- AgentRequest,- AgentResponse,- AgentMessage,- UserMessage,- AssistantMessage,- ReasoningMessage,- ComputerCallMessage,- ComputerCallOutputMessage,- OutputContent,- SummaryContent,- InputContent,- ComputerAction,- ClickAction,- TypeAction,- KeyPressAction,- ScrollAction,- WaitAction,- Usage,- ConnectionType,- AgentClientOptions,-} from './types';diff --git a/libs/typescript/agent/src/types.ts b/libs/typescript/agent/src/types.tsdeleted file mode 100644index 546068032b..0000000000--- a/libs/typescript/agent/src/types.ts+++ /dev/null@@ -1,192 +0,0 @@-// #region Request-export type ConnectionType = 'http' | 'https' | 'peer';-export interface AgentClientOptions {- timeout?: number;- retries?: number;- /** Optional Cua API key to send as X-API-Key header for HTTP requests */- apiKey?: string;-}-// Request types matching the Python proxy API-export interface AgentRequest {- model: string;- input: string | AgentMessage[];- agent_kwargs?: {- save_trajectory?: boolean;- verbosity?: number;- [key: string]: any;- };- computer_kwargs?: {- os_type?: string;- provider_type?: string;- [key: string]: any;- };- /**- * Optional per-request environment variable overrides.- * Keys and values are strings and will be forwarded to the backend proxy.- */- env?: Record<string, string>;-}-// #endregion--// #region Response-// Response types-export interface AgentResponse {- output: AgentMessage[];- usage: Usage;- status: 'completed' | 'failed';- error?: string;-}-// Usage information-export interface Usage {- prompt_tokens: number;- completion_tokens: number;- total_tokens: number;- response_cost: number;-}-// #endregion--// #region Messages-// Agent message types - can be one of several different message types-export type AgentMessage =- | UserMessage- | AssistantMessage- | ReasoningMessage- | ComputerCallMessage- | ComputerCallOutputMessage- | FunctionCallMessage- | FunctionCallOutputMessage;-// Input message-export interface UserMessage {- type?: 'message';- role: 'user' | 'system' | 'developer';- content: string | InputContent[];-}-// Output message-export interface AssistantMessage {- type: 'message';- role: 'assistant';- content: OutputContent[];-}-// Output reasoning/thinking message-export interface ReasoningMessage {- type: 'reasoning';- summary: SummaryContent[];-}-// Output computer action call-export interface ComputerCallMessage {- type: 'computer_call';- call_id: string;- status: 'completed' | 'failed' | 'pending';- action: ComputerAction;-}-// Output computer action result (always a screenshot)-export interface ComputerCallOutputMessage {- type: 'computer_call_output';- call_id: string;- output: ComputerResultContent;-}-// Output function call-export interface FunctionCallMessage {- type: 'function_call';- call_id: string;- status: 'completed' | 'failed' | 'pending';- name: string;- arguments: string; // JSON dict of kwargs-}-// Output function call result (always text)-export interface FunctionCallOutputMessage {- type: 'function_call_output';- call_id: string;- output: string;-}-// #endregion--// #region Message Content-export interface InputContent {- type: 'input_image' | 'input_text';- text?: string;- image_url?: string;-}-export interface OutputContent {- type: 'output_text';- text: string;-}-export interface SummaryContent {- type: 'summary_text';- text: string;-}-export interface ComputerResultContent {- type: 'computer_screenshot' | 'input_image';- image_url: string;-}-// #endregion--// #region Actions-export type ComputerAction = ComputerActionOpenAI | ComputerActionAnthropic;-// OpenAI Computer Actions-export type ComputerActionOpenAI =- | ClickAction- | DoubleClickAction- | DragAction- | KeyPressAction- | MoveAction- | ScreenshotAction- | ScrollAction- | TypeAction- | WaitAction;-export interface ClickAction {- type: 'click';- button: 'left' | 'right' | 'wheel' | 'back' | 'forward';- x: number;- y: number;-}-export interface DoubleClickAction {- type: 'double_click';- button?: 'left' | 'right' | 'wheel' | 'back' | 'forward';- x: number;- y: number;-}-export interface DragAction {- type: 'drag';- button?: 'left' | 'right' | 'wheel' | 'back' | 'forward';- path: Array<[number, number]>;-}-export interface KeyPressAction {- type: 'keypress';- keys: string[];-}-export interface MoveAction {- type: 'move';- x: number;- y: number;-}-export interface ScreenshotAction {- type: 'screenshot';-}-export interface ScrollAction {- type: 'scroll';- scroll_x: number;- scroll_y: number;- x: number;- y: number;-}-export interface TypeAction {- type: 'type';- text: string;-}-export interface WaitAction {- type: 'wait';-}-// Anthropic Computer Actions-export type ComputerActionAnthropic = LeftMouseDownAction | LeftMouseUpAction;-export interface LeftMouseDownAction {- type: 'left_mouse_down';- x: number;- y: number;-}-export interface LeftMouseUpAction {- type: 'left_mouse_up';- x: number;- y: number;-}-// #endregiondiff --git a/libs/typescript/agent/tests/client.test.ts b/libs/typescript/agent/tests/client.test.tsdeleted file mode 100644index b267b12282..0000000000--- a/libs/typescript/agent/tests/client.test.ts+++ /dev/null@@ -1,34 +0,0 @@-import { describe, it, expect } from 'vitest';-import AgentClient from '../src/index.js';--describe('AgentClient', () => {- it('should create client with HTTP URL', () => {- const client = new AgentClient('https://localhost:8000');- expect(client).toBeDefined();- expect(client.responses).toBeDefined();- expect(typeof client.responses.create).toBe('function');- });-- it('should create client with peer URL', () => {- const client = new AgentClient('peer://test-peer-id');- expect(client).toBeDefined();- expect(client.responses).toBeDefined();- expect(typeof client.responses.create).toBe('function');- });-- it('should throw error for invalid URL', () => {- expect(() => {- new AgentClient('invalid://url');- }).toThrow('Invalid URL format');- });-- it('should have health method', async () => {- const client = new AgentClient('https://localhost:8000');- expect(typeof client.health).toBe('function');- });-- it('should have disconnect method', async () => {- const client = new AgentClient('https://localhost:8000');- expect(typeof client.disconnect).toBe('function');- });-});diff --git a/libs/typescript/agent/tests/telemetry.test.ts b/libs/typescript/agent/tests/telemetry.test.tsdeleted file mode 100644index 775aede0a0..0000000000--- a/libs/typescript/agent/tests/telemetry.test.ts+++ /dev/null@@ -1,53 +0,0 @@-import { describe, expect, it, vi } from 'vitest';--const recorded: { event: string; props: Record<string, unknown> }[] = [];--vi.mock('@trycua/core', async (importOriginal) => {- const actual = await importOriginal<typeof import('@trycua/core')>();- class FakeTelemetry {- recordEvent(event: string, props: Record<string, unknown> = {}) {- recorded.push({ event, props });- }- async shutdown() {}- }- return { ...actual, Telemetry: FakeTelemetry };-});--describe('AgentClient telemetry', () => {- it('agent_request_error sends only the classified error type', async () => {- const { AgentClient } = await import('../src/client.js');- const secret = 'failed for /Users/alice/private prompt: buy [email protected] a gift';- const fetchMock = vi.fn(async () => {- throw new Error(secret);- });- vi.stubGlobal('fetch', fetchMock);- try {- const client = new AgentClient('https://localhost:8000', { retries: 0 });- await expect(- client.responses.create({ model: 'anthropic/claude', input: 'hi' } as never)- ).rejects.toThrow();- } finally {- vi.unstubAllGlobals();- }- const err = recorded.find((r) => r.event === 'agent_request_error');- expect(err).toBeDefined();- expect(err!.props).not.toHaveProperty('error_message');- expect(typeof err!.props.error_type).toBe('string');- expect(JSON.stringify(recorded)).not.toContain('alice');- });-});--describe('telemetryModel', () => {- it('keeps provider/model and coarsens paths, URLs and custom deployments', async () => {- const { telemetryModel } = await import('../src/client.js');- expect(telemetryModel('anthropic/claude-sonnet-4-5')).toBe('anthropic/claude-sonnet-4-5');- expect(telemetryModel('gpt-4o')).toBe('gpt-4o');- expect(telemetryModel('huggingface-local//Users/alice/models/x')).toBe(- 'huggingface-local/custom'- );- expect(telemetryModel('openai/https://llm.corp.example/v1')).toBe('custom');- expect(telemetryModel('https://llm.corp.example/v1')).toBe('custom');- expect(telemetryModel('~/models/mine')).toBe('custom');- expect(telemetryModel(undefined)).toBe('unknown');- });-});diff --git a/libs/typescript/agent/tsconfig.json b/libs/typescript/agent/tsconfig.jsondeleted file mode 100644index cdcd74de6f..0000000000--- a/libs/typescript/agent/tsconfig.json+++ /dev/null@@ -1,22 +0,0 @@-{- "compilerOptions": {- "target": "esnext",- "lib": ["es2023"],- "moduleDetection": "force",- "module": "preserve",- "moduleResolution": "bundler",- "allowImportingTsExtensions": true,- "resolveJsonModule": true,- "types": ["node"],- "allowSyntheticDefaultImports": true,- "strict": true,- "noUnusedLocals": true,- "declaration": true,- "emitDeclarationOnly": true,- "esModuleInterop": true,- "isolatedModules": true,- "verbatimModuleSyntax": true,- "skipLibCheck": true- },- "include": ["src"]-}diff --git a/libs/typescript/agent/tsdown.config.ts b/libs/typescript/agent/tsdown.config.tsdeleted file mode 100644index 2953918b7c..0000000000--- a/libs/typescript/agent/tsdown.config.ts+++ /dev/null@@ -1,18 +0,0 @@-import { readFileSync } from 'node:fs';-import { defineConfig } from 'tsdown';--const pkg = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf-8'));--export default defineConfig({- entry: ['src/index.ts'],- format: ['module'],- platform: 'browser',- dts: true,- clean: true,- // Remove if we don't need to support including the library via '<script/>' tags.- // noExternal bundles this list of libraries within the final 'dist'- noExternal: ['peerjs'],- define: {- __CUA_VERSION__: JSON.stringify(pkg.version),- },-});diff --git a/libs/typescript/agent/vitest.config.ts b/libs/typescript/agent/vitest.config.tsdeleted file mode 100644index ee3e5613a9..0000000000--- a/libs/typescript/agent/vitest.config.ts+++ /dev/null@@ -1,9 +0,0 @@-import { defineConfig } from 'vitest/config';--export default defineConfig({- test: {- environment: 'happy-dom',- // Tests must never send real telemetry.- env: { CUA_TELEMETRY: '0', DO_NOT_TRACK: '1' },- },-});diff --git a/libs/typescript/pnpm-lock.yaml b/libs/typescript/pnpm-lock.yamlindex 66e32d8cff..e52bd9797f 100644--- a/libs/typescript/pnpm-lock.yaml+++ b/libs/typescript/pnpm-lock.yaml@@ -25,40 +25,6 @@ importers:specifier: ^3.6.2version: 3.8.1- agent:- dependencies:- '@trycua/core':- specifier: workspace:^- version: link:../core- peerjs:- specifier: ^1.5.4- version: 1.5.5- pino:- specifier: ^9.7.0- version: 9.14.0- devDependencies:- '@types/node':- specifier: ^22.15.17- version: 22.19.8- bumpp:- specifier: ^10.1.0- version: 10.4.0- happy-dom:- specifier: 20.8.9- version: 20.8.9- tsdown:- specifier: ^0.14.1- version: 0.14.2([email protected])- typescript:- specifier: ^5.7.2- version: 5.9.3- vite:- specifier: 7.3.5- vitest:- specifier: 4.1.0- version: 4.1.0(@types/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected]))-core:dependencies:'@types/uuid':@@ -412,16 +378,9 @@ packages:'@jridgewell/[email protected]':resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==}- '@msgpack/[email protected]':- resolution: {integrity: sha512-h9u4u/jiIRKbq25PM+zymTyW6bhTzELvOoUd+AvYriWOAKpLGnIamaET3pnHYoI5iYphAHBI4ayx0MehR+VVPQ==}- engines: {node: '>= 10'}-'@napi-rs/[email protected]':resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==}- '@oxc-project/[email protected]':- resolution: {integrity: sha512-oM/5rLBm2tPkg0iBgkH/FOeR3PCDpY19GTgAZjMFM8h9WI9VW7cLgzp6nwtarYKmovavIQZ+Fe/RKX/8C8O/Rw==}-'@oxc-project/[email protected]':resolution: {integrity: sha512-ngyLUpUjO3dpqygSRQDx7nMx8+BmXbWOU4oIwTJFV2MVIDG7knIZwgdwXlQWLg3C3oxg1lS7ppMtPKqKFb7wzw==}@@ -773,124 +732,46 @@ packages:'@radix-ui/[email protected]':resolution: {integrity: sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==}- '@rolldown/[email protected]':- resolution: {integrity: sha512-dB/a1214qKfHMXCpgqR4OZT+jS4kTyEXbQGJPqzobt5EwH5rX080pxE37alt3RzvR1bf1Yz/yGqRfrYAxuPw0A==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [arm]- os: [android]-- '@rolldown/[email protected]':- resolution: {integrity: sha512-7KHFgQ5VJxIHcLlrwrc3Xbds7oTNQT7Pgi9gQCJKrd2VGab/UksIOYp6VD8MzCstGxOKMgNamPwUCfxPdP1OHg==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [arm64]- os: [android]-'@rolldown/[email protected]':resolution: {integrity: sha512-geUG/FUpm+membLC0NQBb39vVyOfguYZ2oyXc7emr6UjH6TeEECT4b0CPZXKFnELareTiU/Jfl70/eEgNxyQeA==}cpu: [arm64]os: [darwin]- '@rolldown/[email protected]':- resolution: {integrity: sha512-3YIhqHD96nA5SaYNRBR16HnGv4oavZvXfD/ayHM+oYZ0WD/8lBAtf6zQua4kEyAvpqrluKXl0lnOBoiNby7x9w==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [arm64]- os: [darwin]-'@rolldown/[email protected]':resolution: {integrity: sha512-7wPXDwcOtv2I+pWTL2UNpNAxMAGukgBT90Jz4DCfwaYdGvQncF7J0S7IWrRVsRFhBavxM+65RcueE3VXw5UIbg==}cpu: [x64]os: [darwin]- '@rolldown/[email protected]':- resolution: {integrity: sha512-UuuJ35MFw4gmFOrE9pEqIV+K3syIKveph+Qc1/ljHZVdoDW4pz/JHR/eMVom+TZGl/5OOvGJOWaOCVt3ZfqhxA==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [x64]- os: [darwin]-'@rolldown/[email protected]':resolution: {integrity: sha512-agO5mONTNKVrcIt4SRxw5Ni0FOVV3gaH8dIiNp1A4JeU91b9kw7x+JRuNJAQuM2X3pYqVvA6qh13UTNOsaqM/Q==}cpu: [x64]os: [freebsd]- '@rolldown/[email protected]':- resolution: {integrity: sha512-uMvssit0a4W+/7D8CbHUvG719mH3R2jwXAlh/XcPvuHTE0g++LymF88DCGNX0HM2rBOn0xrzgXktIB6fLSJBTQ==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [x64]- os: [freebsd]-'@rolldown/[email protected]':resolution: {integrity: sha512-dDNDV9p/8WYDriS9HCcbH6y6+JP38o3enj/pMkdkmkxEnZ0ZoHIfQ9RGYWeRYU56NKBCrya4qZBJx49Jk9LRug==}cpu: [arm]os: [linux]- '@rolldown/[email protected]':- resolution: {integrity: sha512-XcFu0R0xWnwzSf4IQgFH1rJIckPN1pLy2R+4r9IDB7Yfu/ys9cVqfa4pBrMHj7a3gl8mIR4nRNPg0e5IvEVs6g==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [arm]- os: [linux]-'@rolldown/[email protected]':resolution: {integrity: sha512-kZKegmHG1ZvfsFIwYU6DeFSxSIcIliXzeznsJHUo9D9/dlVSDi/PUvsRKcuJkQjZoejM6pk8MHN/UfgGdIhPHw==}cpu: [arm64]os: [linux]- '@rolldown/[email protected]':- resolution: {integrity: sha512-260UrKgn8tz39ak+SMDOirKzr7V04M9dWPw5llW00SwBivCZoWcRBKV1d8cXnRkUmSZA3BdiUmBHWk7734Ulpw==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [arm64]- os: [linux]-'@rolldown/[email protected]':resolution: {integrity: sha512-f+VL8mO31pyMJiJPr2aA1ryYONkP2UqgbwK7fKtKHZIeDd/AoUGn3+ujPqDhuy2NxgcJ5H8NaSvDpG1tJMHh+g==}cpu: [arm64]os: [linux]- '@rolldown/[email protected]':- resolution: {integrity: sha512-5YK1I9SqDkbPgc1IA8BgDl34suqUS2q0KWnBrirm0E51YjOs6eo6dV6jbQfNE/argHRSvd0QUGgtpIoYx+WWpw==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [arm64]- os: [linux]-- '@rolldown/[email protected]':- resolution: {integrity: sha512-Rkcrmp7eFRg74yL5fXEU91JEWbdEPLevWwGtXpmhbjlD1StScbWTmO94Bhly+Mo+ketKYkdmM1vNUKeWSlx8cQ==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [ppc64]- os: [linux]-- '@rolldown/[email protected]':- resolution: {integrity: sha512-qvK4DuAsQc2BSjlx+Xr+IzOIvvxbGZqxFwdWfG6F518Erj0GGISyQbJ6pIappnOxlNPzNHvo/L0BwB30GZ+zVw==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [s390x]- os: [linux]-'@rolldown/[email protected]':resolution: {integrity: sha512-GiUEZ0WPjX5LouDoC3O8aJa4h6BLCpIvaAboNw5JoRour/3dC6rbtZZ/B5FC3/ySsN3/dFOhAH97ylQxoZJi7A==}cpu: [x64]os: [linux]- '@rolldown/[email protected]':- resolution: {integrity: sha512-Q9uLBO53Xd4QIq1WOycVQyPP1O4HhraEV2qqb3uTrnVw6QZih9duY4vNXOivL1xoUS1/z+W8eF4NMfl2a8Sdjw==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [x64]- os: [linux]-'@rolldown/[email protected]':resolution: {integrity: sha512-AMb0dicw+QHh6RxvWo4BRcuTMgS0cwUejJRMpSyIcHYnKTbj6nUW4HbWNQuDfZiF27l6F5gEwBS+YLUdVzL9vg==}cpu: [x64]os: [linux]- '@rolldown/[email protected]':- resolution: {integrity: sha512-3IBxWFMjbOZskDPKv8Lf9BCnahlKuHthWkYnyIxOH/QcJrFcS4EmcenthApkwr/5+nEqZlLzeYbxeMaX7A5u4g==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [x64]- os: [linux]-- '@rolldown/[email protected]':- resolution: {integrity: sha512-xtX61xg4LKPkPWilZU1ynKClz5Gj4bf74LML4r3eVLWumKnGjoEr1OSHQhMdbBDoYTi+yjrujvpZe2pUnqCrrA==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [arm64]- os: [openharmony]-'@rolldown/[email protected]':resolution: {integrity: sha512-+pdaiTx7L8bWKvsAuCE0HAxP1ze1WOLoWGCawcrZbMSY10dMh2i82lJiH6tXGXbfYYwsNWhWE2NyG4peFZvRfQ==}engines: {node: '>=14.21.3'}@@ -901,12 +782,6 @@ packages:cpu: [arm64]os: [win32]- '@rolldown/[email protected]':- resolution: {integrity: sha512-At7fPB6PCaIjzgIhEZFxuT+BBFqiQibJDT4d3PhiR3f4E7bbMZF4aKblbFfEM3sETRDd1YiQx/+U/g/B/ou5Ew==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [arm64]- os: [win32]-'@rolldown/[email protected]':resolution: {integrity: sha512-DzKN7iEYjAP8AK8F2G2aCej3fk43Y/EQrVrR3gF0XREes56chjQ7bXIhw819jv74BbxGdnpPcslhet/cgt7WRA==}cpu: [ia32]@@ -917,18 +792,9 @@ packages:cpu: [x64]os: [win32]- '@rolldown/[email protected]':- resolution: {integrity: sha512-WIw2haVKwjuYdXkHaoC0mF8Le71TuCBxjrdKqLbJGctbBABj+ClfmNvtbOnzpq3RokNo5+V1qhtSzJyXorsklQ==}- engines: {node: ^20.19.0 || >=22.12.0}- cpu: [x64]- os: [win32]-'@rolldown/[email protected]':resolution: {integrity: sha512-e9MeMtVWo186sgvFFJOPGy7/d2j2mZhLJIdVW0C/xDluuOvymEATqz6zKsP0ZmXGzQtqlyjz5sC1sYQUoJG98w==}- '@rolldown/[email protected]':- resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==}-'@rollup/[email protected]':resolution: {integrity: sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==}cpu: [arm]@@ -1305,10 +1171,6 @@ packages:resolution: {integrity: sha512-rsPft6CK3eHtrlp9Y5ALBb+hfK+DWnA4WFebbazxjWyx8vSm3rZeoM3z9irsjcqO3PYRzlfv27XIB4tz2DV7RA==}engines: {node: '>=14'}- resolution: {integrity: sha512-i6UzDscO/XfAcNYD75CfICkmfLedpyPDdozrLMmQc5ORaQcdMoc21OnlEylMIqI7U8eniKrPMxxtj8k0vhmJhA==}- engines: {node: '>=14'}-resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==}engines: {node: '>=0.12'}@@ -1335,9 +1197,6 @@ packages:resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}- resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==}-resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==}engines: {node: '>=12.0.0'}@@ -1649,14 +1508,6 @@ packages:resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==}- resolution: {integrity: sha512-YIwCC+pTzp3Bi8jPI9UFKO0t0SLo6xALnHkiNt/iUFmUUZG0fEEmEyFKvjsDKweiFitzHRyhuh6NvyJZ4nNxMg==}- engines: {node: '>= 14.0.0'}-- resolution: {integrity: sha512-viMUCPDL6CSfOu0ZqVcFqbWRXNHIbv2lPqNbrBIjbFYrflebOjItJ4hPfhjnuUCstqciHVu9vVJ7jFqqKi/EuQ==}- engines: {node: '>= 14'}-resolution: {integrity: sha512-LjgdTytVFXeUgtHZr9WYViYSM/g8MkcTPYDlPa3cDqMirHjKiSZPYd6DoL7pK8AJQr+uWkQvCjHNdiMqsrJs+g==}@@ -1796,22 +1647,6 @@ packages:vue-tsc:optional: true- resolution: {integrity: sha512-8cPVAVQUo9tYAoEpc3jFV9RxSil13hrRRg8cHC9gLXxRMNtWPc1LNMSDXzjyD+5Vny49sDZH77JlXp/vlc4I3g==}- engines: {node: '>=20.18.0'}- peerDependencies:- '@typescript/native-preview': '>=7.0.0-dev.20250601.1'- rolldown: ^1.0.0-beta.9- typescript: ^5.0.0- vue-tsc: ~3.0.3- peerDependenciesMeta:- '@typescript/native-preview':- optional: true- typescript:- optional: true- vue-tsc:- optional: true-resolution: {integrity: sha512-ZgZky52n6iF0UainGKjptKGrOG4Con2S5sdc4C4y2Oj25D5PHAY8Y8E5f3M2TSd/zlhQs574JlMeTe3vREczSg==}hasBin: true@@ -1821,11 +1656,6 @@ packages:'@oxc-project/runtime':optional: true- resolution: {integrity: sha512-8wafseiaG80xmXSfqidUNqZcylTlhmPZZt+za2m+js2sFZ8dTNlhIOV2WcbIPx2hgwPBJpEUGFAMZ9bgBBLTSQ==}- engines: {node: ^20.19.0 || >=22.12.0}- hasBin: true-resolution: {integrity: sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==}engines: {node: '>=18.0.0', npm: '>=8.0.0'}@@ -1838,9 +1668,6 @@ packages:resolution: {integrity: sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==}- resolution: {integrity: sha512-lwsAIzOPlH8/7IIjjz3K0zYBk7aBVVcvjMwt3M4fLxpjMYyy7i3I97SLHebgn4YBjirkzfp3RvRDWSKsh/+WFw==}-resolution: {integrity: sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==}engines: {node: '>=10'}@@ -1915,10 +1742,6 @@ packages:resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==}engines: {node: '>=14.0.0'}- resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==}- hasBin: true-resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==}@@ -1944,28 +1767,6 @@ packages:unplugin-unused:optional: true- resolution: {integrity: sha512-6ThtxVZoTlR5YJov5rYvH8N1+/S/rD/pGfehdCLGznGgbxz+73EASV1tsIIZkLw2n+SXcERqHhcB/OkyxdKv3A==}- engines: {node: '>=20.19.0'}- hasBin: true- peerDependencies:- '@arethetypeswrong/core': ^0.18.1- publint: ^0.3.0- typescript: ^5.0.0- unplugin-lightningcss: ^0.4.0- unplugin-unused: ^0.5.0- peerDependenciesMeta:- '@arethetypeswrong/core':- optional: true- publint:- optional: true- typescript:- optional: true- unplugin-lightningcss:- optional: true- unplugin-unused:- optional: true-resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==}@@ -2114,10 +1915,6 @@ packages:jsdom:optional: true- resolution: {integrity: sha512-5fALBcroIl31OeXAdd1YUntxiZl1eHlZZWzNg3U4Fn+J9/cGL3eT80YlrsWGvj2ojuz1rZr2OXkgCzIxAZ7vRQ==}- engines: {node: '>=6.0.0', npm: '>=3.10.0'}-resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==}engines: {node: '>=12'}@@ -2306,8 +2103,6 @@ snapshots:'@jridgewell/resolve-uri': 3.1.2'@jridgewell/sourcemap-codec': 1.5.5- '@msgpack/[email protected]': {}-'@napi-rs/[email protected]':dependencies:'@emnapi/core': 1.8.1@@ -2315,8 +2110,6 @@ snapshots:'@tybys/wasm-util': 0.10.1optional: true- '@oxc-project/[email protected]': {}-'@oxc-project/[email protected]': {}'@pinojs/[email protected]': {}@@ -2664,69 +2457,30 @@ snapshots:'@radix-ui/[email protected]': {}- '@rolldown/[email protected]':- optional: true-- '@rolldown/[email protected]':- optional: true-'@rolldown/[email protected]':optional: true- '@rolldown/[email protected]':- optional: true-'@rolldown/[email protected]':optional: true- '@rolldown/[email protected]':- optional: true-'@rolldown/[email protected]':optional: true- '@rolldown/[email protected]':- optional: true-'@rolldown/[email protected]':optional: true- '@rolldown/[email protected]':- optional: true-'@rolldown/[email protected]':optional: true- '@rolldown/[email protected]':- optional: true-'@rolldown/[email protected]':optional: true- '@rolldown/[email protected]':- optional: true-- '@rolldown/[email protected]':- optional: true-- '@rolldown/[email protected]':- optional: true-'@rolldown/[email protected]':optional: true- '@rolldown/[email protected]':- optional: true-'@rolldown/[email protected]':optional: true- '@rolldown/[email protected]':- optional: true-- '@rolldown/[email protected]':- optional: true-'@rolldown/[email protected]':dependencies:'@napi-rs/wasm-runtime': 0.2.12@@ -2735,22 +2489,14 @@ snapshots:'@rolldown/[email protected]':optional: true- '@rolldown/[email protected]':- optional: true-'@rolldown/[email protected]':optional: true'@rolldown/[email protected]':optional: true- '@rolldown/[email protected]':- optional: true-'@rolldown/[email protected]': {}- '@rolldown/[email protected]': {}-'@rollup/[email protected]':optional: true@@ -3062,8 +2808,6 @@ snapshots:- [email protected]: {}-@@ -3107,8 +2851,6 @@ snapshots:dependencies:'@types/estree': 1.0.8- [email protected]: {}-@@ -3621,15 +3363,6 @@ snapshots:- [email protected]: {}-- dependencies:- '@msgpack/msgpack': 2.8.0- eventemitter3: 4.0.7- peerjs-js-binarypack: 2.1.0- webrtc-adapter: 9.0.3-@@ -3798,23 +3531,6 @@ snapshots:- oxc-resolver- supports-color- dependencies:- '@babel/generator': 7.29.1- '@babel/parser': 7.29.0- '@babel/types': 7.29.0- ast-kit: 2.2.0- birpc: 2.9.0- debug: 4.4.3- dts-resolver: 2.1.3- get-tsconfig: 4.13.1- rolldown: 1.2.12- optionalDependencies:- typescript: 5.9.3- transitivePeerDependencies:- - oxc-resolver- - supports-color-dependencies:'@oxc-project/types': 0.70.0@@ -3834,27 +3550,6 @@ snapshots:'@rolldown/binding-win32-ia32-msvc': 1.0.0-beta.9'@rolldown/binding-win32-x64-msvc': 1.0.0-beta.9- dependencies:- '@oxc-project/types': 0.152.0- '@rolldown/pluginutils': 1.0.1- optionalDependencies:- '@rolldown/binding-android-arm-eabi': 1.2.12- '@rolldown/binding-android-arm64': 1.2.12- '@rolldown/binding-darwin-arm64': 1.2.12- '@rolldown/binding-darwin-x64': 1.2.12- '@rolldown/binding-freebsd-x64': 1.2.12- '@rolldown/binding-linux-arm-gnueabihf': 1.2.12- '@rolldown/binding-linux-arm64-gnu': 1.2.12- '@rolldown/binding-linux-arm64-musl': 1.2.12- '@rolldown/binding-linux-ppc64-gnu': 1.2.12- '@rolldown/binding-linux-s390x-gnu': 1.2.12- '@rolldown/binding-linux-x64-gnu': 1.2.12- '@rolldown/binding-linux-x64-musl': 1.2.12- '@rolldown/binding-openharmony-arm64': 1.2.12- '@rolldown/binding-win32-arm64-msvc': 1.2.12- '@rolldown/binding-win32-x64-msvc': 1.2.12-dependencies:'@types/estree': 1.0.8@@ -3890,8 +3585,6 @@ snapshots:- [email protected]: {}-@@ -3953,8 +3646,6 @@ snapshots:- [email protected]: {}-@@ -3983,30 +3674,6 @@ snapshots:- supports-color- vue-tsc- dependencies:- ansis: 4.2.0- cac: 6.7.14- chokidar: 4.0.3- debug: 4.4.3- diff: 8.0.3- empathic: 2.0.0- hookable: 5.5.3- rolldown: 1.2.12- rolldown-plugin-dts: 0.15.10([email protected])([email protected])- semver: 7.7.3- tinyexec: 1.0.2- tinyglobby: 0.2.15- tree-kill: 1.2.2- unconfig: 7.4.2- optionalDependencies:- typescript: 5.9.3- transitivePeerDependencies:- - '@typescript/native-preview'- - oxc-resolver- - supports-color- - vue-tsc-@@ -4138,10 +3805,6 @@ snapshots:transitivePeerDependencies:- msw- dependencies:- sdp: 3.2.1-diff --git a/libs/typescript/pnpm-workspace.yaml b/libs/typescript/pnpm-workspace.yamlindex 3939fa41ea..15d46c9a56 100644--- a/libs/typescript/pnpm-workspace.yaml+++ b/libs/typescript/pnpm-workspace.yaml@@ -1,6 +1,5 @@packages:- "core"- - "agent"- "playground"- "cursor-motion"