{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/proactions-ai-kit-configuration-for-sections/latest.json",
  "title": "ProActions Section Schema",
  "description": "A logical section containing grouped actions",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/em-al-wi/proactions-schema/main/schema/partial-section.schema.json",
    "sourceSha256": "cda9969104a63d587d9a2827315ed912d9d184ece4b96a220aae02450a02aef2",
    "fileMatch": [
      "*.ai-kit.sect.yaml"
    ],
    "parsers": [
      "yaml"
    ]
  },
  "type": "object",
  "properties": {
    "section": {
      "type": "string",
      "description": "Section identifier"
    },
    "category": {
      "type": "string",
      "description": "Category for grouping sections"
    },
    "hidden": {
      "type": "boolean",
      "description": "Whether this section is hidden from UI"
    },
    "app": {
      "type": "string",
      "enum": [
        "prime",
        "swing",
        "standalone"
      ],
      "description": "Application where this section applies"
    },
    "context": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "all",
            "report",
            "story",
            "dwp",
            "dashboard",
            "page",
            "picture",
            "planner"
          ]
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "all",
              "report",
              "story",
              "dwp",
              "dashboard",
              "page",
              "picture",
              "planner"
            ]
          }
        }
      ],
      "description": "Document context where this section appears"
    },
    "keywords": {
      "type": "string",
      "description": "Search keywords for finding actions"
    },
    "icon": {
      "type": "string",
      "description": "Icon html for this section"
    },
    "monitor": {
      "type": "object",
      "description": "Monitor configuration override for this section",
      "properties": {
        "enabled": {
          "type": "boolean",
          "description": "Enable monitor for this section"
        },
        "showProgress": {
          "type": "boolean",
          "description": "Show progress bar"
        },
        "showStepNames": {
          "type": "boolean",
          "description": "Show current step name"
        },
        "showElapsedTime": {
          "type": "boolean",
          "description": "Show elapsed time"
        },
        "enableCancellation": {
          "type": "boolean",
          "description": "Allow cancelling this flow"
        },
        "confirmCancellation": {
          "type": "boolean",
          "description": "Confirm before cancelling"
        },
        "renderMarkdown": {
          "type": "boolean",
          "description": "Render markdown in feedback messages"
        },
        "defaultWidth": {
          "type": "number",
          "minimum": 200,
          "description": "Override default width of the monitor in pixels for this section"
        },
        "defaultHeight": {
          "type": "number",
          "minimum": 100,
          "description": "Override default height of the monitor in pixels for this section"
        }
      },
      "additionalProperties": false
    },
    "imports": {
      "oneOf": [
        {
          "type": "array",
          "description": "Reusable block modules imported into the section scope.",
          "items": {
            "type": "object",
            "required": [
              "from",
              "as"
            ],
            "properties": {
              "from": {
                "type": "string",
                "description": "Path to the module file. Supports template resolution."
              },
              "as": {
                "type": "string",
                "description": "Alias used under imports.<alias> namespace."
              }
            },
            "additionalProperties": false
          }
        },
        {
          "type": "string",
          "description": "Path to an external imports file using !include directive"
        }
      ]
    },
    "blocks": {
      "oneOf": [
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/proactions-ai-kit-configuration-for-sections/_shared/latest--partial-blocks.schema.json"
        },
        {
          "type": "string",
          "description": "Path to an external blocks file using !include directive"
        }
      ]
    },
    "actions": {
      "type": "array",
      "description": "List of actions in this section",
      "items": {
        "oneOf": [
          {
            "$ref": "https://catalog.lintel.tools/schemas/schemastore/proactions-ai-kit-configuration-for-sections/_shared/latest--partial-action.schema.json"
          },
          {
            "type": "string",
            "description": "Path to an external file using !include directive"
          }
        ]
      }
    }
  },
  "required": [
    "section",
    "actions"
  ]
}
