{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://intelligentliving.art/schemas/action-plan/v1.json",
  "title": "Living Art Capability Action Plan v1",
  "type": "object",
  "required": [
    "type",
    "version",
    "turnId",
    "status",
    "actions"
  ],
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri-reference"
    },
    "type": {
      "const": "https://intelligentliving.art/protocols/action-plan/v1.json"
    },
    "version": {
      "const": "1.0.0"
    },
    "turnId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "status": {
      "enum": [
        "action-required",
        "final",
        "failed"
      ]
    },
    "displayText": {
      "type": "string"
    },
    "speechText": {
      "type": "string"
    },
    "actions": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "kind",
          "blocking",
          "state"
        ],
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100
          },
          "kind": {
            "enum": [
              "camera.capture",
              "image.generate",
              "speech.synthesize",
              "presentation.set"
            ]
          },
          "blocking": {
            "type": "boolean"
          },
          "state": {
            "enum": [
              "requested",
              "succeeded",
              "failed",
              "declined"
            ]
          },
          "dependsOn": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "consentRequired": {
            "type": "boolean"
          },
          "ephemeral": {
            "type": "boolean"
          },
          "parameters": {
            "type": "object"
          },
          "result": {
            "type": "object"
          }
        },
        "additionalProperties": false
      }
    },
    "presentation": {
      "type": "object",
      "properties": {
        "state": {
          "enum": [
            "looking",
            "thinking",
            "talking"
          ]
        }
      },
      "additionalProperties": false
    }
  },
  "additionalProperties": false
}
