Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
AutonomyOps ADK
AutonomyOps ADK

Evaluate

  • 2-Minute CE Demo

Install & Run

  • Install & Run
    • Prerequisites
    • Build
    • Run
    • Connect Your Own Agent
    • First Edge
    • Fast Path Tutorial (5–10 minutes)
    • Integrity and Deny Tutorial
    • Contested Reliability Tutorial
    • Robotics Quickstart

Tutorials

  • Tutorials
    • Tutorial 01 — Single Node: Receive, Verify, and Activate Offline
    • Tutorial 02 — Multi-Node: Seed Once, Update Everywhere (Peer Propagation)
    • Tutorial 03 — Crash and Recovery: WAL + Safe-Point
    • Tutorial 04 — OS Replacement Survival and Mission Runtime Reconstruction
    • Tutorial 05 — Portability: Run Everywhere (amd64, arm64, riscv64)
    • Tutorial — Container Hardening Hands-On
    • CLI Audit And Support Bundle Lab
    • VAL 01 — Zero-Downtime Certificate Rotation Validation
    • VAL 02 — Trust-Chain Rejection Validation
    • VAL 03 — RBAC Permission Enforcement Validation
    • VAL 04 — Audit Completeness Validation
    • VAL 05 — OTel Integration Validation
    • VAL 06 — Support Bundle Validation
    • VAL 07 — Fleet Rollout Latency Baseline
    • VAL 08 — Fleet Rollout Throughput Validation
    • VAL 09 — Stuck Rollout Detection Validation
    • VAL 10 — Rollback Reliability Validation
    • VAL 11 — Fleet Rollout Chaos Test Pack
    • VAL 12 — Fleet Rollout 30-Day Soak
    • VAL 13 — HA Failover Validation
    • VAL 14 — HA Replication Lag Baseline
    • VAL 15 — Backup/Restore Validation
    • VAL 16 — Split-Brain Chaos Validation
    • VAL 17 — Quorum Loss Validation
    • VAL 18 — HA 30-Day Soak Validation
    • VAL 19 — Relay Local-Network Impairment Validation
    • VAL20 — Relay Throughput Benchmark
    • VAL21 — Relay Queue Depth and Overflow Validation
    • VAL22 — Deadletter Workflow Validation
    • VAL23 — Relay Bandwidth Management Validation
    • VAL24 — Relay 30-Day Soak Validation
    • VAL27 — Relay Proof Report Generator
    • VAL25 — Fleet Rollout Proof Report Generator
    • VAL26 — HA Proof Report Generator
    • VAL28 — Cross-Cutting Proof Report Generator
    • VAL29 — AutonomyOps v1 Public-Claim Evidence Matrix
    • Edge Relay Deadletter Lab
    • FI Traceability: Invariant → Test → Expected Output
    • Offline-first Runbook: Buffer Then Drain
    • Policy Deny in Strict Mode
    • Public Claims Correction Package
    • Repo Findings Checklist
    • Resource Envelope: Disk Ceiling + Eviction Proof
    • ROS 2 Governed Bridge Quickstart
    • ROS 2 SROS 2 / DDS-Security Quickstart
    • Story Script — “Seed Once, Update Everywhere”
    • Transport Hardening: mTLS Identity + Domain Boundaries
    • AutonomyOps ADK — Tutorial Pack

Runbooks

  • Runbooks
    • Demo Runbook
    • ROS 2 Governed Bridge
    • ROS 2 SROS 2 / DDS-Security for the Governed Bridge
    • Container Hardening + Syscall Mediation
    • AutonomyOps Operator Runbooks
    • Fleet Rollout Recovery
    • Gate Approval Workflow
    • Manual Failover Procedure
    • Split-Brain Detection and Recovery
    • Quorum-Loss Recovery
    • Deadletter Inspection and Retry Workflow
    • Bandwidth Troubleshooting
    • RBAC Role Assignment
    • Support Bundle Generation
    • Emergency Rollback Procedure
    • Attestation Mode Rollout
    • Operator Runbook
    • Integrity Failure Drill: Tamper and Verify Failure
  • Observability
    • Edge Observability Reference
  • Operations
    • Edge Deployment (Operator Guide)
    • Failure Modes and Recovery
    • Registry Seeding for Edge / Air-Gapped Sites (Operator Guide)

Architecture & Design

  • Architecture
    • Architecture Overview
    • Capabilities
    • Invariants
    • Deterministic Relay Layer
    • Threat Model
  • Security
    • mTLS
    • Edge Security Model
    • Domain Validation
    • Beacon Privacy
    • Security Model
  • Storage
    • On-Disk Layout
    • Storage Data Model
    • Crash Consistency
  • Rollout
    • HA Operations — Rollout Leader Election and Streaming Promoter
    • Mesh Propagation — Artifact Distribution
    • OS Reconstruction Rollouts
  • Portability
    • Core Invariant Matrix
  • Resource Envelope
    • cgroup v2 Integration
    • Disk Ceiling
    • Retry Budgets and Backoff Policy
  • Contracts

Reference

  • CLI Reference
    • autonomy — CLI overview
    • edgectl — CLI overview
    • edged — CLI overview
    • autonomy-gui
    • autonomy command reference
      • autonomy
      • autonomy bundle
      • autonomy bundle inspect
      • autonomy bundle pull
      • autonomy bundle push
      • autonomy bundle stage
      • autonomy bundle verify
      • autonomy config
      • autonomy config get
      • autonomy config migrate
      • autonomy config set
      • autonomy demo
      • autonomy demo gazebo
      • autonomy demo mavlink-sitl
      • autonomy demo nvidia
      • autonomy demo openclaw
      • autonomy demo policy
      • autonomy demo ros2-bridge
      • autonomy demo validate
      • autonomy lock
      • autonomy lock canonicalize
      • autonomy lock diff
      • autonomy lock fingerprint
      • autonomy lock generate
      • autonomy lock verify
      • autonomy logs
      • autonomy oci
      • autonomy oci attach-lock
      • autonomy oci attach-policy
      • autonomy oci probe
      • autonomy oci pull-lock
      • autonomy oci pull-policy
      • autonomy oci push-test-artifact
      • autonomy policy
      • autonomy policy build
      • autonomy policy cache
      • autonomy policy eval
      • autonomy policy fetch
      • autonomy policy inspect
      • autonomy policy load
      • autonomy policy status
      • autonomy registry
      • autonomy registry bootstrap-zot
      • autonomy registry package
      • autonomy registry publish-index
      • autonomy registry seed
      • autonomy registry seed-catalog
      • autonomy registry sync
      • autonomy relay
      • autonomy relay status
      • autonomy run
      • autonomy runtime
      • autonomy runtime start
      • autonomy runtime status
      • autonomy sign
      • autonomy status
      • autonomy telemetry
      • autonomy telemetry bridge
      • autonomy telemetry drain
      • autonomy telemetry export
      • autonomy telemetry flush
      • autonomy telemetry sink
      • autonomy telemetry status
      • autonomy verify
      • autonomy version
      • autonomy wal
      • autonomy wal inspect
      • autonomy wal status
    • edged command reference
      • edged
      • edged precheck
      • edged rotate
      • edged validate
      • edged version
    • edgectl command reference
      • edgectl
      • edgectl assurance
      • edgectl index
      • edgectl index count
      • edgectl index list
      • edgectl init
      • edgectl quota
      • edgectl quota list
      • edgectl quota peer
      • edgectl relay
      • edgectl relay config
      • edgectl relay config get
      • edgectl relay config set-bandwidth
      • edgectl relay deadletter
      • edgectl relay deadletter inspect
      • edgectl relay deadletter list
      • edgectl relay deadletter purge
      • edgectl relay deadletter retry
      • edgectl relay status
      • edgectl retry
      • edgectl retry list
      • edgectl status
      • edgectl storage
      • edgectl storage stats
      • edgectl version
  • GUI
    • GUI Overview
    • GUI Getting Started
    • GUI Configuration
    • GUI Backend API
  • API Reference
    • Event Stream
    • RPC Endpoints
    • Sockets
    • Transport Messages
  • Configuration
    • Configuration Reference
    • Environment Variable Overrides
    • Configuration Validation
  • OCI Artifacts
  • Policy Bundles

Integrations

  • MAVLink Governance
  • MAVLink Policy Authoring

Demo Stack Reference

  • Demo Stack Reference
    • Fleet Monitoring for Robotics
    • Gazebo Simulation Stack
    • ROS2 Governance
    • ROS2 Markers and Observability
    • NVIDIA GPU Integration
    • Hardware Adaptation Guide
    • Bundle Workflows
    • Demo Fallback Assets — autonomy demo openclaw
      • Annotated Demo Output — autonomy demo openclaw
      • Demo Fallback Pivot Notes

Development

  • Testing
    • Unit Tests
    • Integration Tests
    • Race Detector
    • Failure Injection Overview
    • Root-Level FI Tests
  • Fault-Injection Catalog
    • FI Scenario Matrix
    • Expected FI Outputs
    • Running FI Tests
  • Contributing
    • Contributing Guide
    • Documentation Standards
    • Doc Placement Guide
    • Docs Quality Gates
    • Invariant Rules for Contributors
  • Traceability
    • Invariant Map
    • Doc Coverage Report
    • Edge Invariant Traceability Matrix

Releases

  • Releases
    • Changelog
    • Versioning Policy
Back to top
View this page
Edit this page

MAVLink Policy Authoring¶

How to write a fail-closed Rego policy for the tool.mavlink.* command surface. The runtime evaluates data.autonomy.allow for every command; author rules that allow only what you intend and let the default allow := false deny the rest.

For the runtime trust model and operator entry points, see MAVLink Governance.

The input shape¶

The policy input is {"kind": "<tool.mavlink.*>", "params": {...}}. The params are split by source, and that split is the foundation of the trust model:

  • Supervisor-injected (trusted). The runtime injects these from the live autopilot snapshot before evaluation; the agent cannot supply them (a request that does is rejected before policy runs). Query them freely — they are observed truth, not agent claims: environment ("sitl"/"real"), armed_state, gps_fix, heartbeat_age_ms, sysid, current_mode.

  • Agent intent (caller-supplied). Validate these defensively: altitude, lat, lon, alt, custom_mode, mission_hash, operator_approval, command, param1…param7, compid, channels.

Kind

Trusted (query)

Intent (validate)

arm / disarm

environment, armed_state, gps_fix

operator_approval

takeoff

armed_state

altitude

goto

environment

lat, lon, alt

set_mode

current_mode

custom_mode, operator_approval

upload_mission

—

mission_hash

param_set

—

param_id, param_value

command_long / rc_override

—

command, channels, operator_approval

Fail-closed scaffolding¶

Start from default allow := false and validate the command’s own schema, not just its safety condition — otherwise a missing or malformed field can slip through a negative check. Mirror the typed transport contract:

package autonomy

import rego.v1

default allow := false

# Gate on the supervisor-injected environment — trustworthy, not an agent claim.
allow if {
    input.kind == "tool.mavlink.arm"
    input.params.environment == "sitl"
}
allow if {
    input.kind == "tool.mavlink.arm"
    input.params.environment == "real"
    input.params.operator_approval != ""
}

# Validate the schema, THEN the ceiling. is_number rejects missing/string input.
allow if {
    input.kind == "tool.mavlink.takeoff"
    is_number(input.params.altitude)
    input.params.altitude >= 0
    input.params.altitude <= 50
}

The same discipline for goto (require lat/lon/alt are numbers in range before the ceiling check) and set_mode (require custom_mode is a number in [0, uint32max] before the mode check). Validating the schema in policy keeps malformed input fail-closed at the policy layer, not only at the transport.

The mission-hash workflow¶

upload_mission is allowed only for a mission whose canonical-bytes BLAKE3 is in your allowlist. The supervisor independently verifies the transmitted bytes hash to the same value and then issues the plan over the MAVLink mission-protocol handshake (MISSION_COUNT → MISSION_ITEM_INT … → MISSION_ACK), so an allowlisted hash cannot be paired with different bytes.

  1. Build the mission and compute the BLAKE3 of its canonical serialization.

  2. Register the hex digest in the policy allowlist.

  3. The agent sends upload_mission with mission (bytes) + mission_hash.

allowed_mission_hashes := {"<blake3-hex-of-canonical-mission-bytes>"}

allow if {
    input.kind == "tool.mavlink.upload_mission"
    allowed_mission_hashes[input.params.mission_hash]
}

Canonical mission bytes¶

mission is a JSON array of mission items — the MISSION_ITEM_INT shape, in sequence order. Compute the mission_hash as the BLAKE3 of these exact bytes; the supervisor parses the same verified bytes into the items it uploads.

[
  {"seq":0,"frame":3,"command":22,"current":1,"autocontinue":1,"x":473977420,"y":85455940,"z":10},
  {"seq":1,"frame":3,"command":16,"autocontinue":1,"x":473978000,"y":85456000,"z":20},
  {"seq":2,"frame":3,"command":21,"autocontinue":1,"x":473979000,"y":85457000,"z":0}
]

Per item: command is the MAV_CMD (required, non-zero), frame the MAV_FRAME; x/y are the integer-scaled position (latitude/longitude in degrees × 1e7 for global frames) and z the altitude in meters; param1– param4 carry the command parameters. seq is optional but, when present, must equal the item’s array index. Unknown fields, an empty list, or a malformed item are rejected fail-closed before any frame is sent.

Operator-approval tokens¶

For commands that demand dual control (real-vehicle arm, manual mode transitions), require a non-empty operator_approval:

allow if {
    input.kind == "tool.mavlink.set_mode"
    requires_approval[input.params.custom_mode]
    input.params.operator_approval != ""
}

The demo treats operator_approval as an opaque non-empty token. For production, verify a signed token here (the value the agent supplies is intent — validate it as you would any agent input).

Mode-transition matrix template¶

Express which modes need approval as a set keyed on the autopilot’s numeric custom_mode. The demo uses ArduCopter values (STABILIZE=0, ACRO=1 — manual control); adapt to your autopilot:

# Modes requiring operator approval (autopilot-specific custom_mode values).
requires_approval := {0, 1}

# Non-approval modes pass once the schema is valid.
allow if {
    input.kind == "tool.mavlink.set_mode"
    is_number(input.params.custom_mode)
    not requires_approval[input.params.custom_mode]
}

The privilege boundary¶

command_long and rc_override are raw command authority. The demo policy has no allow rule for them — they are denied by the fail-closed default, the negative example operators learn from. If a production policy must allow them, gate them behind operator_approval and grant the supervisor raw-command authority explicitly (it denies them by default regardless of policy). Treat this as the most dangerous escape hatch on the surface.

Installed: the embedded MAVLink demo policy is the default for autonomy demo mavlink-sitl and autonomy run --mavlink-endpoint …; point autonomy run --policy <oci-ref> at your own bundle in the managed cache. The canonical demo source is demo/policies/mavlink/mavlink.rego and its allow/deny matrix is pinned by the OPA tests in policy/.

Next
Demo Stack Reference
Previous
MAVLink Governance
Copyright © 2026, AutonomyOps
Made with Sphinx and @pradyunsg's Furo
On this page
  • MAVLink Policy Authoring
    • The input shape
    • Fail-closed scaffolding
    • The mission-hash workflow
      • Canonical mission bytes
    • Operator-approval tokens
    • Mode-transition matrix template
    • The privilege boundary