{
  "type": "object",
  "required": [
    "header",
    "intentId",
    "operation",
    "resources",
    "externalEffect",
    "requestedAt",
    "arguments"
  ],
  "properties": {
    "header": {
      "type": "object",
      "required": [
        "namespace",
        "major",
        "minor"
      ],
      "properties": {
        "namespace": {
          "type": "string",
          "const": "ai.aletheion.asm"
        },
        "major": {
          "type": "number",
          "const": 1
        },
        "minor": {
          "type": "integer",
          "minimum": 0
        }
      },
      "additionalProperties": false
    },
    "intentId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "operation": {
      "anyOf": [
        {
          "type": "string",
          "const": "diagnose"
        },
        {
          "type": "string",
          "const": "read"
        },
        {
          "type": "string",
          "const": "write"
        },
        {
          "type": "string",
          "const": "execute"
        },
        {
          "type": "string",
          "const": "communicate"
        },
        {
          "type": "string",
          "const": "deploy"
        },
        {
          "type": "string",
          "const": "purchase"
        },
        {
          "type": "string",
          "const": "delete"
        }
      ]
    },
    "resources": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "uniqueItems": true
    },
    "externalEffect": {
      "type": "boolean"
    },
    "idempotencyKey": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "requestedAt": {
      "type": "string",
      "format": "date-time"
    },
    "arguments": {
      "type": "object",
      "patternProperties": {
        "^.*$": {}
      }
    }
  },
  "additionalProperties": false,
  "$id": "asm-intent-v1"
}
