Skip to main content

Module contracts

Module contracts 

Source
Available on crate feature computer-use only.
Expand description

camelCase wire contracts for computer-use-mcp.

These types round-trip the JSON payloads shared with the TypeScript runtime and enforce disclosure-safe invariants on deserialization (digest-only postconditions, value-free sensitivity evidence, bounded approval scopes). They carry no desktop-actuation logic — the computer-use-mcp server remains authoritative for policy, identity, leases, and idempotency.

The submodules group related contracts:

  • action — action classification, resource context, provenance, postconditions, and the ActionEnvelope
  • target — target evidence and value-free sensitivity signals
  • approval — disclosure-safe ApprovalGrant scopes
  • receipt — capabilities, policy decisions, previews, and receipts
  • lease — one-writer control leases and target reservations
  • session — session lifecycle, events, follow-ups, and deletion results
  • safety — the versioned cross-runtime safety corpus

Modules§

action
Action classification, resource context, provenance, postconditions, and the immutable ActionEnvelope proposed by the graph and enforced by the runtime.
approval
Disclosure-safe approval grants returned by the runtime approval boundary.
lease
One-writer control leases and non-authoritative target reservations.
receipt
Capability, policy, preview, and execution-receipt contracts.
safety
Versioned cross-runtime deterministic safety corpus shared with the TypeScript fake-desktop harness.
session
Session lifecycle, event, follow-up, and deletion contracts.
target
Target evidence and value-free accessibility sensitivity contracts.

Structs§

ActionEnvelope
Immutable action proposed by the graph and enforced by the runtime.
ActionPreview
Result of preview_action used for deterministic graph routing.
ActionProvenance
Provenance describing whether an action derives from untrusted instructions.
ActionResourceContext
Optional resource identifiers describing what an action touches.
ApprovalGrant
Read-only, disclosure-safe authority returned by the runtime approval boundary.
Bounds
Axis-aligned bounding box in display coordinates.
ControlLease
One-writer desktop control lease.
ExecutionCapability
A verified execution capability advertised by the runtime.
ExecutionReceipt
Idempotency receipt returned by execute_action.
LeaseBoundaries
App/window/display boundaries restricting a ControlLease.
PolicyDecision
A policy decision for a previewed action.
PostconditionEvidence
A single postcondition and whether it was satisfied.
RuntimeSession
A runtime session and its current lifecycle state.
SafetyCorpus
Versioned cross-runtime deterministic safety corpus.
SafetyExpectation
Expected effects, restores, and status for a SafetyScenario.
SafetyScenario
A single deterministic safety scenario and its expected outcome.
SessionCompletionEvidence
Evidence describing how a session reached completion.
SessionDeletionResult
Principal-bound result of deleting one terminal runtime session’s durable data.
SessionEvent
Stable supervisor event used for ADK/runtime trace correlation.
SessionFollowUp
Principal-owned, monotonic steering instruction consumed by an ADK graph.
SessionFollowUpPage
A page of follow-ups plus the cursor for the next page.
TargetEvidence
Evidence binding an action to a fresh desktop observation.
TargetReservation
Non-authoritative, expiring planner intent for multi-agent conflict checks.
TargetReservationScope
Application/window scope of a TargetReservation.
TargetSensitivityEvidence
Value-free native accessibility evidence used for action risk and revalidation.

Enums§

ActionClass
Operation-aware action class used by authorization and policy.
ActionPostcondition
Digest-only expected state independently verified by computer-use-mcp.
ApprovalGrantScope
Scope of an ApprovalGrant.
ExecutionMode
Enforced execution mode selected for an action.
ReceiptStatus
Terminal status of an execution receipt.
TargetSensitivityAssessment
Conclusion of an accessibility-based target sensitivity check.
TargetSensitivitySignal
A single value-free signal contributing to a sensitivity assessment.
TargetSensitivitySource
Source of a TargetSensitivityEvidence assessment.