{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://github.com/boshu2/agentops/docs/contracts/rpi-c2-commands.schema.json",
  "title": "RPI C2 Commands",
  "description": "Schema for .agents/rpi/runs/<run-id>/commands.jsonl control commands.",
  "type": "object",
  "required": [
    "schema_version",
    "command_id",
    "run_id",
    "kind",
    "targets",
    "timestamp"
  ],
  "properties": {
    "schema_version": {
      "type": "integer",
      "const": 1
    },
    "command_id": {
      "type": "string",
      "minLength": 1
    },
    "run_id": {
      "type": "string",
      "minLength": 1
    },
    "phase": {
      "type": "integer",
      "minimum": 1
    },
    "kind": {
      "type": "string",
      "minLength": 1
    },
    "targets": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1
    },
    "message": {
      "type": "string"
    },
    "deadline": {
      "type": "string",
      "format": "date-time"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": true
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    }
  },
  "additionalProperties": false
}
