{
  "capability": "blender.scene.author@v3",
  "display_name": "Blender 受管三维场景创作",
  "default_enrollment": false,
  "output_namespace": "blender",
  "input_policy": {
    "suffixes": [],
    "max_count": 0,
    "max_bytes": 0,
    "max_total_bytes": 0
  },
  "outputs": {
    "project": {
      "filename": "scene.blend",
      "media_type": "application/x-blender",
      "relative_path": "scene.blend",
      "publish": true,
      "required": true
    },
    "preview_01": {
      "filename": "preview-01.png",
      "media_type": "image/png",
      "relative_path": "preview-01.png",
      "publish": true,
      "required": true
    },
    "preview_02": {
      "filename": "preview-02.png",
      "media_type": "image/png",
      "relative_path": "preview-02.png",
      "publish": true,
      "required": false
    },
    "preview_03": {
      "filename": "preview-03.png",
      "media_type": "image/png",
      "relative_path": "preview-03.png",
      "publish": true,
      "required": false
    },
    "preview_04": {
      "filename": "preview-04.png",
      "media_type": "image/png",
      "relative_path": "preview-04.png",
      "publish": true,
      "required": false
    },
    "preview_05": {
      "filename": "preview-05.png",
      "media_type": "image/png",
      "relative_path": "preview-05.png",
      "publish": true,
      "required": false
    },
    "preview_06": {
      "filename": "preview-06.png",
      "media_type": "image/png",
      "relative_path": "preview-06.png",
      "publish": true,
      "required": false
    },
    "preview_07": {
      "filename": "preview-07.png",
      "media_type": "image/png",
      "relative_path": "preview-07.png",
      "publish": true,
      "required": false
    },
    "preview_08": {
      "filename": "preview-08.png",
      "media_type": "image/png",
      "relative_path": "preview-08.png",
      "publish": true,
      "required": false
    },
    "scene_manifest": {
      "filename": "scene-manifest.json",
      "media_type": "application/json",
      "relative_path": "scene-manifest.json",
      "publish": true,
      "required": true
    },
    "scene_glb": {
      "filename": "scene.glb",
      "media_type": "model/gltf-binary",
      "relative_path": "scene.glb",
      "publish": true,
      "required": false
    },
    "provenance": {
      "filename": "provenance.json",
      "media_type": "application/json",
      "relative_path": ".meta/provenance.json",
      "publish": false,
      "required": true
    }
  },
  "feature_path": ["operation", "scene", "type"],
  "features": {
    "recipe": "1.0.0"
  },
  "summary": {
    "title_path": ["operation", "scene", "title"]
  },
  "legacy_runtime": null,
  "workspace": {
    "state_output": "project",
    "preview_outputs": [
      "preview_01", "preview_02", "preview_03", "preview_04",
      "preview_05", "preview_06", "preview_07", "preview_08"
    ],
    "required_adapter_version": "1.0.0"
  },
  "request_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "x-maxBytes": 262144,
    "required": ["schema_version", "inputs", "operation", "outputs"],
    "additionalProperties": false,
    "properties": {
      "schema_version": {"const": 3},
      "inputs": {"type": "array", "maxItems": 0},
      "operation": {
        "type": "object",
        "required": ["scene"],
        "additionalProperties": false,
        "properties": {
          "scene": {"$ref": "#/$defs/recipeScene"}
        }
      },
      "outputs": {
        "type": "array",
        "maxItems": 8,
        "uniqueItems": true,
        "description": "preview_01 固定生成；为其余 render.views 请求对应预览，可另选 GLB。",
        "items": {
          "oneOf": [
            {"$ref": "#/$defs/preview02Output"},
            {"$ref": "#/$defs/preview03Output"},
            {"$ref": "#/$defs/preview04Output"},
            {"$ref": "#/$defs/preview05Output"},
            {"$ref": "#/$defs/preview06Output"},
            {"$ref": "#/$defs/preview07Output"},
            {"$ref": "#/$defs/preview08Output"},
            {"$ref": "#/$defs/glbOutput"}
          ]
        }
      }
    },
    "$defs": {
      "identifier": {"type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"},
      "color": {"type": "string", "pattern": "^#[0-9A-Fa-f]{6}$"},
      "positive": {"type": "number", "exclusiveMinimum": 0, "maximum": 10000},
      "vector2": {
        "type": "array", "minItems": 2, "maxItems": 2,
        "items": {"type": "number", "minimum": -10000, "maximum": 10000}
      },
      "vector3": {
        "type": "array", "minItems": 3, "maxItems": 3,
        "items": {"type": "number", "minimum": -10000, "maximum": 10000}
      },
      "scale3": {
        "type": "array", "minItems": 3, "maxItems": 3,
        "items": {"type": "number", "exclusiveMinimum": 0, "maximum": 1000}
      },
      "transform": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "position": {"$ref": "#/$defs/vector3"},
          "rotation_deg": {"$ref": "#/$defs/vector3"},
          "scale": {"$ref": "#/$defs/scale3"}
        }
      },
      "material": {
        "type": "object",
        "required": ["id", "base_color"],
        "additionalProperties": false,
        "properties": {
          "id": {"$ref": "#/$defs/identifier"},
          "base_color": {"$ref": "#/$defs/color"},
          "metallic": {"type": "number", "minimum": 0, "maximum": 1},
          "roughness": {"type": "number", "minimum": 0, "maximum": 1},
          "emission_color": {"$ref": "#/$defs/color"},
          "emission_strength": {"type": "number", "minimum": 0, "maximum": 100},
          "opacity": {"type": "number", "exclusiveMinimum": 0, "maximum": 1}
        }
      },
      "boxGeometry": {
        "type": "object", "required": ["type", "size"], "additionalProperties": false,
        "properties": {"type": {"const": "box"}, "size": {"$ref": "#/$defs/scale3"}}
      },
      "cylinderGeometry": {
        "type": "object", "required": ["type", "radius", "depth"], "additionalProperties": false,
        "properties": {
          "type": {"const": "cylinder"}, "radius": {"$ref": "#/$defs/positive"},
          "depth": {"$ref": "#/$defs/positive"},
          "vertices": {"type": "integer", "minimum": 8, "maximum": 256}
        }
      },
      "coneGeometry": {
        "type": "object", "required": ["type", "radius1", "radius2", "depth"], "additionalProperties": false,
        "properties": {
          "type": {"const": "cone"}, "radius1": {"type": "number", "minimum": 0, "maximum": 10000},
          "radius2": {"type": "number", "minimum": 0, "maximum": 10000},
          "depth": {"$ref": "#/$defs/positive"},
          "vertices": {"type": "integer", "minimum": 8, "maximum": 256}
        }
      },
      "sphereGeometry": {
        "type": "object", "required": ["type", "radius"], "additionalProperties": false,
        "properties": {
          "type": {"const": "sphere"}, "radius": {"$ref": "#/$defs/positive"},
          "segments": {"type": "integer", "minimum": 8, "maximum": 256},
          "rings": {"type": "integer", "minimum": 4, "maximum": 128}
        }
      },
      "torusGeometry": {
        "type": "object", "required": ["type", "major_radius", "minor_radius"], "additionalProperties": false,
        "properties": {
          "type": {"const": "torus"}, "major_radius": {"$ref": "#/$defs/positive"},
          "minor_radius": {"$ref": "#/$defs/positive"},
          "major_segments": {"type": "integer", "minimum": 8, "maximum": 256},
          "minor_segments": {"type": "integer", "minimum": 4, "maximum": 128}
        }
      },
      "planeGeometry": {
        "type": "object", "required": ["type", "size"], "additionalProperties": false,
        "properties": {"type": {"const": "plane"}, "size": {"$ref": "#/$defs/vector2"}}
      },
      "extrudeGeometry": {
        "type": "object", "required": ["type", "profile", "depth"], "additionalProperties": false,
        "properties": {
          "type": {"const": "extrude"}, "depth": {"$ref": "#/$defs/positive"},
          "profile": {"type": "array", "minItems": 3, "maxItems": 128, "items": {"$ref": "#/$defs/vector2"}}
        }
      },
      "revolveGeometry": {
        "type": "object", "required": ["type", "profile"], "additionalProperties": false,
        "properties": {
          "type": {"const": "revolve"},
          "profile": {"type": "array", "minItems": 2, "maxItems": 128, "items": {"$ref": "#/$defs/vector2"}},
          "angle_deg": {"type": "number", "exclusiveMinimum": 0, "maximum": 360},
          "segments": {"type": "integer", "minimum": 8, "maximum": 256}
        }
      },
      "sweepGeometry": {
        "type": "object", "required": ["type", "path", "radius"], "additionalProperties": false,
        "properties": {
          "type": {"const": "sweep"}, "radius": {"$ref": "#/$defs/positive"},
          "resolution": {"type": "integer", "minimum": 0, "maximum": 12},
          "path": {"type": "array", "minItems": 2, "maxItems": 128, "items": {"$ref": "#/$defs/vector3"}}
        }
      },
      "pipeGeometry": {
        "type": "object", "required": ["type", "start", "end", "outer_radius", "wall_thickness"], "additionalProperties": false,
        "properties": {
          "type": {"const": "pipe"}, "start": {"$ref": "#/$defs/vector3"}, "end": {"$ref": "#/$defs/vector3"},
          "outer_radius": {"$ref": "#/$defs/positive"}, "wall_thickness": {"$ref": "#/$defs/positive"},
          "vertices": {"type": "integer", "minimum": 8, "maximum": 256}
        }
      },
      "geometry": {
        "oneOf": [
          {"$ref": "#/$defs/boxGeometry"}, {"$ref": "#/$defs/cylinderGeometry"},
          {"$ref": "#/$defs/coneGeometry"}, {"$ref": "#/$defs/sphereGeometry"},
          {"$ref": "#/$defs/torusGeometry"}, {"$ref": "#/$defs/planeGeometry"},
          {"$ref": "#/$defs/extrudeGeometry"}, {"$ref": "#/$defs/revolveGeometry"},
          {"$ref": "#/$defs/sweepGeometry"}, {"$ref": "#/$defs/pipeGeometry"}
        ]
      },
      "modifier": {
        "oneOf": [
          {
            "type": "object", "required": ["type", "width"], "additionalProperties": false,
            "properties": {"type": {"const": "bevel"}, "width": {"$ref": "#/$defs/positive"}, "segments": {"type": "integer", "minimum": 1, "maximum": 12}}
          },
          {
            "type": "object", "required": ["type", "axes"], "additionalProperties": false,
            "properties": {"type": {"const": "mirror"}, "axes": {"type": "array", "minItems": 1, "maxItems": 3, "uniqueItems": true, "items": {"enum": ["x", "y", "z"]}}}
          },
          {
            "type": "object", "required": ["type", "count", "offset"], "additionalProperties": false,
            "properties": {"type": {"const": "array"}, "count": {"type": "integer", "minimum": 2, "maximum": 100}, "offset": {"$ref": "#/$defs/vector3"}}
          },
          {
            "type": "object", "required": ["type", "thickness"], "additionalProperties": false,
            "properties": {"type": {"const": "solidify"}, "thickness": {"type": "number", "minimum": -1000, "maximum": 1000, "not": {"const": 0}}}
          },
          {
            "type": "object", "required": ["type", "operation", "target"], "additionalProperties": false,
            "properties": {"type": {"const": "boolean"}, "operation": {"enum": ["union", "difference", "intersect"]}, "target": {"$ref": "#/$defs/identifier"}}
          }
        ]
      },
      "object": {
        "type": "object",
        "required": ["id", "kind"],
        "additionalProperties": false,
        "properties": {
          "id": {"$ref": "#/$defs/identifier"}, "name": {"type": "string", "minLength": 1, "maxLength": 160},
          "kind": {"enum": ["geometry", "generator", "text", "empty"]},
          "geometry": {"$ref": "#/$defs/geometry"},
          "generator": {"const": "rotary_kiln"},
          "parameters": {"$ref": "#/$defs/rotaryKilnParameters"},
          "text": {"type": "string", "minLength": 1, "maxLength": 1000},
          "text_size": {"$ref": "#/$defs/positive"},
          "text_extrude": {"type": "number", "minimum": 0, "maximum": 10},
          "transform": {"$ref": "#/$defs/transform"},
          "material": {"$ref": "#/$defs/identifier"},
          "parent": {"$ref": "#/$defs/identifier"},
          "collection": {"$ref": "#/$defs/identifier"},
          "modifiers": {"type": "array", "maxItems": 12, "items": {"$ref": "#/$defs/modifier"}},
          "visible": {"type": "boolean"}
        },
        "allOf": [
          {"if": {"properties": {"kind": {"const": "geometry"}}}, "then": {"required": ["geometry"]}},
          {"if": {"properties": {"kind": {"const": "generator"}}}, "then": {"required": ["generator", "parameters"]}},
          {"if": {"properties": {"kind": {"const": "text"}}}, "then": {"required": ["text"]}}
        ]
      },
      "rotaryKilnParameters": {
        "type": "object",
        "required": ["length_m", "outer_diameter_m", "shell_thickness_m", "lining_thickness_m", "slope_percent", "support_stations"],
        "additionalProperties": false,
        "properties": {
          "length_m": {"type": "number", "minimum": 1, "maximum": 200},
          "outer_diameter_m": {"type": "number", "minimum": 0.2, "maximum": 15},
          "shell_thickness_m": {"type": "number", "minimum": 0.005, "maximum": 0.5},
          "lining_thickness_m": {"type": "number", "minimum": 0.01, "maximum": 1.5},
          "slope_percent": {"type": "number", "minimum": 0, "maximum": 10},
          "support_stations": {"type": "integer", "minimum": 2, "maximum": 8},
          "drive_system": {"type": "boolean"}, "burner": {"type": "boolean"},
          "hoods": {"type": "boolean"}, "inspection_platform": {"type": "boolean"},
          "material_bed": {"type": "boolean"}
        }
      },
      "light": {
        "type": "object", "required": ["id", "type", "position", "energy"], "additionalProperties": false,
        "properties": {
          "id": {"$ref": "#/$defs/identifier"}, "type": {"enum": ["sun", "area", "point", "spot"]},
          "position": {"$ref": "#/$defs/vector3"}, "target": {"$ref": "#/$defs/vector3"},
          "energy": {"type": "number", "exclusiveMinimum": 0, "maximum": 1000000},
          "color": {"$ref": "#/$defs/color"}, "size": {"$ref": "#/$defs/positive"},
          "spot_size_deg": {"type": "number", "exclusiveMinimum": 0, "maximum": 180}
        }
      },
      "view": {
        "type": "object",
        "required": ["name", "output_key", "position", "target", "projection"],
        "additionalProperties": false,
        "properties": {
          "name": {"type": "string", "minLength": 1, "maxLength": 80},
          "output_key": {"enum": ["preview_01", "preview_02", "preview_03", "preview_04", "preview_05", "preview_06", "preview_07", "preview_08"]},
          "position": {"$ref": "#/$defs/vector3"}, "target": {"$ref": "#/$defs/vector3"},
          "projection": {"enum": ["perspective", "orthographic"]},
          "lens_mm": {"type": "number", "minimum": 1, "maximum": 300},
          "ortho_scale": {"$ref": "#/$defs/positive"},
          "clip_end": {"type": "number", "minimum": 1, "maximum": 100000}
        }
      },
      "render": {
        "type": "object", "required": ["views"], "additionalProperties": false,
        "properties": {
          "width": {"type": "integer", "minimum": 320, "maximum": 3840},
          "height": {"type": "integer", "minimum": 240, "maximum": 2160},
          "transparent_background": {"type": "boolean"},
          "background_color": {"$ref": "#/$defs/color"},
          "views": {
            "type": "array", "minItems": 1, "maxItems": 8,
            "contains": {"type": "object", "properties": {"output_key": {"const": "preview_01"}}, "required": ["output_key"]},
            "items": {"$ref": "#/$defs/view"}
          }
        }
      },
      "recipeScene": {
        "type": "object",
        "required": ["type", "recipe_version", "title", "units", "objects", "render"],
        "additionalProperties": false,
        "properties": {
          "type": {"const": "recipe"}, "recipe_version": {"const": 1},
          "title": {"type": "string", "minLength": 1, "maxLength": 160},
          "units": {"enum": ["meters", "millimeters"]},
          "materials": {"type": "array", "maxItems": 64, "items": {"$ref": "#/$defs/material"}},
          "objects": {"type": "array", "minItems": 1, "maxItems": 200, "items": {"$ref": "#/$defs/object"}},
          "lights": {"type": "array", "maxItems": 16, "items": {"$ref": "#/$defs/light"}},
          "render": {"$ref": "#/$defs/render"}
        }
      },
      "pngOutput": {
        "type": "object", "required": ["key", "type", "format"], "additionalProperties": false,
        "properties": {"key": {"type": "string"}, "type": {"const": "figure"}, "format": {"const": "png"}}
      },
      "preview02Output": {"allOf": [{"$ref": "#/$defs/pngOutput"}, {"properties": {"key": {"const": "preview_02"}}}]},
      "preview03Output": {"allOf": [{"$ref": "#/$defs/pngOutput"}, {"properties": {"key": {"const": "preview_03"}}}]},
      "preview04Output": {"allOf": [{"$ref": "#/$defs/pngOutput"}, {"properties": {"key": {"const": "preview_04"}}}]},
      "preview05Output": {"allOf": [{"$ref": "#/$defs/pngOutput"}, {"properties": {"key": {"const": "preview_05"}}}]},
      "preview06Output": {"allOf": [{"$ref": "#/$defs/pngOutput"}, {"properties": {"key": {"const": "preview_06"}}}]},
      "preview07Output": {"allOf": [{"$ref": "#/$defs/pngOutput"}, {"properties": {"key": {"const": "preview_07"}}}]},
      "preview08Output": {"allOf": [{"$ref": "#/$defs/pngOutput"}, {"properties": {"key": {"const": "preview_08"}}}]},
      "glbOutput": {
        "type": "object", "required": ["key", "type", "format"], "additionalProperties": false,
        "properties": {"key": {"const": "scene_glb"}, "type": {"const": "model"}, "format": {"const": "glb"}}
      }
    }
  }
}
