{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.netify.ai/developer/agent/v5/schemas/netify-proc-core.json",
  "title": "Netify Core Processor Configuration",
  "description": "JSON Schema for the Netify Core Processor plugin configuration.",
  "type": "object",
  "properties": {
    "format": {
      "$ref": "#/$defs/formatType",
      "description": "Default payload format used for all outputs unless overridden in sinks."
    },
    "compressor": {
      "$ref": "#/$defs/compressorType",
      "description": "Default compression policy used for all outputs unless overridden in sinks."
    },
    "sinks": {
      "type": "object",
      "description": "Sink configuration.",
      "additionalProperties": {
        "type": "object",
        "description": "The specific output target (e.g., 'sink-mqtt', 'sink-http').",
        "additionalProperties": {
          "type": "object",
          "description": "The specific channel or topic for the target (e.g., 'aggregate').",
          "properties": {
            "enable": {
              "type": "boolean",
              "default": true,
              "description": "Enables or disables this specific sink channel."
            },
            "format": {
              "$ref": "#/$defs/formatType"
            },
            "compressor": {
              "$ref": "#/$defs/compressorType"
            },
            "types": {
              "type": "array",
              "description": "Telemetry type.",
              "items": { "type": "string", "enum": ["stream-flows", "stream-stats"] },
              "externalDocs": {
                "description": "Telemetry list and details",
                "url": "https://www.netify.ai/documentation/agent/v5/processor/core#telemetry"
              }
            }
          },
          "required": ["types"]
        }
      }
    }
  },
  "$defs": {
    "formatType": {
      "type": "string",
      "enum": ["json", "msgpack"],
      "description": "The serialization format for the data payload."
    },
    "compressorType": {
      "type": "string",
      "enum": ["none", "gz"],
      "description": "The compression algorithm applied to the payload."
    }
  },
  "examples": [
    {
      "format": "json",
      "compressor": "none",
      "sinks": {
        "sink-log": {
          "stats": {
            "enable": true,
            "types": [ "stream-stats" ]
          }
        }
      }
    }
  ]
}
