Expand description
§adk-computer-use
First-party ADK-Rust orchestration and wire contracts for the
computer-use-mcp
desktop-automation server.
This crate does not perform desktop actuation. Desktop policy, target
validation, lease ownership, physical-user interruption, and idempotent
effects remain authoritative in computer-use-mcp. Instead, this crate
supplies the governed ADK-side layer that drives that server safely:
- Wire contracts (
contracts) — camelCase wire types with disclosure-safe validation (digest-only postconditions, value-free sensitivity evidence, bounded approval scopes). - Authorization (
ScopeAuthorizer,ComputerUseAuthContext) — a coarsecomputer:*scope gate bound to anadk_auth-verified identity that model or graph state cannot forge. - Deterministic workflow (
build_reference_graph) — anadk_graphgraph that fans observation out in parallel, previews before mutation, interrupts for digest-bound approval, executes exactly once, and verifies the receipt. - Runtime boundary (
ComputerUseRuntime) — the trait the graph drives, with a live MCP adapter (ComputerUseMcpRuntime) or an in-process fake. - Cancellation (
CancellationBridge) — revokes desktop authority before stopping ADK reasoning. - Release evaluation (
ComputerUseEvaluator,AdkEvaluationReceipt) — deterministic trajectory scoring and a tamper-evident evidence receipt.
§Quick start
The graph is driven through the ComputerUseRuntime trait, so it can run
against an in-process implementation with no external server. See the
minimal_graph example for a complete, runnable version:
use std::sync::Arc;
use adk_computer_use::{build_reference_graph, ScopeAuthorizer};
let authorizer = Arc::new(ScopeAuthorizer::new(["computer:plan", "computer:execute:background"]));
let graph = build_reference_graph(runtime, authorizer)?;To drive a real desktop, back the graph with ComputerUseMcpRuntime and a
running computer-use-mcp server (see the macOS examples).
Re-exports§
pub use runtime::ComputerUseMcpConfig;pub use runtime::ComputerUseMcpRuntime;pub use runtime::ComputerUseRuntime;pub use runtime::TraceCorrelation;pub use runtime::VerificationOutcome;pub use contracts::ActionClass;pub use contracts::ActionEnvelope;pub use contracts::ActionPostcondition;pub use contracts::ActionPreview;pub use contracts::ActionProvenance;pub use contracts::ActionResourceContext;pub use contracts::ApprovalGrant;pub use contracts::ApprovalGrantScope;pub use contracts::Bounds;pub use contracts::ControlLease;pub use contracts::ExecutionCapability;pub use contracts::ExecutionMode;pub use contracts::ExecutionReceipt;pub use contracts::LeaseBoundaries;pub use contracts::PolicyDecision;pub use contracts::PostconditionEvidence;pub use contracts::ReceiptStatus;pub use contracts::RuntimeSession;pub use contracts::SafetyCorpus;pub use contracts::SafetyExpectation;pub use contracts::SafetyScenario;pub use contracts::SessionCompletionEvidence;pub use contracts::SessionDeletionResult;pub use contracts::SessionEvent;pub use contracts::SessionFollowUp;pub use contracts::SessionFollowUpPage;pub use contracts::TargetEvidence;pub use contracts::TargetReservation;pub use contracts::TargetReservationScope;pub use contracts::TargetSensitivityAssessment;pub use contracts::TargetSensitivityEvidence;pub use contracts::TargetSensitivitySignal;pub use contracts::TargetSensitivitySource;
Modules§
- contracts
- camelCase wire contracts for
computer-use-mcp. - runtime
- Runtime adapters and response binding.
The
ComputerUseRuntimeboundary and its concrete adapters.
Structs§
- AdkEvaluation
Claims - Claims asserted by an
AdkEvaluationReceiptand re-checked on verify. - AdkEvaluation
Receipt - Tamper-evident release-evaluation receipt for a computer-use subject.
- AdkEvaluation
Source - A source file digest included in an
AdkEvaluationReceipt. - Cancellation
Bridge - Propagates controls in the safe order: revoke desktop authority, then stop reasoning.
- Computer
UseAuth Context - Authenticated identity and exact operation context forwarded to the runtime.
- Computer
UseEvaluation - Outcome of scoring one session’s event trajectory.
- Computer
UseEvaluator - Deterministic release evaluator layered beside ADK’s task-quality evaluators.
- Scope
Authorizer - Coarse ADK scope gate. The runtime policy engine still evaluates the exact action.
Enums§
- Authorization
Error - Reason a
ScopeAuthorizerrejected aComputerUseAuthContext. - Cancellation
Error - Failure propagating a cancellation control to the desktop runtime.
- Computer
UseError - Structured error surfaced by the computer-use graph, runtime trait, and MCP adapter.
Traits§
- Agent
Interrupter - Minimal boundary implemented by
adk_runner::Runner::interruptor another host.
Functions§
- build_
reference_ graph - Build the flagship deterministic ADK graph.
- build_
reference_ graph_ with_ checkpointer - Build the reference graph with a durable host-supplied checkpointer.
Type Aliases§
- Result
- Convenience alias for fallible computer-use operations.