{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://mere.run/schemas/asset-manifest-v1.schema.json",
  "title": "mere.run Workflow Asset Manifest V1",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "groups"],
  "properties": {
    "schema_version": { "const": 1 },
    "groups": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["name", "kind", "entries"],
        "properties": {
          "name": { "type": "string", "minLength": 1 },
          "kind": { "enum": ["asset", "asset_directory"] },
          "entries": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": ["path", "digest", "size_bytes", "content_type"],
              "properties": {
                "path": { "type": "string", "minLength": 1 },
                "digest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
                "size_bytes": { "type": "integer", "minimum": 0 },
                "content_type": { "type": "string", "minLength": 1 }
              }
            }
          }
        }
      }
    }
  }
}
