{
  "asyncapi": "3.1.0",
  "id": "urn:waraps.api-tasks",
  "info": {
    "title": "WARA-PS Tasks MQTT API",
    "version": "1.0.4",
    "description": "### Overview\nTask command definitions for the WARA-PS system. Defines channels, operations, and message schemas for Level 2+ tasks, signals, responses, and feedback via MQTT.\n\nAll task commands, signals, responses, and feedback are exchanged on a **single topic** per agent:\n`{AgentBaseTopic}/exec/command` (QoS 1, retain false).\nMessage type is discriminated by payload structure: `command` field for commands/signals, `response` field for responses, `status` field for feedback.\n\n### Quick Start\nA single command, in plain terms:\n1. Commander sends a `start-task` command (e.g. `move-to`) on `exec/command`.\n2. Agent immediately publishes a **response** of `running` and a **feedback** of `starting` on their own channels below, upon receiving the command (before validation begins).\n3. Once validated, the agent publishes further **feedback** values (`planning` → `running`) as it proceeds toward execution.\n4. While running, the commander may send a `signal-task` command ($abort/$pause/$continue/$enough) on the same `exec/command` topic to control the task.\n5. When the task ends (naturally, by signal, or by failure), the agent publishes a final **response** (`finished` or `failed`) and matching **feedback**, and is ready for the next `start-task`.\n\nSee the state table and diagram below for the full set of transitions.\n\n### Task Execution State Machine\n\nThe agent implements a five-state machine that governs how commands are received, validated, planned, executed, and completed. Only **one task may execute at a time**. New commands received while a task is active (running or paused) must be rejected.\n\n#### States\n\n| State | Description |\n|---|---|\n| **idle** | No active task. Agent is ready to receive a `start-task` command. |\n| **validating** | Incoming command is parsed and validated. Task name is checked against `direct_execution_info.tasks-available`. For movement tasks, geopoints are validated. |\n| **planning** | Task execution is being planned. May be a stub for simple agents. |\n| **running** | Task is actively executing. Agent publishes sensor data and accepts signals. |\n| **paused** | Task execution is temporarily suspended by a `$pause` signal. |\n\n#### Transitions\n\n| From | Event | To | Published on `exec/command` |\n|---|---|---|---|\n| idle | `start-task` received | validating | response: `running`, feedback: `starting` |\n| validating | command is valid and parseable | planning | response: `running`, feedback: `planning` |\n| validating | command cannot be handled | idle | response: `failed` (Cannot handle command), feedback: `failed` |\n| validating | command is malformed | idle | response: `failed` (Malformed command), feedback: `failed` |\n| planning | plan is ready | running | response: `running`, feedback: `running` |\n| planning | plan fails | idle | response: `failed` (Plan failure), feedback: `failed` |\n| running | `$pause` signal | paused | response: `running`, feedback: `paused` |\n| running | `$abort` signal | idle | response: `failed`, feedback: `aborted` |\n| running | `$enough` signal | idle | response: `finished`, feedback: `finished` |\n| running | task completes naturally | idle | response: `finished`, feedback: `finished` |\n| running | task fails during execution | idle | response: `failed`, feedback: `failed` |\n| paused | `$continue` signal | running | response: `running`, feedback: `running` |\n| paused | `$abort` signal | idle | response: `failed`, feedback: `aborted` |\n| paused | `$enough` signal | idle | response: `finished`, feedback: `finished` |\n\n#### State Diagram (Mermaid)\n\nYou can copy and paste the diagram text below into [sequencediagram.org](https://sequencediagram.org/) to view it visualized.\n\n```mermaid\nstateDiagram\n    idle --> validating : start-task received\\n→ response:running\\n→ feedback:starting\n    validating --> idle : invalid / malformed\\n→ response:failed + reason\\n→ feedback:failed\n    validating --> planning : plan valid\\n→ response:running\\n→ feedback:planning\n    planning --> idle : plan failed\\n→ response:failed + reason\\n→ feedback:failed\n    planning --> running : plan ready\\n→ response:running\\n→ feedback:running\n    running --> idle : execution error\\n→ response:failed + reason\\n→ feedback:failed\n    running --> paused : $pause\\n→ response:running\\n→ feedback:paused\n    paused --> running : $continue\\n→ response:running\\n→ feedback:running\n    running --> idle : $abort\\n→ response:failed  + reason\\n→ feedback:aborted\n    running --> idle : $enough\\n→ response:finished\\n→ feedback:finished\n    paused --> idle : $abort\\n→ response:failed + reason\\n→ feedback:aborted\n    paused --> idle : $enough\\n→ response:finished\\n→ feedback:finished\n    running --> idle : mission complete\\n→ response:finished\\n→ feedback:finished\n```\n\n### Channels\n- **Move To** — Move the agent to a specific position.\n- **Move Path** — Move the agent along a path of waypoints.\n- **Search Area** — Search a specified area for a target.\n- **Look At Position** — Point the agent camera at a position.\n- **Look At Agent** — Make the agent camera follow another agent.\n- **Follow Lead** — Make the agent follow another agent.\n- **Collect** — Make the agent collect an item.\n- **Release** — Make the agent release all collected items.\n- **Go Home** — Make the agent return to its home position.\n- **Observe Position** — Make the agent observe a position.\n- **Set Speed** — Set the speed of an ongoing task.\n- **Reset Speed** — Reset the speed to default.\n- **Set Geofence** — Set a geofence boundary for the agent.\n- **Reset Geofence** — Remove the active geofence.\n- **Add No-Go Zone** — Add a restricted area for the agent.\n- **Reset No-Go Zones** — Remove all restricted areas.\n- **Set Heading Thrust** — Set heading and thrust directly.\n- **Deliver** — Deliver cargo to a specific position.\n- **Task Response** — Required response from Level 2+ agents when receiving a command.\n- **Task Feedback** — Required feedback from Level 2+ agents during command execution.",
    "contact": {
      "name": "waraps.org",
      "url": "https://portal.waraps.org/",
      "email": "info@waraps.org"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    },
    "x-task-state-machine": {
      "id": "taskExecution",
      "initial": "idle",
      "context": {
        "topic": "{AgentBaseTopic}/exec/command",
        "qos": 1,
        "constraint": "Only one task may execute at a time. New commands are rejected while a task is active (running or paused). After reaching idle the agent is ready for the next command."
      },
      "states": {
        "idle": {
          "description": "No active task. Agent is ready to receive commands.",
          "on": {
            "RECEIVE_START_TASK": {
              "target": "validating",
              "actions": [
                {
                  "publish": "response",
                  "value": "running"
                },
                {
                  "publish": "feedback",
                  "value": "starting"
                }
              ]
            }
          }
        },
        "validating": {
          "description": "Parse and validate incoming command. Check that task name is listed in direct_execution_info.tasks-available. For movement tasks, validate geopoint(s) for lat/lon/alt.",
          "on": {
            "COMMAND_VALID": {
              "target": "planning",
              "actions": [
                {
                  "publish": "response",
                  "value": "running"
                },
                {
                  "publish": "feedback",
                  "value": "planning"
                }
              ]
            },
            "COMMAND_INVALID": {
              "target": "idle",
              "actions": [
                {
                  "publish": "response",
                  "value": "failed",
                  "fail-reason": "Cannot handle command"
                },
                {
                  "publish": "feedback",
                  "value": "failed"
                }
              ]
            },
            "COMMAND_MALFORMED": {
              "target": "idle",
              "actions": [
                {
                  "publish": "response",
                  "value": "failed",
                  "fail-reason": "Malformed command"
                },
                {
                  "publish": "feedback",
                  "value": "failed"
                }
              ]
            }
          }
        },
        "planning": {
          "description": "Plan task execution. For movement tasks validate the route. May be a stub/placeholder for simple agents. Agents with planning capabilities implement route planning here.",
          "on": {
            "PLAN_READY": {
              "target": "running",
              "actions": [
                {
                  "publish": "response",
                  "value": "running"
                },
                {
                  "publish": "feedback",
                  "value": "running"
                }
              ]
            },
            "PLAN_FAILED": {
              "target": "idle",
              "actions": [
                {
                  "publish": "response",
                  "value": "failed",
                  "fail-reason": "Plan failure"
                },
                {
                  "publish": "feedback",
                  "value": "failed"
                }
              ]
            }
          }
        },
        "running": {
          "description": "Task is actively executing. Only one task at a time. Agent publishes sensor data and accepts signals.",
          "on": {
            "SIGNAL_PAUSE": {
              "target": "paused",
              "actions": [
                {
                  "publish": "response",
                  "value": "running"
                },
                {
                  "publish": "feedback",
                  "value": "paused"
                }
              ]
            },
            "SIGNAL_ABORT": {
              "target": "idle",
              "actions": [
                {
                  "publish": "response",
                  "value": "failed"
                },
                {
                  "publish": "feedback",
                  "value": "aborted"
                }
              ]
            },
            "SIGNAL_ENOUGH": {
              "target": "idle",
              "actions": [
                {
                  "publish": "response",
                  "value": "finished"
                },
                {
                  "publish": "feedback",
                  "value": "finished"
                }
              ]
            },
            "TASK_COMPLETE": {
              "target": "idle",
              "actions": [
                {
                  "publish": "response",
                  "value": "finished"
                },
                {
                  "publish": "feedback",
                  "value": "finished"
                }
              ]
            },
            "TASK_FAILED": {
              "target": "idle",
              "actions": [
                {
                  "publish": "response",
                  "value": "failed",
                  "fail-reason": "Execution error"
                },
                {
                  "publish": "feedback",
                  "value": "failed"
                }
              ]
            }
          }
        },
        "paused": {
          "description": "Task execution is paused by commander signal.",
          "on": {
            "SIGNAL_CONTINUE": {
              "target": "running",
              "actions": [
                {
                  "publish": "response",
                  "value": "running"
                },
                {
                  "publish": "feedback",
                  "value": "running"
                }
              ]
            },
            "SIGNAL_ABORT": {
              "target": "idle",
              "actions": [
                {
                  "publish": "response",
                  "value": "failed"
                },
                {
                  "publish": "feedback",
                  "value": "aborted"
                }
              ]
            },
            "SIGNAL_ENOUGH": {
              "target": "idle",
              "actions": [
                {
                  "publish": "response",
                  "value": "finished"
                },
                {
                  "publish": "feedback",
                  "value": "finished"
                }
              ]
            }
          }
        }
      }
    }
  },
  "defaultContentType": "application/json",
  "servers": {
    "localhost": {
      "host": "localhost:1883",
      "protocol": "mqtt",
      "protocolVersion": "3.1.1+",
      "description": "Development MQTT broker",
      "variables": {
        "port": {
          "enum": [
            "1882",
            "1883"
          ],
          "default": "1883",
          "description": "The port used for connecting to the locally hosted MQTT broker"
        }
      },
      "security": []
    },
    "production": {
      "host": "broker.waraps.org:8883",
      "protocol": "mqtt",
      "protocolVersion": "3.1.1+",
      "description": "Production MQTT broker",
      "variables": {
        "port": {
          "enum": [
            "8883"
          ],
          "default": "8883",
          "description": "The port used for connecting to the production MQTT broker"
        }
      },
      "security": [
        {
          "$ref": "#/components/securitySchemes/tls"
        }
      ]
    }
  },
  "channels": {
    "execCommandChannel": {
      "address": "{AgentBaseTopic}/exec/command",
      "bindings": {
        "$ref": "#/components/channelBindings/TaskMqttSettings"
      },
      "messages": {
        "receiveMoveToTask.message": {
          "$ref": "#/components/messages/MoveToTaskMessage"
        },
        "receiveMovePathTask.message": {
          "$ref": "#/components/messages/MovePathTaskMessage"
        },
        "receiveSearchAreaTask.message": {
          "$ref": "#/components/messages/SearchAreaTaskMessage"
        },
        "receiveLookAtPositionTask.message": {
          "$ref": "#/components/messages/LookAtPositionTaskMessage"
        },
        "receiveLookAtAgentTask.message": {
          "$ref": "#/components/messages/LookAtAgentTaskMessage"
        },
        "receiveFollowLeadTask.message": {
          "$ref": "#/components/messages/FollowLeadTaskMessage"
        },
        "receiveCollectTask.message": {
          "$ref": "#/components/messages/CollectTaskMessage"
        },
        "receiveReleaseTask.message": {
          "$ref": "#/components/messages/ReleaseTaskMessage"
        },
        "receiveGoHomeTask.message": {
          "$ref": "#/components/messages/GoHomeTaskMessage"
        },
        "receiveObservePositionTask.message": {
          "$ref": "#/components/messages/ObservePositionTaskMessage"
        },
        "receiveSetSpeedTask.message": {
          "$ref": "#/components/messages/SetSpeedTaskMessage"
        },
        "receiveResetSpeedTask.message": {
          "$ref": "#/components/messages/ResetSpeedTaskMessage"
        },
        "receiveSetGeofenceTask.message": {
          "$ref": "#/components/messages/SetGeofenceTaskMessage"
        },
        "receiveResetGeofenceTask.message": {
          "$ref": "#/components/messages/ResetGeofenceTaskMessage"
        },
        "receiveAddNoGoZoneTask.message": {
          "$ref": "#/components/messages/AddNoGoZoneTaskMessage"
        },
        "receiveResetNoGoZonesTask.message": {
          "$ref": "#/components/messages/ResetNoGoZonesTaskMessage"
        },
        "receiveSetHeadingThrustTask.message": {
          "$ref": "#/components/messages/SetHeadingThrustTaskMessage"
        },
        "receiveDeliverTask.message": {
          "$ref": "#/components/messages/DeliverTaskMessage"
        },
        "receiveTaskSignal.message": {
          "$ref": "#/components/messages/SignalMessage"
        }
      },
      "description": "Single topic carrying every task command, plus control signals ($abort/$pause/$continue/$enough) for the currently executing task. Message type is discriminated by payload structure: the `command` field for commands/signals (`start-task` vs. `signal-task`), and for signals, the `signal` field's value.",
      "parameters": {
        "AgentBaseTopic": {
          "$ref": "#/components/parameters/AgentBaseTopic"
        }
      }
    },
    "taskResponseChannel": {
      "address": "{AgentBaseTopic}/exec/response",
      "bindings": {
        "$ref": "#/components/channelBindings/TaskMqttSettings"
      },
      "messages": {
        "SendTaskResponse.message": {
          "$ref": "#/components/messages/TaskResponseMessage"
        }
      },
      "description": "Sends command response. Required response from Level 2+ agents.",
      "parameters": {
        "AgentBaseTopic": {
          "$ref": "#/components/parameters/AgentBaseTopic"
        }
      }
    },
    "taskFeedbackChannel": {
      "address": "{AgentBaseTopic}/exec/feedback",
      "bindings": {
        "$ref": "#/components/channelBindings/TaskMqttSettings"
      },
      "messages": {
        "SendTaskFeedback.message": {
          "$ref": "#/components/messages/TaskFeedbackMessage"
        }
      },
      "description": "Sends feedback during command execution. Required feedback from Level 2+ agents.",
      "parameters": {
        "AgentBaseTopic": {
          "$ref": "#/components/parameters/AgentBaseTopic"
        }
      }
    }
  },
  "operations": {
    "receiveMoveToTask": {
      "action": "receive",
      "title": "Receives move-to command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives move-to command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveMoveToTask.message"
        }
      ]
    },
    "receiveMovePathTask": {
      "action": "receive",
      "title": "Receives move-path command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives move-path command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveMovePathTask.message"
        }
      ]
    },
    "receiveSearchAreaTask": {
      "action": "receive",
      "title": "Receives search-area command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives search-area command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveSearchAreaTask.message"
        }
      ]
    },
    "receiveLookAtPositionTask": {
      "action": "receive",
      "title": "Receives look-at-position command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives look-at-position command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveLookAtPositionTask.message"
        }
      ]
    },
    "receiveLookAtAgentTask": {
      "action": "receive",
      "title": "Receives look-at-agent command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives look-at-agent command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveLookAtAgentTask.message"
        }
      ]
    },
    "receiveFollowLeadTask": {
      "action": "receive",
      "title": "Receives follow-lead command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives follow-lead command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveFollowLeadTask.message"
        }
      ]
    },
    "receiveCollectTask": {
      "action": "receive",
      "title": "Receives collect command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives collect command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveCollectTask.message"
        }
      ]
    },
    "receiveReleaseTask": {
      "action": "receive",
      "title": "Receives release command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives release command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveReleaseTask.message"
        }
      ]
    },
    "receiveGoHomeTask": {
      "action": "receive",
      "title": "Receives go-home command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives go-home command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveGoHomeTask.message"
        }
      ]
    },
    "receiveObservePositionTask": {
      "action": "receive",
      "title": "Receives observe-position command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives observe-position command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveObservePositionTask.message"
        }
      ]
    },
    "receiveSetSpeedTask": {
      "action": "receive",
      "title": "Receives set-speed command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives set-speed command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveSetSpeedTask.message"
        }
      ]
    },
    "receiveResetSpeedTask": {
      "action": "receive",
      "title": "Receives reset-speed command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives reset-speed command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveResetSpeedTask.message"
        }
      ]
    },
    "receiveSetGeofenceTask": {
      "action": "receive",
      "title": "Receives set-geofence command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives set-geofence command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveSetGeofenceTask.message"
        }
      ]
    },
    "receiveResetGeofenceTask": {
      "action": "receive",
      "title": "Receives reset-geofence command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives reset-geofence command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveResetGeofenceTask.message"
        }
      ]
    },
    "receiveAddNoGoZoneTask": {
      "action": "receive",
      "title": "Receives add-no-go-zone command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives add-no-go-zone command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveAddNoGoZoneTask.message"
        }
      ]
    },
    "receiveResetNoGoZonesTask": {
      "action": "receive",
      "title": "Receives reset-no-go-zones command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives reset-no-go-zones command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveResetNoGoZonesTask.message"
        }
      ]
    },
    "receiveSetHeadingThrustTask": {
      "action": "receive",
      "title": "Receives set-heading-thrust command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives set-heading-thrust command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveSetHeadingThrustTask.message"
        }
      ]
    },
    "receiveDeliverTask": {
      "action": "receive",
      "title": "Receives deliver command",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives deliver command",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveDeliverTask.message"
        }
      ]
    },
    "SendTaskResponse": {
      "action": "send",
      "title": "Sends command response",
      "channel": {
        "$ref": "#/channels/taskResponseChannel"
      },
      "summary": "Sends command response",
      "messages": [
        {
          "$ref": "#/channels/taskResponseChannel/messages/SendTaskResponse.message"
        }
      ]
    },
    "SendTaskFeedback": {
      "action": "send",
      "title": "Sends command execution feedback",
      "channel": {
        "$ref": "#/channels/taskFeedbackChannel"
      },
      "summary": "Sends command execution feedback",
      "messages": [
        {
          "$ref": "#/channels/taskFeedbackChannel/messages/SendTaskFeedback.message"
        }
      ]
    },
    "receiveAbortSignal": {
      "action": "receive",
      "title": "Receives abort signal to terminate task execution",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives abort signal to terminate task execution",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveTaskSignal.message"
        }
      ]
    },
    "receivePauseSignal": {
      "action": "receive",
      "title": "Receives pause signal to halt task execution",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives pause signal to halt task execution",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveTaskSignal.message"
        }
      ]
    },
    "receiveContinueSignal": {
      "action": "receive",
      "title": "Receives continue signal to resume paused task",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives continue signal to resume paused task",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveTaskSignal.message"
        }
      ]
    },
    "receiveEnoughSignal": {
      "action": "receive",
      "title": "Receives enough signal to conclude task execution",
      "channel": {
        "$ref": "#/channels/execCommandChannel"
      },
      "summary": "Receives enough signal to conclude task execution",
      "messages": [
        {
          "$ref": "#/channels/execCommandChannel/messages/receiveTaskSignal.message"
        }
      ]
    }
  },
  "components": {
    "channelBindings": {
      "TaskMqttSettings": {
        "mqtt": {
          "qos": 1,
          "retain": false
        }
      }
    },
    "securitySchemes": {
      "tls": {
        "type": "X509",
        "x-securityScheme": "tls",
        "description": "TLS client certificate for secure connection"
      },
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "user",
        "description": "An API key is required for connecting to the MQTT broker"
      }
    },
    "parameters": {
      "AgentBaseTopic": {
        "description": "Full agent topic path: {organization}/{category}/{domain}/{real_sim}/{agent_name}. Field roles: Organization, Category, Domain, Real_Sim, Agent_name. See AgentBaseTopic schema for structure."
      }
    },
    "schemas": {
      "AddNoGoZonePayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/AddNoGoZoneTaskBody"
          }
        ]
      },
      "AddNoGoZoneTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "add-no-go-zone",
                "example": "add-no-go-zone"
              },
              "meta": {
                "type": "object",
                "additionalProperties": true
              },
              "params": {
                "type": "object",
                "properties": {
                  "area": {
                    "$ref": "#/components/schemas/GeoPoints"
                  }
                },
                "required": [
                  "area"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "AgentBaseTopic": {
        "description": "Base topic string composed of organization, category, domain, real_sim, agent_name. Field roles are Organization, Category, Domain, Real_Sim, Agent_name. This schema (and its Organization/Category/Domain/RealSim/AgentName parts) is defined identically in every API document that builds topics from it, so each document is self-contained. The value itself only ever appears substituted into a channel address, never as a message payload field.",
        "type": "string",
        "example": "waraps/unit/surface/simulation/SimUSV1",
        "pattern": "^[^/]+\\/(unit|service|general)\\/(air|ground|surface|subsurface|space|virtual)\\/(real|simulation)\\/[^/]+$"
      },
      "AgentName": {
        "description": "The name/ID of the agent.",
        "type": "string",
        "example": "SimUSV1"
      },
      "AgentUUID": {
        "type": "string",
        "description": "Agent UUID (UUID v4) that is unique for each agent. Should be reused between sessions.",
        "format": "uuid",
        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
      },
      "Altitude": {
        "type": "number",
        "description": "WGS84 altitude, meters with centimeter precision in relation to ellipsoid.",
        "example": 47.81,
        "format": "float"
      },
      "AvailableSignals": {
        "type": "string",
        "description": "Declaration of supported signals for provided tasks.",
        "enum": [
          "$abort",
          "$enough",
          "$pause",
          "$continue"
        ],
        "examples": [
          "$abort",
          "$enough",
          "$pause",
          "$continue"
        ]
      },
      "Category": {
        "type": "string",
        "description": "The category of the agent.",
        "enum": [
          "unit",
          "service",
          "general"
        ]
      },
      "CollectPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/CollectTaskBody"
          }
        ]
      },
      "CollectTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "collect",
                "example": "collect"
              },
              "params": {
                "type": "object",
                "properties": {
                  "cargo": {
                    "type": "string",
                    "example": "medicin"
                  }
                },
                "required": [
                  "cargo"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "ComUUID": {
        "type": "string",
        "description": "Command UUID (UUID v4) that is unique for each sent command or signal. Used for tracing feedback and response to its command.",
        "format": "uuid",
        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
      },
      "Commander": {
        "description": "Name/Identification of the command instance.",
        "type": "string",
        "example": "commander"
      },
      "DeliverPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/DeliverTaskBody"
          }
        ]
      },
      "DeliverTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "deliver",
                "example": "deliver"
              },
              "meta": {
                "type": "object",
                "description": "Optional metadata for the task",
                "properties": {
                  "reference": {
                    "type": "string",
                    "example": "delivery-route-1"
                  }
                },
                "additionalProperties": true
              },
              "params": {
                "type": "object",
                "properties": {
                  "waypoints": {
                    "$ref": "#/components/schemas/GeoPoints"
                  },
                  "speed": {
                    "$ref": "#/components/schemas/SpeedString"
                  },
                  "cargo": {
                    "type": "string"
                  }
                },
                "required": [
                  "waypoints",
                  "speed",
                  "cargo"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "Domain": {
        "type": "string",
        "description": "The domain of the agent.",
        "enum": [
          "air",
          "ground",
          "surface",
          "subsurface",
          "space",
          "virtual"
        ],
        "example": "surface"
      },
      "FollowLeadPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/FollowLeadTaskBody"
          }
        ]
      },
      "FollowLeadTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "follow-lead",
                "example": "follow-lead"
              },
              "meta": {
                "type": "object",
                "description": "Optional metadata for the task",
                "properties": {
                  "reference": {
                    "type": "string",
                    "description": "Reference identifier for the task",
                    "example": "MiniUSV1"
                  }
                },
                "additionalProperties": true
              },
              "params": {
                "type": "object",
                "properties": {
                  "speed": {
                    "$ref": "#/components/schemas/SpeedString"
                  }
                },
                "required": [
                  "speed"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "GeoPoint": {
        "type": "object",
        "description": "WGS84 geographic point with latitude, longitude, and altitude. Latitude, longitude, and altitude are required; rostype is optional.",
        "properties": {
          "latitude": {
            "$ref": "#/components/schemas/Latitude"
          },
          "longitude": {
            "$ref": "#/components/schemas/Longitude"
          },
          "altitude": {
            "$ref": "#/components/schemas/Altitude"
          },
          "rostype": {
            "type": "string",
            "description": "Optional ROS message type identifier",
            "example": "GeoPoint"
          }
        },
        "required": [
          "latitude",
          "longitude",
          "altitude"
        ]
      },
      "GeoPoints": {
        "type": "array",
        "minItems": 2,
        "description": "An array of WGS84 formatted objects including latitude, longitude and altitude.",
        "items": {
          "$ref": "#/components/schemas/GeoPoint"
        }
      },
      "GoHomePayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/GoHomeTaskBody"
          }
        ]
      },
      "GoHomeTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "go-home",
                "example": "go-home"
              },
              "params": {
                "type": "object",
                "properties": {
                  "speed": {
                    "$ref": "#/components/schemas/SpeedString"
                  }
                },
                "required": [
                  "speed"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "HeadingSensor": {
        "type": "number",
        "example": 137.2,
        "description": "Heading (deg) in relation to north."
      },
      "Latitude": {
        "type": "number",
        "description": "WGS84 latitude, seven or more decimals for centimeter precision.",
        "example": 57.7611363,
        "minimum": -90,
        "maximum": 90,
        "format": "float"
      },
      "Longitude": {
        "type": "number",
        "description": "WGS84 longitude, seven or more decimals for centimeter precision.",
        "example": 16.6805011,
        "minimum": -180,
        "maximum": 180,
        "format": "float"
      },
      "LookAtAgentPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/LookAtAgentTaskBody"
          }
        ]
      },
      "LookAtAgentTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "look-at-agent",
                "example": "look-at-agent"
              },
              "meta": {
                "type": "object",
                "description": "Optional metadata for the task",
                "properties": {
                  "reference": {
                    "type": "string",
                    "description": "Reference identifier for the task",
                    "example": "MiniUSV1"
                  }
                },
                "additionalProperties": true
              }
            },
            "required": [
              "name"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "LookAtPositionPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/LookAtPositionTaskBody"
          }
        ]
      },
      "LookAtPositionTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "look-at-position",
                "example": "look-at-position"
              },
              "meta": {
                "type": "object",
                "description": "Optional metadata for the task",
                "properties": {
                  "reference": {
                    "type": "string",
                    "description": "Reference identifier for the task",
                    "example": "my_look_at_point_1"
                  }
                },
                "additionalProperties": true
              },
              "params": {
                "type": "object",
                "properties": {
                  "geopoint": {
                    "$ref": "#/components/schemas/GeoPoint"
                  }
                },
                "required": [
                  "geopoint"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "MovePathPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/MovePathTaskBody"
          }
        ]
      },
      "MovePathTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "move-path",
                "example": "move-path"
              },
              "meta": {
                "type": "object",
                "description": "Optional metadata for the task",
                "properties": {
                  "reference": {
                    "type": "string",
                    "description": "Reference identifier for the task",
                    "example": "scaleout2-R"
                  }
                },
                "additionalProperties": true
              },
              "params": {
                "type": "object",
                "properties": {
                  "waypoints": {
                    "$ref": "#/components/schemas/GeoPoints"
                  },
                  "speed": {
                    "$ref": "#/components/schemas/SpeedString"
                  },
                  "loop": {
                    "type": "integer",
                    "description": "Optional loop parameter for repeating the path",
                    "example": 0
                  }
                },
                "required": [
                  "waypoints",
                  "speed"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "MoveToPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/MoveToTaskBody"
          }
        ]
      },
      "MoveToTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "move-to",
                "example": "move-to"
              },
              "meta": {
                "type": "object",
                "description": "Optional metadata for the task",
                "properties": {
                  "reference": {
                    "type": "string",
                    "description": "Reference identifier for the task",
                    "example": "waypoint-1"
                  }
                },
                "additionalProperties": true
              },
              "params": {
                "type": "object",
                "properties": {
                  "waypoint": {
                    "$ref": "#/components/schemas/GeoPoint"
                  },
                  "speed": {
                    "$ref": "#/components/schemas/SpeedString"
                  },
                  "loop": {
                    "type": "integer",
                    "description": "Optional loop parameter for repeating the movement",
                    "example": 0
                  }
                },
                "required": [
                  "waypoint",
                  "speed"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "ObservePositionPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/ObservePositionTaskBody"
          }
        ]
      },
      "ObservePositionTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "observe-position",
                "example": "observe-position"
              },
              "params": {
                "type": "object",
                "properties": {
                  "distance": {
                    "type": "number",
                    "example": 10
                  },
                  "duration": {
                    "type": "integer",
                    "example": 20
                  },
                  "geopoint": {
                    "$ref": "#/components/schemas/GeoPoint"
                  },
                  "height": {
                    "type": "number",
                    "example": -1
                  },
                  "speed": {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/SpeedFloat"
                    }
                  }
                },
                "required": [
                  "distance",
                  "duration",
                  "geopoint",
                  "height",
                  "speed"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "Organization": {
        "type": "string",
        "description": "The organization/owner of the agent. Open-ended and intentionally not enum-restricted: new organizations may join WARA-PS over time.",
        "examples": [
          "waraps",
          "saab",
          "aiics",
          "fmw",
          "liu"
        ]
      },
      "RealSim": {
        "type": "string",
        "description": "Indicates if agent is real or simulation.",
        "enum": [
          "real",
          "simulation"
        ]
      },
      "ReleasePayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/ReleaseTaskBody"
          }
        ]
      },
      "ReleaseTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "release",
                "example": "release"
              }
            },
            "required": [
              "name"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "ResetGeofencePayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/ResetGeofenceTaskBody"
          }
        ]
      },
      "ResetGeofenceTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "reset-geofence",
                "example": "reset-geofence"
              }
            },
            "required": [
              "name"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "ResetNoGoZonesPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/ResetNoGoZonesTaskBody"
          }
        ]
      },
      "ResetNoGoZonesTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "reset-no-go-zones",
                "example": "reset-no-go-zones"
              }
            },
            "required": [
              "name"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "ResetSpeedPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/ResetSpeedTaskBody"
          }
        ]
      },
      "ResetSpeedTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "reset-speed",
                "example": "reset-speed"
              }
            },
            "required": [
              "name"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "SearchAreaPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/SearchAreaTaskBody"
          }
        ]
      },
      "SearchAreaTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "search-area",
                "example": "search-area"
              },
              "meta": {
                "type": "object",
                "description": "Optional metadata for the task",
                "properties": {
                  "reference": {
                    "type": "string",
                    "description": "Reference identifier for the task",
                    "example": "search-area-1"
                  }
                },
                "additionalProperties": true
              },
              "params": {
                "type": "object",
                "properties": {
                  "area": {
                    "$ref": "#/components/schemas/GeoPoints"
                  },
                  "speed": {
                    "$ref": "#/components/schemas/SpeedString"
                  },
                  "target-type": {
                    "$ref": "#/components/schemas/TargetType"
                  },
                  "target-size": {
                    "$ref": "#/components/schemas/TargetSize"
                  },
                  "loop": {
                    "type": "integer",
                    "description": "Optional loop parameter for repeating the search pattern",
                    "example": 0
                  }
                },
                "required": [
                  "area",
                  "speed",
                  "target-type",
                  "target-size"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "SetGeofencePayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/SetGeofenceTaskBody"
          }
        ]
      },
      "SetGeofenceTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "set-geofence",
                "example": "set-geofence"
              },
              "params": {
                "type": "object",
                "properties": {
                  "area": {
                    "$ref": "#/components/schemas/GeoPoints"
                  }
                },
                "required": [
                  "area"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "SetHeadingThrustPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/SetHeadingThrustTaskBody"
          }
        ]
      },
      "SetHeadingThrustTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "set-heading-thrust",
                "example": "set-heading-thrust"
              },
              "params": {
                "type": "object",
                "properties": {
                  "heading": {
                    "$ref": "#/components/schemas/HeadingSensor"
                  },
                  "thrust": {
                    "$ref": "#/components/schemas/SpeedPercent"
                  }
                },
                "required": [
                  "heading",
                  "thrust"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "SetSpeedPayload": {
        "allOf": [
          {
            "$ref": "#/components/schemas/StartTaskBase"
          },
          {
            "$ref": "#/components/schemas/SetSpeedTaskBody"
          }
        ]
      },
      "SetSpeedTaskBody": {
        "type": "object",
        "properties": {
          "task": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "const": "set-speed",
                "example": "set-speed"
              },
              "params": {
                "type": "object",
                "properties": {
                  "speed": {
                    "$ref": "#/components/schemas/SpeedString"
                  }
                },
                "required": [
                  "speed"
                ]
              }
            },
            "required": [
              "name",
              "params"
            ]
          }
        },
        "required": [
          "task"
        ]
      },
      "SpeedFloat": {
        "type": "number",
        "example": 10.5,
        "description": "Speed over ground (SOG) in meters per second (mps)",
        "format": "float"
      },
      "SpeedPercent": {
        "type": "number",
        "example": 40,
        "description": "Speed over ground (SOG) percentage of max speed for agent.",
        "format": "float"
      },
      "SpeedString": {
        "type": "string",
        "enum": [
          "slow",
          "standard",
          "fast"
        ],
        "example": "standard",
        "description": "Fast = 100%, standard = 75% and slow = 50% of max speed over ground (SOG) for vehicle/vessel."
      },
      "StartTaskBase": {
        "type": "object",
        "description": "Common envelope for commands using the start-task pattern.",
        "properties": {
          "com-uuid": {
            "$ref": "#/components/schemas/ComUUID"
          },
          "task-uuid": {
            "$ref": "#/components/schemas/TaskUUID"
          },
          "command": {
            "type": "string",
            "const": "start-task",
            "example": "start-task"
          },
          "execution-unit": {
            "type": "string",
            "description": "Name of unit/agent",
            "example": "MiniUAV1"
          },
          "sender": {
            "$ref": "#/components/schemas/Commander"
          }
        },
        "required": [
          "com-uuid",
          "command",
          "execution-unit",
          "sender",
          "task-uuid"
        ]
      },
      "TargetSize": {
        "type": "number",
        "example": 1.8,
        "description": "Size of the target in meters.",
        "format": "float"
      },
      "TargetType": {
        "type": "string",
        "description": "The object class we are searching for. Open-ended: not restricted to the examples below.",
        "examples": [
          "person",
          "car",
          "boat"
        ],
        "example": "person"
      },
      "TaskFeedback": {
        "type": "string",
        "description": "Task process information.",
        "enum": [
          "starting",
          "planning",
          "running",
          "paused",
          "finished",
          "failed",
          "aborted"
        ],
        "example": "running"
      },
      "TaskFeedbackPayload": {
        "type": "object",
        "properties": {
          "agent-uuid": {
            "$ref": "#/components/schemas/AgentUUID"
          },
          "com-uuid": {
            "$ref": "#/components/schemas/ComUUID"
          },
          "status": {
            "$ref": "#/components/schemas/TaskFeedback"
          },
          "task-uuid": {
            "$ref": "#/components/schemas/TaskUUID"
          }
        },
        "required": [
          "agent-uuid",
          "com-uuid",
          "status",
          "task-uuid"
        ]
      },
      "TaskResponse": {
        "type": "string",
        "description": "Response to the sent command.",
        "enum": [
          "running",
          "failed",
          "finished"
        ],
        "example": "running"
      },
      "TaskResponsePayload": {
        "type": "object",
        "description": "Task command response payload. For failed responses, response-to and fail-reason are sent together. For non-failed responses, both fields are omitted.",
        "properties": {
          "agent-uuid": {
            "$ref": "#/components/schemas/AgentUUID"
          },
          "com-uuid": {
            "$ref": "#/components/schemas/ComUUID"
          },
          "response": {
            "$ref": "#/components/schemas/TaskResponse"
          },
          "fail-reason": {
            "type": "string",
            "description": "Error details for a failed response. This field is used together with response-to when response is failed.",
            "example": "Execution failed ..."
          },
          "response-to": {
            "$ref": "#/components/schemas/ComUUID",
            "description": "Command UUID that this failed response refers to. This field is used together with fail-reason when response is failed."
          },
          "task-uuid": {
            "$ref": "#/components/schemas/TaskUUID"
          }
        },
        "required": [
          "agent-uuid",
          "com-uuid",
          "response",
          "task-uuid"
        ]
      },
      "TaskSignalPayload": {
        "type": "object",
        "properties": {
          "com-uuid": {
            "$ref": "#/components/schemas/ComUUID"
          },
          "command": {
            "type": "string",
            "const": "signal-task",
            "example": "signal-task"
          },
          "signal": {
            "$ref": "#/components/schemas/AvailableSignals"
          },
          "sender": {
            "$ref": "#/components/schemas/Commander"
          },
          "task-uuid": {
            "$ref": "#/components/schemas/TaskUUID"
          }
        },
        "required": [
          "com-uuid",
          "command",
          "signal",
          "sender",
          "task-uuid"
        ]
      },
      "TaskUUID": {
        "type": "string",
        "description": "Task UUID (UUID v4) that is unique for each sent task. Used for connecting signals($abort, $pause, ...) to its task.",
        "format": "uuid",
        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
      }
    },
    "messages": {
      "MoveToTaskMessage": {
        "name": "move-to",
        "description": "Command to move the agent to a specific position.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/MoveToPayload"
        },
        "examples": [
          {
            "name": "Move SimUSV1 to a waypoint",
            "summary": "A complete start-task command for move-to",
            "payload": {
              "com-uuid": "5f3e2c1a-8b7d-4e6f-9a1b-2c3d4e5f6789",
              "task-uuid": "1a2b3c4d-5e6f-4789-9abc-def012345678",
              "command": "start-task",
              "execution-unit": "SimUSV1",
              "sender": "commander",
              "task": {
                "name": "move-to",
                "meta": {
                  "reference": "waypoint-1"
                },
                "params": {
                  "waypoint": {
                    "latitude": 57.7611363,
                    "longitude": 16.6805011,
                    "altitude": 47.81
                  },
                  "speed": "standard"
                }
              }
            }
          }
        ]
      },
      "MovePathTaskMessage": {
        "name": "move-path",
        "description": "Command to move the agent along a path.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/MovePathPayload"
        }
      },
      "SearchAreaTaskMessage": {
        "name": "search-area",
        "description": "Command to search a specified area for a specific target and size.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/SearchAreaPayload"
        }
      },
      "LookAtPositionTaskMessage": {
        "name": "look-at-position",
        "description": "Command to make the agent look at a specific position.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/LookAtPositionPayload"
        }
      },
      "LookAtAgentTaskMessage": {
        "name": "look-at-agent",
        "description": "Command to make the agent's camera follow another agent.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/LookAtAgentPayload"
        }
      },
      "FollowLeadTaskMessage": {
        "name": "follow-lead",
        "description": "Command to make the agent follow another agent.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/FollowLeadPayload"
        }
      },
      "CollectTaskMessage": {
        "name": "collect",
        "description": "Command to make the agent collect/grab an item.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/CollectPayload"
        }
      },
      "ReleaseTaskMessage": {
        "name": "release",
        "description": "Command to make the agent release all collected items.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/ReleasePayload"
        }
      },
      "GoHomeTaskMessage": {
        "name": "go-home",
        "description": "Command to make the agent return to its home position.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/GoHomePayload"
        }
      },
      "ObservePositionTaskMessage": {
        "name": "observe-position",
        "description": "Command to make the agent observe a position.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/ObservePositionPayload"
        }
      },
      "SetSpeedTaskMessage": {
        "name": "set-speed",
        "description": "Command to set the speed of an ongoing task.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/SetSpeedPayload"
        }
      },
      "ResetSpeedTaskMessage": {
        "name": "reset-speed",
        "description": "Command to reset the speed of an ongoing task.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/ResetSpeedPayload"
        }
      },
      "SetGeofenceTaskMessage": {
        "name": "set-geofence",
        "description": "Command to set a geofence for the agent.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/SetGeofencePayload"
        }
      },
      "ResetGeofenceTaskMessage": {
        "name": "reset-geofence",
        "description": "Command to remove the active geofence.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/ResetGeofencePayload"
        }
      },
      "AddNoGoZoneTaskMessage": {
        "name": "add-no-go-zone",
        "description": "Command to add a no-go-zone for the agent.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/AddNoGoZonePayload"
        }
      },
      "ResetNoGoZonesTaskMessage": {
        "name": "reset-no-go-zones",
        "description": "Command to remove all active no-go-zones.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/ResetNoGoZonesPayload"
        }
      },
      "SetHeadingThrustTaskMessage": {
        "name": "set-heading-thrust",
        "description": "Command to set heading and thrust for an agent.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/SetHeadingThrustPayload"
        }
      },
      "DeliverTaskMessage": {
        "name": "deliver",
        "description": "Command to deliver cargo to a specific position along a path.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/DeliverPayload"
        }
      },
      "TaskResponseMessage": {
        "name": "response",
        "description": "Response message from an agent.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/TaskResponsePayload"
        },
        "examples": [
          {
            "name": "Accepted, now running",
            "summary": "Response to the move-to command above, immediately after it validates",
            "payload": {
              "agent-uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "com-uuid": "9c8b7a6f-5e4d-4c3b-9a19-8f7e6d5c4b3a",
              "response": "running",
              "task-uuid": "1a2b3c4d-5e6f-4789-9abc-def012345678"
            }
          },
          {
            "name": "Rejected, failed",
            "summary": "Failed response includes both response-to and fail-reason",
            "payload": {
              "agent-uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "com-uuid": "9c8b7a6f-5e4d-4c3b-9a19-8f7e6d5c4b3a",
              "response": "failed",
              "response-to": "5f3e2c1a-8b7d-4e6f-9a1b-2c3d4e5f6789",
              "fail-reason": "Validation failed: unsupported task parameters.",
              "task-uuid": "1a2b3c4d-5e6f-4789-9abc-def012345678"
            }
          }
        ]
      },
      "TaskFeedbackMessage": {
        "name": "feedback",
        "description": "Feedback message on the status of a task.",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/TaskFeedbackPayload"
        },
        "examples": [
          {
            "name": "Task running",
            "summary": "Feedback while the move-to task above is actively executing",
            "payload": {
              "agent-uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
              "com-uuid": "9c8b7a6f-5e4d-4c3b-9a19-8f7e6d5c4b3a",
              "status": "running",
              "task-uuid": "1a2b3c4d-5e6f-4789-9abc-def012345678"
            }
          }
        ]
      },
      "SignalMessage": {
        "name": "task-signal",
        "description": "Message to send a control signal to an executing task (e.g., abort, pause, continue).",
        "contentType": "application/json",
        "payload": {
          "$ref": "#/components/schemas/TaskSignalPayload"
        },
        "examples": [
          {
            "name": "Pause the running task",
            "summary": "A signal-task command targeting the task started above",
            "payload": {
              "com-uuid": "2b3c4d5e-6f70-4819-9abc-def012345679",
              "command": "signal-task",
              "signal": "$pause",
              "sender": "commander",
              "task-uuid": "1a2b3c4d-5e6f-4789-9abc-def012345678"
            }
          }
        ]
      }
    }
  }
}
