{
  "name": "agentic-mermaid-hosted",
  "version": "0.4.1",
  "kind": "product",
  "description": "Render, verify, describe, mutate, and build Mermaid diagrams through a stateless Streamable HTTP MCP server.",
  "icon": "https://agentic-mermaid.dev/favicon.svg",
  "url": "https://agentic-mermaid.dev/mcp",
  "serverUrl": "https://agentic-mermaid.dev/mcp",
  "transport": "streamable-http",
  "capabilities": {
    "tools": true,
    "resources": false
  },
  "tools": [
    {
      "name": "execute",
      "title": "Execute Mermaid SDK code",
      "description": "Run JavaScript in an isolated sandbox; return a value. One call composes edits. Submit JavaScript; declaration types are guidance. No promises, async/await, dynamic import, or type annotations. Hosted note: execute runs in an on-demand isolate and costs more than the direct render_svg/render_ascii/render_png/verify/describe tools — prefer those for plain render/verify calls. For straightforward structured edits, prefer the declarative mutate/build tools; reserve execute for logic the ops don't express. Hosted mermaid.renderMermaidSVG*, renderMermaidASCII*, and layoutMermaidWithReceipt calls force security:'strict' and embedFontImport:false; caller code cannot weaken that host policy.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      },
      "parameters": {
        "code": {
          "type": "string",
          "description": "JavaScript to execute; mermaid.* SDK is global.",
          "required": true
        },
        "timeoutMs": {
          "type": "integer",
          "minimum": 1,
          "description": "Optional CPU-time budget (default 5000ms, max 30000ms).",
          "required": false
        }
      }
    },
    {
      "name": "describe_sdk",
      "title": "Describe Mermaid SDK operations",
      "description": "Return version-matched mutation operations for one diagram family. Use detail=signatures for the compact op menu or detail=fields (default) for exact field types, required flags, enum values, defaults, and constraints. Call this before build, mutate, or execute when the family schema is not already known.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "parameters": {
        "family": {
          "type": "string",
          "enum": [
            "flowchart",
            "state",
            "sequence",
            "timeline",
            "class",
            "er",
            "journey",
            "architecture",
            "xychart",
            "pie",
            "quadrant",
            "gantt",
            "mindmap",
            "gitgraph",
            "radar"
          ],
          "description": "Diagram family whose mutation operations are needed.",
          "required": true
        },
        "detail": {
          "type": "string",
          "enum": [
            "signatures",
            "fields"
          ],
          "description": "signatures for a compact menu; fields for the complete schema (default).",
          "required": false
        }
      }
    },
    {
      "name": "render_svg",
      "title": "Render Mermaid as SVG",
      "description": "Render a Mermaid source string to themeable SVG. Returns { ok, svg }. Layout is deterministic: identical input produces identical geometry. The hosted boundary forces security:'strict' and embedFontImport:false.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "parameters": {
        "source": {
          "type": "string",
          "description": "Mermaid source.",
          "required": true
        },
        "options": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "$id": "https://agentic-mermaid.dev/schemas/render-options.schema.json",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "bg": {
              "type": "string",
              "description": "Background color or CSS variable.",
              "default": "#FFFFFF",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "fg": {
              "type": "string",
              "description": "Primary foreground and text color.",
              "default": "#27272A",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "line": {
              "type": "string",
              "description": "Connector and secondary-line color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "accent": {
              "type": "string",
              "description": "Arrowhead, highlight, and data accent color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "muted": {
              "type": "string",
              "description": "Secondary text and label color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "terminal themes have no dedicated muted-text role"
            },
            "surface": {
              "type": "string",
              "description": "Node and group surface color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "terminal cells do not paint graphical surfaces"
            },
            "border": {
              "type": "string",
              "description": "Node and group border color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "font": {
              "type": "string",
              "description": "CSS font family or stack.",
              "default": "Inter",
              "x-agentic-mermaid-runtime-validator": "safeCssFontFamily",
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "the host terminal owns the font face"
            },
            "style": {
              "anyOf": [
                {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Registered Style or Palette name."
                    },
                    {
                      "description": "A partial declarative style record for Agentic Mermaid rendering. All fields, including formatVersion, are optional on input; resolved and registered specs normalize formatVersion to 1.",
                      "type": "object",
                      "additionalProperties": false,
                      "maxProperties": 24,
                      "properties": {
                        "formatVersion": {
                          "const": 1,
                          "description": "Persisted wire-format version. Optional on input and normalized to 1 on output."
                        },
                        "$schema": {
                          "type": "string",
                          "description": "Optional JSON Schema pointer for file-backed styles; ignored while rendering."
                        },
                        "name": {
                          "type": "string",
                          "description": "Canonical look:name or palette:name identity; required only when registering a style."
                        },
                        "blurb": {
                          "type": "string",
                          "description": "Short human-readable description used by discovery surfaces."
                        },
                        "colors": {
                          "type": "object",
                          "additionalProperties": false,
                          "maxProperties": 7,
                          "description": "Partial palette of safe, non-fetching CSS color tokens. Runtime validation applies the stricter safe-color policy.",
                          "properties": {
                            "bg": {
                              "type": "string",
                              "description": "Diagram page background. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "fg": {
                              "type": "string",
                              "description": "Primary text and foreground paint. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "line": {
                              "type": "string",
                              "description": "Connector and secondary line paint. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "accent": {
                              "type": "string",
                              "description": "Accent paint for emphasis and data series. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "muted": {
                              "type": "string",
                              "description": "Muted text and secondary data paint. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "surface": {
                              "type": "string",
                              "description": "Node and group surface fill. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "border": {
                              "type": "string",
                              "description": "Node and group border paint. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            }
                          }
                        },
                        "font": {
                          "type": "string",
                          "description": "Safe, non-fetching CSS font family or stack; the rendering environment supplies the font face.",
                          "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                        },
                        "roles": {
                          "type": "object",
                          "additionalProperties": false,
                          "description": "Partial semantic SceneRole defaults. Family-authored styling remains authoritative.",
                          "properties": {
                            "node": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 11,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "paddingX": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Horizontal role padding."
                                },
                                "paddingY": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Vertical role padding."
                                },
                                "cornerRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable corner radius."
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "edge": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 8,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "bendRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable connector bend radius."
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "group": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 13,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "paddingX": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Horizontal role padding."
                                },
                                "paddingY": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Vertical role padding."
                                },
                                "cornerRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable corner radius."
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "fontFamily": {
                                  "type": "string",
                                  "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                  "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                },
                                "headerFillColor": {
                                  "type": "string",
                                  "description": "Group header surface paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "group-header": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 11,
                              "properties": {
                                "fontFamily": {
                                  "type": "string",
                                  "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                  "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                },
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            },
                            "label": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "actor": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 11,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "paddingX": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Horizontal role padding."
                                },
                                "paddingY": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Vertical role padding."
                                },
                                "cornerRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable corner radius."
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "relationship": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 8,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "bendRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable connector bend radius."
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "pie-slice": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            },
                            "legend": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "bar": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 4,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                }
                              }
                            },
                            "series": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 3,
                              "properties": {
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                }
                              }
                            },
                            "point": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 4,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                }
                              }
                            },
                            "task": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            },
                            "milestone": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            }
                          }
                        },
                        "semanticSlots": {
                          "type": "object",
                          "description": "Named brand-neutral role-style slots selected by semantic bindings.",
                          "maxProperties": 4096,
                          "propertyNames": {
                            "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
                            "not": {
                              "enum": [
                                "__proto__",
                                "constructor",
                                "prototype"
                              ]
                            }
                          },
                          "additionalProperties": {
                            "type": "object",
                            "additionalProperties": false,
                            "maxProperties": 16,
                            "properties": {
                              "fontFamily": {
                                "type": "string",
                                "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                              },
                              "fontSize": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 256,
                                "description": "Font size in SVG user units."
                              },
                              "fontWeight": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 1000,
                                "description": "CSS numeric font weight."
                              },
                              "letterSpacing": {
                                "type": "number",
                                "minimum": -2,
                                "maximum": 4,
                                "description": "Letter spacing in SVG user units."
                              },
                              "textTransform": {
                                "type": "string",
                                "enum": [
                                  "uppercase",
                                  "lowercase",
                                  "capitalize"
                                ],
                                "description": "Text transformation."
                              },
                              "textColor": {
                                "type": "string",
                                "description": "Text paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "paddingX": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 256,
                                "description": "Horizontal role padding."
                              },
                              "paddingY": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 256,
                                "description": "Vertical role padding."
                              },
                              "cornerRadius": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 256,
                                "description": "Applicable corner radius."
                              },
                              "lineWidth": {
                                "type": "number",
                                "exclusiveMinimum": 0,
                                "maximum": 20,
                                "description": "Border or connector width."
                              },
                              "bendRadius": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 256,
                                "description": "Applicable connector bend radius."
                              },
                              "fillColor": {
                                "type": "string",
                                "description": "Surface fill paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "borderColor": {
                                "type": "string",
                                "description": "Border paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "strokeColor": {
                                "type": "string",
                                "description": "Connector stroke paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "headerFillColor": {
                                "type": "string",
                                "description": "Group header surface paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "cue": {
                                "type": "string",
                                "enum": [
                                  "none",
                                  "outline",
                                  "double-line",
                                  "pattern"
                                ],
                                "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                              }
                            }
                          }
                        },
                        "bindings": {
                          "type": "array",
                          "description": "Ordered equality bindings from authored/domain meaning to semantic slots.",
                          "maxItems": 4096,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "maxProperties": 4,
                            "required": [
                              "channel",
                              "value",
                              "slot"
                            ],
                            "properties": {
                              "channel": {
                                "type": "string",
                                "enum": [
                                  "category"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "pattern": "^[^\\r\\n\\u0000]+$"
                              },
                              "slot": {
                                "type": "string",
                                "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
                                "not": {
                                  "enum": [
                                    "__proto__",
                                    "constructor",
                                    "prototype"
                                  ]
                                }
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "group-header",
                                  "actor",
                                  "relationship",
                                  "pie-slice",
                                  "legend",
                                  "bar",
                                  "series",
                                  "point",
                                  "task",
                                  "milestone"
                                ]
                              }
                            }
                          }
                        },
                        "constraints": {
                          "type": "array",
                          "description": "Closed inspect-only brand constraints with warn or error actions.",
                          "maxItems": 4096,
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "action"
                                ],
                                "properties": {
                                  "kind": {
                                    "const": "contrast"
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "warn",
                                      "error"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "node",
                                      "edge",
                                      "edge-label",
                                      "group",
                                      "group-header",
                                      "label",
                                      "actor",
                                      "lifeline",
                                      "activation",
                                      "message",
                                      "block",
                                      "note",
                                      "class-box",
                                      "member",
                                      "entity",
                                      "attribute",
                                      "relationship",
                                      "cardinality",
                                      "pie-slice",
                                      "legend",
                                      "bar",
                                      "series",
                                      "point",
                                      "axis",
                                      "grid",
                                      "plate",
                                      "section",
                                      "task",
                                      "milestone",
                                      "marker-line",
                                      "rail",
                                      "period",
                                      "event",
                                      "score",
                                      "actor-pill",
                                      "service",
                                      "junction",
                                      "icon",
                                      "title",
                                      "defs",
                                      "prelude",
                                      "chrome"
                                    ]
                                  },
                                  "minimum": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 21
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "action",
                                  "maxFraction"
                                ],
                                "properties": {
                                  "kind": {
                                    "const": "accent-area"
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "warn",
                                      "error"
                                    ]
                                  },
                                  "maxFraction": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "action",
                                  "role"
                                ],
                                "properties": {
                                  "kind": {
                                    "const": "mono-role"
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "warn",
                                      "error"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "node",
                                      "edge",
                                      "edge-label",
                                      "group",
                                      "group-header",
                                      "label",
                                      "actor",
                                      "lifeline",
                                      "activation",
                                      "message",
                                      "block",
                                      "note",
                                      "class-box",
                                      "member",
                                      "entity",
                                      "attribute",
                                      "relationship",
                                      "cardinality",
                                      "pie-slice",
                                      "legend",
                                      "bar",
                                      "series",
                                      "point",
                                      "axis",
                                      "grid",
                                      "plate",
                                      "section",
                                      "task",
                                      "milestone",
                                      "marker-line",
                                      "rail",
                                      "period",
                                      "event",
                                      "score",
                                      "actor-pill",
                                      "service",
                                      "junction",
                                      "icon",
                                      "title",
                                      "defs",
                                      "prelude",
                                      "chrome"
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        },
                        "stroke": {
                          "type": "string",
                          "enum": [
                            "crisp",
                            "jittered",
                            "freehand"
                          ],
                          "description": "Stroke treatment; crisp is the default renderer."
                        },
                        "roughness": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10,
                          "description": "Rough.js stroke irregularity."
                        },
                        "bowing": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10,
                          "description": "Rough.js line bowing."
                        },
                        "passes": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 8,
                          "description": "Number of sketch strokes; 1 is single-pass and 2 is the usual double stroke."
                        },
                        "strokeWidth": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 20,
                          "description": "Base stroke width in SVG user units."
                        },
                        "fill": {
                          "type": "string",
                          "enum": [
                            "none",
                            "hachure",
                            "solid",
                            "wash"
                          ],
                          "description": "Fill policy for rough/hybrid rendering; none and solid require a final stack that activates one of those backends."
                        },
                        "hachureAngle": {
                          "type": "number",
                          "minimum": -360,
                          "maximum": 360,
                          "description": "Hachure line angle in degrees; requires fill hachure in the final stack."
                        },
                        "hachureGap": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 100,
                          "description": "Gap between hachure lines; requires fill hachure in the final stack."
                        },
                        "fillWeight": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 20,
                          "description": "Hachure line weight; requires fill hachure in the final stack."
                        },
                        "washOpacity": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1,
                          "description": "Watercolor glaze opacity; requires fill wash in the final stack."
                        },
                        "washEdge": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1,
                          "description": "Watercolor edge-darkening opacity; requires fill wash in the final stack."
                        },
                        "backdrop": {
                          "type": "string",
                          "enum": [
                            "plain",
                            "paper-ruled",
                            "grid"
                          ],
                          "description": "Flat page furniture drawn behind the diagram."
                        },
                        "intent": {
                          "type": "string",
                          "enum": [
                            "premium",
                            "draft",
                            "lofi"
                          ],
                          "description": "Advisory intent metadata for pickers and quality tooling."
                        },
                        "mono": {
                          "type": "boolean",
                          "description": "Advisory monochrome contract: express tone through shading and weight."
                        }
                      }
                    }
                  ],
                  "x-agentic-mermaid-validation-expectation": "a registered Style name or StyleSpec"
                },
                {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Registered Style or Palette name."
                      },
                      {
                        "description": "A partial declarative style record for Agentic Mermaid rendering. All fields, including formatVersion, are optional on input; resolved and registered specs normalize formatVersion to 1.",
                        "type": "object",
                        "additionalProperties": false,
                        "maxProperties": 24,
                        "properties": {
                          "formatVersion": {
                            "const": 1,
                            "description": "Persisted wire-format version. Optional on input and normalized to 1 on output."
                          },
                          "$schema": {
                            "type": "string",
                            "description": "Optional JSON Schema pointer for file-backed styles; ignored while rendering."
                          },
                          "name": {
                            "type": "string",
                            "description": "Canonical look:name or palette:name identity; required only when registering a style."
                          },
                          "blurb": {
                            "type": "string",
                            "description": "Short human-readable description used by discovery surfaces."
                          },
                          "colors": {
                            "type": "object",
                            "additionalProperties": false,
                            "maxProperties": 7,
                            "description": "Partial palette of safe, non-fetching CSS color tokens. Runtime validation applies the stricter safe-color policy.",
                            "properties": {
                              "bg": {
                                "type": "string",
                                "description": "Diagram page background. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "fg": {
                                "type": "string",
                                "description": "Primary text and foreground paint. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "line": {
                                "type": "string",
                                "description": "Connector and secondary line paint. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "accent": {
                                "type": "string",
                                "description": "Accent paint for emphasis and data series. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "muted": {
                                "type": "string",
                                "description": "Muted text and secondary data paint. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "surface": {
                                "type": "string",
                                "description": "Node and group surface fill. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "border": {
                                "type": "string",
                                "description": "Node and group border paint. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              }
                            }
                          },
                          "font": {
                            "type": "string",
                            "description": "Safe, non-fetching CSS font family or stack; the rendering environment supplies the font face.",
                            "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                          },
                          "roles": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "Partial semantic SceneRole defaults. Family-authored styling remains authoritative.",
                            "properties": {
                              "node": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 11,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "paddingX": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Horizontal role padding."
                                  },
                                  "paddingY": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Vertical role padding."
                                  },
                                  "cornerRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable corner radius."
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "edge": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 8,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "bendRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable connector bend radius."
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "group": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 13,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "paddingX": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Horizontal role padding."
                                  },
                                  "paddingY": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Vertical role padding."
                                  },
                                  "cornerRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable corner radius."
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "fontFamily": {
                                    "type": "string",
                                    "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                    "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                  },
                                  "headerFillColor": {
                                    "type": "string",
                                    "description": "Group header surface paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "group-header": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 11,
                                "properties": {
                                  "fontFamily": {
                                    "type": "string",
                                    "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                    "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                  },
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "cue": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "outline",
                                      "double-line",
                                      "pattern"
                                    ],
                                    "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                  }
                                }
                              },
                              "label": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "actor": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 11,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "paddingX": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Horizontal role padding."
                                  },
                                  "paddingY": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Vertical role padding."
                                  },
                                  "cornerRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable corner radius."
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "relationship": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 8,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "bendRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable connector bend radius."
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "pie-slice": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "cue": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "outline",
                                      "double-line",
                                      "pattern"
                                    ],
                                    "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                  }
                                }
                              },
                              "legend": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "bar": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 4,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  }
                                }
                              },
                              "series": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 3,
                                "properties": {
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  }
                                }
                              },
                              "point": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 4,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  }
                                }
                              },
                              "task": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "cue": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "outline",
                                      "double-line",
                                      "pattern"
                                    ],
                                    "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                  }
                                }
                              },
                              "milestone": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "cue": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "outline",
                                      "double-line",
                                      "pattern"
                                    ],
                                    "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                  }
                                }
                              }
                            }
                          },
                          "semanticSlots": {
                            "type": "object",
                            "description": "Named brand-neutral role-style slots selected by semantic bindings.",
                            "maxProperties": 4096,
                            "propertyNames": {
                              "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
                              "not": {
                                "enum": [
                                  "__proto__",
                                  "constructor",
                                  "prototype"
                                ]
                              }
                            },
                            "additionalProperties": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 16,
                              "properties": {
                                "fontFamily": {
                                  "type": "string",
                                  "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                  "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                },
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "paddingX": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Horizontal role padding."
                                },
                                "paddingY": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Vertical role padding."
                                },
                                "cornerRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable corner radius."
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "bendRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable connector bend radius."
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "headerFillColor": {
                                  "type": "string",
                                  "description": "Group header surface paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            }
                          },
                          "bindings": {
                            "type": "array",
                            "description": "Ordered equality bindings from authored/domain meaning to semantic slots.",
                            "maxItems": 4096,
                            "items": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 4,
                              "required": [
                                "channel",
                                "value",
                                "slot"
                              ],
                              "properties": {
                                "channel": {
                                  "type": "string",
                                  "enum": [
                                    "category"
                                  ]
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256,
                                  "pattern": "^[^\\r\\n\\u0000]+$"
                                },
                                "slot": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
                                  "not": {
                                    "enum": [
                                      "__proto__",
                                      "constructor",
                                      "prototype"
                                    ]
                                  }
                                },
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "group-header",
                                    "actor",
                                    "relationship",
                                    "pie-slice",
                                    "legend",
                                    "bar",
                                    "series",
                                    "point",
                                    "task",
                                    "milestone"
                                  ]
                                }
                              }
                            }
                          },
                          "constraints": {
                            "type": "array",
                            "description": "Closed inspect-only brand constraints with warn or error actions.",
                            "maxItems": 4096,
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "kind",
                                    "action"
                                  ],
                                  "properties": {
                                    "kind": {
                                      "const": "contrast"
                                    },
                                    "action": {
                                      "type": "string",
                                      "enum": [
                                        "warn",
                                        "error"
                                      ]
                                    },
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "node",
                                        "edge",
                                        "edge-label",
                                        "group",
                                        "group-header",
                                        "label",
                                        "actor",
                                        "lifeline",
                                        "activation",
                                        "message",
                                        "block",
                                        "note",
                                        "class-box",
                                        "member",
                                        "entity",
                                        "attribute",
                                        "relationship",
                                        "cardinality",
                                        "pie-slice",
                                        "legend",
                                        "bar",
                                        "series",
                                        "point",
                                        "axis",
                                        "grid",
                                        "plate",
                                        "section",
                                        "task",
                                        "milestone",
                                        "marker-line",
                                        "rail",
                                        "period",
                                        "event",
                                        "score",
                                        "actor-pill",
                                        "service",
                                        "junction",
                                        "icon",
                                        "title",
                                        "defs",
                                        "prelude",
                                        "chrome"
                                      ]
                                    },
                                    "minimum": {
                                      "type": "number",
                                      "minimum": 1,
                                      "maximum": 21
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "kind",
                                    "action",
                                    "maxFraction"
                                  ],
                                  "properties": {
                                    "kind": {
                                      "const": "accent-area"
                                    },
                                    "action": {
                                      "type": "string",
                                      "enum": [
                                        "warn",
                                        "error"
                                      ]
                                    },
                                    "maxFraction": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "kind",
                                    "action",
                                    "role"
                                  ],
                                  "properties": {
                                    "kind": {
                                      "const": "mono-role"
                                    },
                                    "action": {
                                      "type": "string",
                                      "enum": [
                                        "warn",
                                        "error"
                                      ]
                                    },
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "node",
                                        "edge",
                                        "edge-label",
                                        "group",
                                        "group-header",
                                        "label",
                                        "actor",
                                        "lifeline",
                                        "activation",
                                        "message",
                                        "block",
                                        "note",
                                        "class-box",
                                        "member",
                                        "entity",
                                        "attribute",
                                        "relationship",
                                        "cardinality",
                                        "pie-slice",
                                        "legend",
                                        "bar",
                                        "series",
                                        "point",
                                        "axis",
                                        "grid",
                                        "plate",
                                        "section",
                                        "task",
                                        "milestone",
                                        "marker-line",
                                        "rail",
                                        "period",
                                        "event",
                                        "score",
                                        "actor-pill",
                                        "service",
                                        "junction",
                                        "icon",
                                        "title",
                                        "defs",
                                        "prelude",
                                        "chrome"
                                      ]
                                    }
                                  }
                                }
                              ]
                            }
                          },
                          "stroke": {
                            "type": "string",
                            "enum": [
                              "crisp",
                              "jittered",
                              "freehand"
                            ],
                            "description": "Stroke treatment; crisp is the default renderer."
                          },
                          "roughness": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 10,
                            "description": "Rough.js stroke irregularity."
                          },
                          "bowing": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 10,
                            "description": "Rough.js line bowing."
                          },
                          "passes": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 8,
                            "description": "Number of sketch strokes; 1 is single-pass and 2 is the usual double stroke."
                          },
                          "strokeWidth": {
                            "type": "number",
                            "exclusiveMinimum": 0,
                            "maximum": 20,
                            "description": "Base stroke width in SVG user units."
                          },
                          "fill": {
                            "type": "string",
                            "enum": [
                              "none",
                              "hachure",
                              "solid",
                              "wash"
                            ],
                            "description": "Fill policy for rough/hybrid rendering; none and solid require a final stack that activates one of those backends."
                          },
                          "hachureAngle": {
                            "type": "number",
                            "minimum": -360,
                            "maximum": 360,
                            "description": "Hachure line angle in degrees; requires fill hachure in the final stack."
                          },
                          "hachureGap": {
                            "type": "number",
                            "exclusiveMinimum": 0,
                            "maximum": 100,
                            "description": "Gap between hachure lines; requires fill hachure in the final stack."
                          },
                          "fillWeight": {
                            "type": "number",
                            "exclusiveMinimum": 0,
                            "maximum": 20,
                            "description": "Hachure line weight; requires fill hachure in the final stack."
                          },
                          "washOpacity": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1,
                            "description": "Watercolor glaze opacity; requires fill wash in the final stack."
                          },
                          "washEdge": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1,
                            "description": "Watercolor edge-darkening opacity; requires fill wash in the final stack."
                          },
                          "backdrop": {
                            "type": "string",
                            "enum": [
                              "plain",
                              "paper-ruled",
                              "grid"
                            ],
                            "description": "Flat page furniture drawn behind the diagram."
                          },
                          "intent": {
                            "type": "string",
                            "enum": [
                              "premium",
                              "draft",
                              "lofi"
                            ],
                            "description": "Advisory intent metadata for pickers and quality tooling."
                          },
                          "mono": {
                            "type": "boolean",
                            "description": "Advisory monochrome contract: express tone through shading and weight."
                          }
                        }
                      }
                    ],
                    "x-agentic-mermaid-validation-expectation": "a registered Style name or StyleSpec"
                  },
                  "description": "Style stack merged from left to right."
                }
              ],
              "description": "A registered name, inline StyleSpec, or left-to-right stack of either.",
              "x-agentic-mermaid-runtime-validator": "styleInput",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "padding": {
              "type": "number",
              "description": "Canvas padding in SVG user units.",
              "default": 40,
              "minimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output uses paddingX, paddingY, and boxBorderPadding",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart",
                "state",
                "architecture"
              ]
            },
            "nodeSpacing": {
              "type": "number",
              "description": "Horizontal spacing between sibling nodes.",
              "default": 24,
              "minimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal layout has a cell-grid spacing contract",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart",
                "state",
                "class",
                "er",
                "architecture"
              ]
            },
            "layerSpacing": {
              "type": "number",
              "description": "Vertical spacing between graph layers.",
              "default": 40,
              "minimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal layout has a cell-grid spacing contract",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart",
                "state",
                "class",
                "er",
                "architecture"
              ]
            },
            "wrappingWidth": {
              "type": "number",
              "description": "Flowchart measured-label wrapping budget in pixels.",
              "exclusiveMinimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output uses maxWidth or targetWidth",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart"
              ]
            },
            "componentSpacing": {
              "type": "number",
              "description": "Spacing between disconnected graph components for compatible extension families; no built-in family currently consumes it.",
              "minimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal layout has a cell-grid spacing contract",
              "x-agentic-mermaid-applicable-builtin-families": []
            },
            "transparent": {
              "type": "boolean",
              "description": "Omit the painted SVG canvas background.",
              "default": false,
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "terminal output has no painted canvas background"
            },
            "interactive": {
              "type": "boolean",
              "description": "Enable hover tooltips for supported chart data points.",
              "default": false,
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "terminal output is a static semantic projection",
              "x-agentic-mermaid-applicable-builtin-families": [
                "xychart",
                "pie",
                "quadrant"
              ]
            },
            "shadow": {
              "type": "boolean",
              "description": "Paint explicit drop shadows on node shapes.",
              "default": false,
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "elevation projects to borders and labels",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart",
                "state",
                "sequence",
                "timeline",
                "class",
                "er",
                "journey",
                "xychart",
                "pie",
                "quadrant",
                "gantt",
                "mindmap",
                "gitgraph"
              ]
            },
            "class": {
              "type": "object",
              "description": "Class-diagram rendering controls.",
              "additionalProperties": false,
              "properties": {
                "hierarchicalNamespaces": {
                  "type": "boolean",
                  "description": "Nest namespace compounds.",
                  "default": true
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "this option configures graphical class layout",
              "x-agentic-mermaid-applicable-builtin-families": [
                "class"
              ]
            },
            "architecture": {
              "type": "object",
              "description": "Architecture renderer visual metric and paint overrides.",
              "additionalProperties": false,
              "properties": {
                "visual": {
                  "type": "object",
                  "description": "Sparse architecture visual overrides merged over resolved defaults.",
                  "additionalProperties": false,
                  "properties": {
                    "groupHeaderHeight": {
                      "type": "number",
                      "description": "Architecture group-header height.",
                      "exclusiveMinimum": 0
                    },
                    "groupFontSize": {
                      "type": "number",
                      "description": "Architecture group-label font size.",
                      "exclusiveMinimum": 0
                    },
                    "groupFontWeight": {
                      "type": "number",
                      "description": "Architecture group-label font weight.",
                      "minimum": 1,
                      "maximum": 1000
                    },
                    "groupLetterSpacing": {
                      "type": "number",
                      "description": "Architecture group-label letter spacing."
                    },
                    "groupFont": {
                      "type": "string",
                      "description": "Architecture group-label font family.",
                      "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                    },
                    "groupTextTransform": {
                      "type": "string",
                      "enum": [
                        "uppercase",
                        "lowercase",
                        "capitalize"
                      ],
                      "description": "Architecture group-label text transform."
                    },
                    "groupPaddingX": {
                      "type": "number",
                      "description": "Horizontal padding inside architecture groups.",
                      "minimum": 0
                    },
                    "groupPaddingY": {
                      "type": "number",
                      "description": "Vertical padding inside architecture groups.",
                      "minimum": 0
                    },
                    "groupLabelPaddingX": {
                      "type": "number",
                      "description": "Horizontal padding around architecture group labels.",
                      "minimum": 0
                    },
                    "groupCornerRadius": {
                      "type": "number",
                      "description": "Architecture group corner radius.",
                      "minimum": 0
                    },
                    "groupLineWidth": {
                      "type": "number",
                      "description": "Architecture group border width.",
                      "minimum": 0
                    },
                    "groupText": {
                      "type": "string",
                      "description": "Architecture group-label color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "serviceFontSize": {
                      "type": "number",
                      "description": "Architecture service-label font size.",
                      "exclusiveMinimum": 0
                    },
                    "serviceFontWeight": {
                      "type": "number",
                      "description": "Architecture service-label font weight.",
                      "minimum": 1,
                      "maximum": 1000
                    },
                    "serviceLetterSpacing": {
                      "type": "number",
                      "description": "Architecture service-label letter spacing."
                    },
                    "serviceTextTransform": {
                      "type": "string",
                      "enum": [
                        "uppercase",
                        "lowercase",
                        "capitalize"
                      ],
                      "description": "Architecture service-label text transform."
                    },
                    "servicePaddingX": {
                      "type": "number",
                      "description": "Horizontal padding inside architecture services.",
                      "minimum": 0
                    },
                    "servicePaddingY": {
                      "type": "number",
                      "description": "Vertical padding inside architecture services.",
                      "minimum": 0
                    },
                    "serviceCornerRadius": {
                      "type": "number",
                      "description": "Architecture service corner radius.",
                      "minimum": 0
                    },
                    "serviceLineWidth": {
                      "type": "number",
                      "description": "Architecture service border width.",
                      "minimum": 0
                    },
                    "serviceText": {
                      "type": "string",
                      "description": "Architecture service-label color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "edgeFontSize": {
                      "type": "number",
                      "description": "Architecture connector-label font size.",
                      "exclusiveMinimum": 0
                    },
                    "edgeFontWeight": {
                      "type": "number",
                      "description": "Architecture connector-label font weight.",
                      "minimum": 1,
                      "maximum": 1000
                    },
                    "edgeLetterSpacing": {
                      "type": "number",
                      "description": "Architecture connector-label letter spacing."
                    },
                    "edgeTextTransform": {
                      "type": "string",
                      "enum": [
                        "uppercase",
                        "lowercase",
                        "capitalize"
                      ],
                      "description": "Architecture connector-label text transform."
                    },
                    "edgeLineWidth": {
                      "type": "number",
                      "description": "Architecture connector width.",
                      "minimum": 0
                    },
                    "edgeBendRadius": {
                      "type": "number",
                      "description": "Architecture connector bend radius.",
                      "minimum": 0
                    },
                    "edgeStroke": {
                      "type": "string",
                      "description": "Architecture connector color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "edgeText": {
                      "type": "string",
                      "description": "Architecture connector-label color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "iconSize": {
                      "type": "number",
                      "description": "Architecture group icon size.",
                      "exclusiveMinimum": 0
                    },
                    "serviceIconSize": {
                      "type": "number",
                      "description": "Architecture service icon size.",
                      "exclusiveMinimum": 0
                    },
                    "junctionOuterRadius": {
                      "type": "number",
                      "description": "Architecture junction outer radius.",
                      "exclusiveMinimum": 0
                    },
                    "junctionInnerRadius": {
                      "type": "number",
                      "description": "Architecture junction inner radius.",
                      "minimum": 0
                    },
                    "groupSurface": {
                      "type": "string",
                      "description": "Architecture group surface color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "groupHeaderSurface": {
                      "type": "string",
                      "description": "Architecture group-header surface color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "groupBorder": {
                      "type": "string",
                      "description": "Architecture group border color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "serviceSurface": {
                      "type": "string",
                      "description": "Architecture service surface color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "serviceBorder": {
                      "type": "string",
                      "description": "Architecture service border color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    }
                  },
                  "x-agentic-mermaid-runtime-validator": "architectureVisual"
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "this option configures graphical architecture rendering",
              "x-agentic-mermaid-applicable-builtin-families": [
                "architecture"
              ]
            },
            "timeline": {
              "type": "object",
              "description": "Timeline layout controls.",
              "additionalProperties": false,
              "properties": {
                "maxWidth": {
                  "type": "number",
                  "description": "Best-effort width budget for horizontal timelines.",
                  "exclusiveMinimum": 0
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output uses maxWidth or targetWidth",
              "x-agentic-mermaid-applicable-builtin-families": [
                "timeline"
              ]
            },
            "journey": {
              "type": "object",
              "description": "User-journey graphical controls.",
              "additionalProperties": false,
              "properties": {
                "experienceCurve": {
                  "type": "boolean",
                  "description": "Connect journey score markers with an experience curve.",
                  "default": true
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "experience curves are graphical-only",
              "x-agentic-mermaid-applicable-builtin-families": [
                "journey"
              ]
            },
            "gantt": {
              "type": "object",
              "description": "Gantt dependency and critical-path overlays.",
              "additionalProperties": false,
              "properties": {
                "dependencyArrows": {
                  "type": "boolean",
                  "description": "Draw scheduled dependency connectors.",
                  "default": false
                },
                "criticalPath": {
                  "type": "boolean",
                  "description": "Emphasize critical-path tasks and connectors.",
                  "default": false
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "graphical Gantt connector emphasis is not represented in cells",
              "x-agentic-mermaid-applicable-builtin-families": [
                "gantt"
              ]
            },
            "mermaidConfig": {
              "type": "object",
              "description": "Mermaid-style recursive runtime configuration.",
              "additionalProperties": {
                "$ref": "#/$defs/jsonValue"
              },
              "x-agentic-mermaid-terminal": "consumed"
            },
            "embedFontImport": {
              "type": "boolean",
              "description": "Embed the Google Fonts import in SVG styles; PNG forces this off for offline rasterization.",
              "default": false,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output embeds no web-font import"
            },
            "compact": {
              "type": "boolean",
              "description": "Compact SVG serialization while preserving agent hooks.",
              "default": false,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "compact controls SVG serialization"
            },
            "idPrefix": {
              "type": "string",
              "description": "Non-empty namespace for generated SVG definition IDs and local references.",
              "pattern": "^[A-Za-z0-9_.:-]+$",
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output has no SVG definition ids"
            },
            "security": {
              "type": "string",
              "enum": [
                "default",
                "strict"
              ],
              "description": "Active SVG content is rejected in every mode; strict additionally rejects every external reference. Raw Mermaid themeCSS is rejected in both modes.",
              "default": "default",
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal text has its own control-character and HTML-color safety projection"
            },
            "ganttToday": {
              "type": "string",
              "description": "Explicit deterministic date for the Gantt today marker.",
              "x-agentic-mermaid-terminal": "consumed",
              "x-agentic-mermaid-applicable-builtin-families": [
                "gantt"
              ]
            },
            "seed": {
              "type": "number",
              "description": "Deterministic re-roll seed for stochastic Styles.",
              "default": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal glyph geometry is deterministic and has no stochastic ink"
            }
          },
          "$defs": {
            "jsonValue": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/jsonValue"
                  }
                },
                {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/$defs/jsonValue"
                  }
                }
              ],
              "description": "A finite, acyclic JSON value without prototype keys.",
              "x-agentic-mermaid-validation-expectation": "a finite, acyclic JSON value without prototype keys"
            }
          },
          "description": "Shared advanced RenderOptions object. Styles accept a registered Look (crisp, hand-drawn, excalidraw, pen-and-ink, freehand, watercolor, blueprint, look:tufte, accessible-high-contrast, patent-drawing, status-dashboard, ops-schematic, chalkboard, risograph, architectural-plan, publication-figure), Palette (paper, dusk, zinc-light, zinc-dark, tokyo-night, tokyo-night-storm, tokyo-night-light, catppuccin-mocha, catppuccin-latte, nord, nord-light, dracula, github-light, github-dark, solarized-light, solarized-dark, one-dark, salmon, salmon-dark, tufte-dark), inline record, or left-to-right stack.",
          "required": false
        }
      }
    },
    {
      "name": "render_ascii",
      "title": "Render Mermaid as text",
      "description": "Render a Mermaid source string to text. Returns { ok, text }. useAscii true → plain ASCII (+,-,|); false/absent → Unicode box drawing (┌,─,│). targetWidth sets a hard terminal display-cell bound; impossible bounds return a typed error.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "parameters": {
        "source": {
          "type": "string",
          "description": "Mermaid source.",
          "required": true
        },
        "useAscii": {
          "type": "boolean",
          "description": "true = ASCII characters, false = Unicode (default).",
          "required": false
        },
        "targetWidth": {
          "type": "integer",
          "minimum": 1,
          "description": "Hard maximum line width in terminal display cells.",
          "required": false
        },
        "options": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "$id": "https://agentic-mermaid.dev/schemas/render-options.schema.json",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "bg": {
              "type": "string",
              "description": "Background color or CSS variable.",
              "default": "#FFFFFF",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "fg": {
              "type": "string",
              "description": "Primary foreground and text color.",
              "default": "#27272A",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "line": {
              "type": "string",
              "description": "Connector and secondary-line color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "accent": {
              "type": "string",
              "description": "Arrowhead, highlight, and data accent color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "muted": {
              "type": "string",
              "description": "Secondary text and label color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "terminal themes have no dedicated muted-text role"
            },
            "surface": {
              "type": "string",
              "description": "Node and group surface color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "terminal cells do not paint graphical surfaces"
            },
            "border": {
              "type": "string",
              "description": "Node and group border color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "font": {
              "type": "string",
              "description": "CSS font family or stack.",
              "default": "Inter",
              "x-agentic-mermaid-runtime-validator": "safeCssFontFamily",
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "the host terminal owns the font face"
            },
            "style": {
              "anyOf": [
                {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Registered Style or Palette name."
                    },
                    {
                      "description": "A partial declarative style record for Agentic Mermaid rendering. All fields, including formatVersion, are optional on input; resolved and registered specs normalize formatVersion to 1.",
                      "type": "object",
                      "additionalProperties": false,
                      "maxProperties": 24,
                      "properties": {
                        "formatVersion": {
                          "const": 1,
                          "description": "Persisted wire-format version. Optional on input and normalized to 1 on output."
                        },
                        "$schema": {
                          "type": "string",
                          "description": "Optional JSON Schema pointer for file-backed styles; ignored while rendering."
                        },
                        "name": {
                          "type": "string",
                          "description": "Canonical look:name or palette:name identity; required only when registering a style."
                        },
                        "blurb": {
                          "type": "string",
                          "description": "Short human-readable description used by discovery surfaces."
                        },
                        "colors": {
                          "type": "object",
                          "additionalProperties": false,
                          "maxProperties": 7,
                          "description": "Partial palette of safe, non-fetching CSS color tokens. Runtime validation applies the stricter safe-color policy.",
                          "properties": {
                            "bg": {
                              "type": "string",
                              "description": "Diagram page background. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "fg": {
                              "type": "string",
                              "description": "Primary text and foreground paint. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "line": {
                              "type": "string",
                              "description": "Connector and secondary line paint. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "accent": {
                              "type": "string",
                              "description": "Accent paint for emphasis and data series. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "muted": {
                              "type": "string",
                              "description": "Muted text and secondary data paint. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "surface": {
                              "type": "string",
                              "description": "Node and group surface fill. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "border": {
                              "type": "string",
                              "description": "Node and group border paint. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            }
                          }
                        },
                        "font": {
                          "type": "string",
                          "description": "Safe, non-fetching CSS font family or stack; the rendering environment supplies the font face.",
                          "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                        },
                        "roles": {
                          "type": "object",
                          "additionalProperties": false,
                          "description": "Partial semantic SceneRole defaults. Family-authored styling remains authoritative.",
                          "properties": {
                            "node": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 11,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "paddingX": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Horizontal role padding."
                                },
                                "paddingY": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Vertical role padding."
                                },
                                "cornerRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable corner radius."
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "edge": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 8,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "bendRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable connector bend radius."
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "group": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 13,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "paddingX": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Horizontal role padding."
                                },
                                "paddingY": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Vertical role padding."
                                },
                                "cornerRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable corner radius."
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "fontFamily": {
                                  "type": "string",
                                  "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                  "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                },
                                "headerFillColor": {
                                  "type": "string",
                                  "description": "Group header surface paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "group-header": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 11,
                              "properties": {
                                "fontFamily": {
                                  "type": "string",
                                  "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                  "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                },
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            },
                            "label": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "actor": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 11,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "paddingX": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Horizontal role padding."
                                },
                                "paddingY": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Vertical role padding."
                                },
                                "cornerRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable corner radius."
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "relationship": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 8,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "bendRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable connector bend radius."
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "pie-slice": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            },
                            "legend": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "bar": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 4,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                }
                              }
                            },
                            "series": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 3,
                              "properties": {
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                }
                              }
                            },
                            "point": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 4,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                }
                              }
                            },
                            "task": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            },
                            "milestone": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            }
                          }
                        },
                        "semanticSlots": {
                          "type": "object",
                          "description": "Named brand-neutral role-style slots selected by semantic bindings.",
                          "maxProperties": 4096,
                          "propertyNames": {
                            "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
                            "not": {
                              "enum": [
                                "__proto__",
                                "constructor",
                                "prototype"
                              ]
                            }
                          },
                          "additionalProperties": {
                            "type": "object",
                            "additionalProperties": false,
                            "maxProperties": 16,
                            "properties": {
                              "fontFamily": {
                                "type": "string",
                                "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                              },
                              "fontSize": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 256,
                                "description": "Font size in SVG user units."
                              },
                              "fontWeight": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 1000,
                                "description": "CSS numeric font weight."
                              },
                              "letterSpacing": {
                                "type": "number",
                                "minimum": -2,
                                "maximum": 4,
                                "description": "Letter spacing in SVG user units."
                              },
                              "textTransform": {
                                "type": "string",
                                "enum": [
                                  "uppercase",
                                  "lowercase",
                                  "capitalize"
                                ],
                                "description": "Text transformation."
                              },
                              "textColor": {
                                "type": "string",
                                "description": "Text paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "paddingX": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 256,
                                "description": "Horizontal role padding."
                              },
                              "paddingY": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 256,
                                "description": "Vertical role padding."
                              },
                              "cornerRadius": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 256,
                                "description": "Applicable corner radius."
                              },
                              "lineWidth": {
                                "type": "number",
                                "exclusiveMinimum": 0,
                                "maximum": 20,
                                "description": "Border or connector width."
                              },
                              "bendRadius": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 256,
                                "description": "Applicable connector bend radius."
                              },
                              "fillColor": {
                                "type": "string",
                                "description": "Surface fill paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "borderColor": {
                                "type": "string",
                                "description": "Border paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "strokeColor": {
                                "type": "string",
                                "description": "Connector stroke paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "headerFillColor": {
                                "type": "string",
                                "description": "Group header surface paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "cue": {
                                "type": "string",
                                "enum": [
                                  "none",
                                  "outline",
                                  "double-line",
                                  "pattern"
                                ],
                                "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                              }
                            }
                          }
                        },
                        "bindings": {
                          "type": "array",
                          "description": "Ordered equality bindings from authored/domain meaning to semantic slots.",
                          "maxItems": 4096,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "maxProperties": 4,
                            "required": [
                              "channel",
                              "value",
                              "slot"
                            ],
                            "properties": {
                              "channel": {
                                "type": "string",
                                "enum": [
                                  "category"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "pattern": "^[^\\r\\n\\u0000]+$"
                              },
                              "slot": {
                                "type": "string",
                                "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
                                "not": {
                                  "enum": [
                                    "__proto__",
                                    "constructor",
                                    "prototype"
                                  ]
                                }
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "group-header",
                                  "actor",
                                  "relationship",
                                  "pie-slice",
                                  "legend",
                                  "bar",
                                  "series",
                                  "point",
                                  "task",
                                  "milestone"
                                ]
                              }
                            }
                          }
                        },
                        "constraints": {
                          "type": "array",
                          "description": "Closed inspect-only brand constraints with warn or error actions.",
                          "maxItems": 4096,
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "action"
                                ],
                                "properties": {
                                  "kind": {
                                    "const": "contrast"
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "warn",
                                      "error"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "node",
                                      "edge",
                                      "edge-label",
                                      "group",
                                      "group-header",
                                      "label",
                                      "actor",
                                      "lifeline",
                                      "activation",
                                      "message",
                                      "block",
                                      "note",
                                      "class-box",
                                      "member",
                                      "entity",
                                      "attribute",
                                      "relationship",
                                      "cardinality",
                                      "pie-slice",
                                      "legend",
                                      "bar",
                                      "series",
                                      "point",
                                      "axis",
                                      "grid",
                                      "plate",
                                      "section",
                                      "task",
                                      "milestone",
                                      "marker-line",
                                      "rail",
                                      "period",
                                      "event",
                                      "score",
                                      "actor-pill",
                                      "service",
                                      "junction",
                                      "icon",
                                      "title",
                                      "defs",
                                      "prelude",
                                      "chrome"
                                    ]
                                  },
                                  "minimum": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 21
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "action",
                                  "maxFraction"
                                ],
                                "properties": {
                                  "kind": {
                                    "const": "accent-area"
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "warn",
                                      "error"
                                    ]
                                  },
                                  "maxFraction": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "action",
                                  "role"
                                ],
                                "properties": {
                                  "kind": {
                                    "const": "mono-role"
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "warn",
                                      "error"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "node",
                                      "edge",
                                      "edge-label",
                                      "group",
                                      "group-header",
                                      "label",
                                      "actor",
                                      "lifeline",
                                      "activation",
                                      "message",
                                      "block",
                                      "note",
                                      "class-box",
                                      "member",
                                      "entity",
                                      "attribute",
                                      "relationship",
                                      "cardinality",
                                      "pie-slice",
                                      "legend",
                                      "bar",
                                      "series",
                                      "point",
                                      "axis",
                                      "grid",
                                      "plate",
                                      "section",
                                      "task",
                                      "milestone",
                                      "marker-line",
                                      "rail",
                                      "period",
                                      "event",
                                      "score",
                                      "actor-pill",
                                      "service",
                                      "junction",
                                      "icon",
                                      "title",
                                      "defs",
                                      "prelude",
                                      "chrome"
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        },
                        "stroke": {
                          "type": "string",
                          "enum": [
                            "crisp",
                            "jittered",
                            "freehand"
                          ],
                          "description": "Stroke treatment; crisp is the default renderer."
                        },
                        "roughness": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10,
                          "description": "Rough.js stroke irregularity."
                        },
                        "bowing": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10,
                          "description": "Rough.js line bowing."
                        },
                        "passes": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 8,
                          "description": "Number of sketch strokes; 1 is single-pass and 2 is the usual double stroke."
                        },
                        "strokeWidth": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 20,
                          "description": "Base stroke width in SVG user units."
                        },
                        "fill": {
                          "type": "string",
                          "enum": [
                            "none",
                            "hachure",
                            "solid",
                            "wash"
                          ],
                          "description": "Fill policy for rough/hybrid rendering; none and solid require a final stack that activates one of those backends."
                        },
                        "hachureAngle": {
                          "type": "number",
                          "minimum": -360,
                          "maximum": 360,
                          "description": "Hachure line angle in degrees; requires fill hachure in the final stack."
                        },
                        "hachureGap": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 100,
                          "description": "Gap between hachure lines; requires fill hachure in the final stack."
                        },
                        "fillWeight": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 20,
                          "description": "Hachure line weight; requires fill hachure in the final stack."
                        },
                        "washOpacity": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1,
                          "description": "Watercolor glaze opacity; requires fill wash in the final stack."
                        },
                        "washEdge": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1,
                          "description": "Watercolor edge-darkening opacity; requires fill wash in the final stack."
                        },
                        "backdrop": {
                          "type": "string",
                          "enum": [
                            "plain",
                            "paper-ruled",
                            "grid"
                          ],
                          "description": "Flat page furniture drawn behind the diagram."
                        },
                        "intent": {
                          "type": "string",
                          "enum": [
                            "premium",
                            "draft",
                            "lofi"
                          ],
                          "description": "Advisory intent metadata for pickers and quality tooling."
                        },
                        "mono": {
                          "type": "boolean",
                          "description": "Advisory monochrome contract: express tone through shading and weight."
                        }
                      }
                    }
                  ],
                  "x-agentic-mermaid-validation-expectation": "a registered Style name or StyleSpec"
                },
                {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Registered Style or Palette name."
                      },
                      {
                        "description": "A partial declarative style record for Agentic Mermaid rendering. All fields, including formatVersion, are optional on input; resolved and registered specs normalize formatVersion to 1.",
                        "type": "object",
                        "additionalProperties": false,
                        "maxProperties": 24,
                        "properties": {
                          "formatVersion": {
                            "const": 1,
                            "description": "Persisted wire-format version. Optional on input and normalized to 1 on output."
                          },
                          "$schema": {
                            "type": "string",
                            "description": "Optional JSON Schema pointer for file-backed styles; ignored while rendering."
                          },
                          "name": {
                            "type": "string",
                            "description": "Canonical look:name or palette:name identity; required only when registering a style."
                          },
                          "blurb": {
                            "type": "string",
                            "description": "Short human-readable description used by discovery surfaces."
                          },
                          "colors": {
                            "type": "object",
                            "additionalProperties": false,
                            "maxProperties": 7,
                            "description": "Partial palette of safe, non-fetching CSS color tokens. Runtime validation applies the stricter safe-color policy.",
                            "properties": {
                              "bg": {
                                "type": "string",
                                "description": "Diagram page background. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "fg": {
                                "type": "string",
                                "description": "Primary text and foreground paint. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "line": {
                                "type": "string",
                                "description": "Connector and secondary line paint. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "accent": {
                                "type": "string",
                                "description": "Accent paint for emphasis and data series. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "muted": {
                                "type": "string",
                                "description": "Muted text and secondary data paint. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "surface": {
                                "type": "string",
                                "description": "Node and group surface fill. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "border": {
                                "type": "string",
                                "description": "Node and group border paint. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              }
                            }
                          },
                          "font": {
                            "type": "string",
                            "description": "Safe, non-fetching CSS font family or stack; the rendering environment supplies the font face.",
                            "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                          },
                          "roles": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "Partial semantic SceneRole defaults. Family-authored styling remains authoritative.",
                            "properties": {
                              "node": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 11,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "paddingX": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Horizontal role padding."
                                  },
                                  "paddingY": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Vertical role padding."
                                  },
                                  "cornerRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable corner radius."
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "edge": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 8,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "bendRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable connector bend radius."
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "group": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 13,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "paddingX": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Horizontal role padding."
                                  },
                                  "paddingY": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Vertical role padding."
                                  },
                                  "cornerRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable corner radius."
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "fontFamily": {
                                    "type": "string",
                                    "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                    "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                  },
                                  "headerFillColor": {
                                    "type": "string",
                                    "description": "Group header surface paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "group-header": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 11,
                                "properties": {
                                  "fontFamily": {
                                    "type": "string",
                                    "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                    "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                  },
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "cue": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "outline",
                                      "double-line",
                                      "pattern"
                                    ],
                                    "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                  }
                                }
                              },
                              "label": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "actor": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 11,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "paddingX": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Horizontal role padding."
                                  },
                                  "paddingY": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Vertical role padding."
                                  },
                                  "cornerRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable corner radius."
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "relationship": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 8,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "bendRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable connector bend radius."
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "pie-slice": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "cue": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "outline",
                                      "double-line",
                                      "pattern"
                                    ],
                                    "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                  }
                                }
                              },
                              "legend": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "bar": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 4,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  }
                                }
                              },
                              "series": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 3,
                                "properties": {
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  }
                                }
                              },
                              "point": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 4,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  }
                                }
                              },
                              "task": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "cue": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "outline",
                                      "double-line",
                                      "pattern"
                                    ],
                                    "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                  }
                                }
                              },
                              "milestone": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "cue": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "outline",
                                      "double-line",
                                      "pattern"
                                    ],
                                    "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                  }
                                }
                              }
                            }
                          },
                          "semanticSlots": {
                            "type": "object",
                            "description": "Named brand-neutral role-style slots selected by semantic bindings.",
                            "maxProperties": 4096,
                            "propertyNames": {
                              "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
                              "not": {
                                "enum": [
                                  "__proto__",
                                  "constructor",
                                  "prototype"
                                ]
                              }
                            },
                            "additionalProperties": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 16,
                              "properties": {
                                "fontFamily": {
                                  "type": "string",
                                  "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                  "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                },
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "paddingX": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Horizontal role padding."
                                },
                                "paddingY": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Vertical role padding."
                                },
                                "cornerRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable corner radius."
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "bendRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable connector bend radius."
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "headerFillColor": {
                                  "type": "string",
                                  "description": "Group header surface paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            }
                          },
                          "bindings": {
                            "type": "array",
                            "description": "Ordered equality bindings from authored/domain meaning to semantic slots.",
                            "maxItems": 4096,
                            "items": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 4,
                              "required": [
                                "channel",
                                "value",
                                "slot"
                              ],
                              "properties": {
                                "channel": {
                                  "type": "string",
                                  "enum": [
                                    "category"
                                  ]
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256,
                                  "pattern": "^[^\\r\\n\\u0000]+$"
                                },
                                "slot": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
                                  "not": {
                                    "enum": [
                                      "__proto__",
                                      "constructor",
                                      "prototype"
                                    ]
                                  }
                                },
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "group-header",
                                    "actor",
                                    "relationship",
                                    "pie-slice",
                                    "legend",
                                    "bar",
                                    "series",
                                    "point",
                                    "task",
                                    "milestone"
                                  ]
                                }
                              }
                            }
                          },
                          "constraints": {
                            "type": "array",
                            "description": "Closed inspect-only brand constraints with warn or error actions.",
                            "maxItems": 4096,
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "kind",
                                    "action"
                                  ],
                                  "properties": {
                                    "kind": {
                                      "const": "contrast"
                                    },
                                    "action": {
                                      "type": "string",
                                      "enum": [
                                        "warn",
                                        "error"
                                      ]
                                    },
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "node",
                                        "edge",
                                        "edge-label",
                                        "group",
                                        "group-header",
                                        "label",
                                        "actor",
                                        "lifeline",
                                        "activation",
                                        "message",
                                        "block",
                                        "note",
                                        "class-box",
                                        "member",
                                        "entity",
                                        "attribute",
                                        "relationship",
                                        "cardinality",
                                        "pie-slice",
                                        "legend",
                                        "bar",
                                        "series",
                                        "point",
                                        "axis",
                                        "grid",
                                        "plate",
                                        "section",
                                        "task",
                                        "milestone",
                                        "marker-line",
                                        "rail",
                                        "period",
                                        "event",
                                        "score",
                                        "actor-pill",
                                        "service",
                                        "junction",
                                        "icon",
                                        "title",
                                        "defs",
                                        "prelude",
                                        "chrome"
                                      ]
                                    },
                                    "minimum": {
                                      "type": "number",
                                      "minimum": 1,
                                      "maximum": 21
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "kind",
                                    "action",
                                    "maxFraction"
                                  ],
                                  "properties": {
                                    "kind": {
                                      "const": "accent-area"
                                    },
                                    "action": {
                                      "type": "string",
                                      "enum": [
                                        "warn",
                                        "error"
                                      ]
                                    },
                                    "maxFraction": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "kind",
                                    "action",
                                    "role"
                                  ],
                                  "properties": {
                                    "kind": {
                                      "const": "mono-role"
                                    },
                                    "action": {
                                      "type": "string",
                                      "enum": [
                                        "warn",
                                        "error"
                                      ]
                                    },
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "node",
                                        "edge",
                                        "edge-label",
                                        "group",
                                        "group-header",
                                        "label",
                                        "actor",
                                        "lifeline",
                                        "activation",
                                        "message",
                                        "block",
                                        "note",
                                        "class-box",
                                        "member",
                                        "entity",
                                        "attribute",
                                        "relationship",
                                        "cardinality",
                                        "pie-slice",
                                        "legend",
                                        "bar",
                                        "series",
                                        "point",
                                        "axis",
                                        "grid",
                                        "plate",
                                        "section",
                                        "task",
                                        "milestone",
                                        "marker-line",
                                        "rail",
                                        "period",
                                        "event",
                                        "score",
                                        "actor-pill",
                                        "service",
                                        "junction",
                                        "icon",
                                        "title",
                                        "defs",
                                        "prelude",
                                        "chrome"
                                      ]
                                    }
                                  }
                                }
                              ]
                            }
                          },
                          "stroke": {
                            "type": "string",
                            "enum": [
                              "crisp",
                              "jittered",
                              "freehand"
                            ],
                            "description": "Stroke treatment; crisp is the default renderer."
                          },
                          "roughness": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 10,
                            "description": "Rough.js stroke irregularity."
                          },
                          "bowing": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 10,
                            "description": "Rough.js line bowing."
                          },
                          "passes": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 8,
                            "description": "Number of sketch strokes; 1 is single-pass and 2 is the usual double stroke."
                          },
                          "strokeWidth": {
                            "type": "number",
                            "exclusiveMinimum": 0,
                            "maximum": 20,
                            "description": "Base stroke width in SVG user units."
                          },
                          "fill": {
                            "type": "string",
                            "enum": [
                              "none",
                              "hachure",
                              "solid",
                              "wash"
                            ],
                            "description": "Fill policy for rough/hybrid rendering; none and solid require a final stack that activates one of those backends."
                          },
                          "hachureAngle": {
                            "type": "number",
                            "minimum": -360,
                            "maximum": 360,
                            "description": "Hachure line angle in degrees; requires fill hachure in the final stack."
                          },
                          "hachureGap": {
                            "type": "number",
                            "exclusiveMinimum": 0,
                            "maximum": 100,
                            "description": "Gap between hachure lines; requires fill hachure in the final stack."
                          },
                          "fillWeight": {
                            "type": "number",
                            "exclusiveMinimum": 0,
                            "maximum": 20,
                            "description": "Hachure line weight; requires fill hachure in the final stack."
                          },
                          "washOpacity": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1,
                            "description": "Watercolor glaze opacity; requires fill wash in the final stack."
                          },
                          "washEdge": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1,
                            "description": "Watercolor edge-darkening opacity; requires fill wash in the final stack."
                          },
                          "backdrop": {
                            "type": "string",
                            "enum": [
                              "plain",
                              "paper-ruled",
                              "grid"
                            ],
                            "description": "Flat page furniture drawn behind the diagram."
                          },
                          "intent": {
                            "type": "string",
                            "enum": [
                              "premium",
                              "draft",
                              "lofi"
                            ],
                            "description": "Advisory intent metadata for pickers and quality tooling."
                          },
                          "mono": {
                            "type": "boolean",
                            "description": "Advisory monochrome contract: express tone through shading and weight."
                          }
                        }
                      }
                    ],
                    "x-agentic-mermaid-validation-expectation": "a registered Style name or StyleSpec"
                  },
                  "description": "Style stack merged from left to right."
                }
              ],
              "description": "A registered name, inline StyleSpec, or left-to-right stack of either.",
              "x-agentic-mermaid-runtime-validator": "styleInput",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "padding": {
              "type": "number",
              "description": "Canvas padding in SVG user units.",
              "default": 40,
              "minimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output uses paddingX, paddingY, and boxBorderPadding",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart",
                "state",
                "architecture"
              ]
            },
            "nodeSpacing": {
              "type": "number",
              "description": "Horizontal spacing between sibling nodes.",
              "default": 24,
              "minimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal layout has a cell-grid spacing contract",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart",
                "state",
                "class",
                "er",
                "architecture"
              ]
            },
            "layerSpacing": {
              "type": "number",
              "description": "Vertical spacing between graph layers.",
              "default": 40,
              "minimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal layout has a cell-grid spacing contract",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart",
                "state",
                "class",
                "er",
                "architecture"
              ]
            },
            "wrappingWidth": {
              "type": "number",
              "description": "Flowchart measured-label wrapping budget in pixels.",
              "exclusiveMinimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output uses maxWidth or targetWidth",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart"
              ]
            },
            "componentSpacing": {
              "type": "number",
              "description": "Spacing between disconnected graph components for compatible extension families; no built-in family currently consumes it.",
              "minimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal layout has a cell-grid spacing contract",
              "x-agentic-mermaid-applicable-builtin-families": []
            },
            "transparent": {
              "type": "boolean",
              "description": "Omit the painted SVG canvas background.",
              "default": false,
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "terminal output has no painted canvas background"
            },
            "interactive": {
              "type": "boolean",
              "description": "Enable hover tooltips for supported chart data points.",
              "default": false,
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "terminal output is a static semantic projection",
              "x-agentic-mermaid-applicable-builtin-families": [
                "xychart",
                "pie",
                "quadrant"
              ]
            },
            "shadow": {
              "type": "boolean",
              "description": "Paint explicit drop shadows on node shapes.",
              "default": false,
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "elevation projects to borders and labels",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart",
                "state",
                "sequence",
                "timeline",
                "class",
                "er",
                "journey",
                "xychart",
                "pie",
                "quadrant",
                "gantt",
                "mindmap",
                "gitgraph"
              ]
            },
            "class": {
              "type": "object",
              "description": "Class-diagram rendering controls.",
              "additionalProperties": false,
              "properties": {
                "hierarchicalNamespaces": {
                  "type": "boolean",
                  "description": "Nest namespace compounds.",
                  "default": true
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "this option configures graphical class layout",
              "x-agentic-mermaid-applicable-builtin-families": [
                "class"
              ]
            },
            "architecture": {
              "type": "object",
              "description": "Architecture renderer visual metric and paint overrides.",
              "additionalProperties": false,
              "properties": {
                "visual": {
                  "type": "object",
                  "description": "Sparse architecture visual overrides merged over resolved defaults.",
                  "additionalProperties": false,
                  "properties": {
                    "groupHeaderHeight": {
                      "type": "number",
                      "description": "Architecture group-header height.",
                      "exclusiveMinimum": 0
                    },
                    "groupFontSize": {
                      "type": "number",
                      "description": "Architecture group-label font size.",
                      "exclusiveMinimum": 0
                    },
                    "groupFontWeight": {
                      "type": "number",
                      "description": "Architecture group-label font weight.",
                      "minimum": 1,
                      "maximum": 1000
                    },
                    "groupLetterSpacing": {
                      "type": "number",
                      "description": "Architecture group-label letter spacing."
                    },
                    "groupFont": {
                      "type": "string",
                      "description": "Architecture group-label font family.",
                      "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                    },
                    "groupTextTransform": {
                      "type": "string",
                      "enum": [
                        "uppercase",
                        "lowercase",
                        "capitalize"
                      ],
                      "description": "Architecture group-label text transform."
                    },
                    "groupPaddingX": {
                      "type": "number",
                      "description": "Horizontal padding inside architecture groups.",
                      "minimum": 0
                    },
                    "groupPaddingY": {
                      "type": "number",
                      "description": "Vertical padding inside architecture groups.",
                      "minimum": 0
                    },
                    "groupLabelPaddingX": {
                      "type": "number",
                      "description": "Horizontal padding around architecture group labels.",
                      "minimum": 0
                    },
                    "groupCornerRadius": {
                      "type": "number",
                      "description": "Architecture group corner radius.",
                      "minimum": 0
                    },
                    "groupLineWidth": {
                      "type": "number",
                      "description": "Architecture group border width.",
                      "minimum": 0
                    },
                    "groupText": {
                      "type": "string",
                      "description": "Architecture group-label color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "serviceFontSize": {
                      "type": "number",
                      "description": "Architecture service-label font size.",
                      "exclusiveMinimum": 0
                    },
                    "serviceFontWeight": {
                      "type": "number",
                      "description": "Architecture service-label font weight.",
                      "minimum": 1,
                      "maximum": 1000
                    },
                    "serviceLetterSpacing": {
                      "type": "number",
                      "description": "Architecture service-label letter spacing."
                    },
                    "serviceTextTransform": {
                      "type": "string",
                      "enum": [
                        "uppercase",
                        "lowercase",
                        "capitalize"
                      ],
                      "description": "Architecture service-label text transform."
                    },
                    "servicePaddingX": {
                      "type": "number",
                      "description": "Horizontal padding inside architecture services.",
                      "minimum": 0
                    },
                    "servicePaddingY": {
                      "type": "number",
                      "description": "Vertical padding inside architecture services.",
                      "minimum": 0
                    },
                    "serviceCornerRadius": {
                      "type": "number",
                      "description": "Architecture service corner radius.",
                      "minimum": 0
                    },
                    "serviceLineWidth": {
                      "type": "number",
                      "description": "Architecture service border width.",
                      "minimum": 0
                    },
                    "serviceText": {
                      "type": "string",
                      "description": "Architecture service-label color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "edgeFontSize": {
                      "type": "number",
                      "description": "Architecture connector-label font size.",
                      "exclusiveMinimum": 0
                    },
                    "edgeFontWeight": {
                      "type": "number",
                      "description": "Architecture connector-label font weight.",
                      "minimum": 1,
                      "maximum": 1000
                    },
                    "edgeLetterSpacing": {
                      "type": "number",
                      "description": "Architecture connector-label letter spacing."
                    },
                    "edgeTextTransform": {
                      "type": "string",
                      "enum": [
                        "uppercase",
                        "lowercase",
                        "capitalize"
                      ],
                      "description": "Architecture connector-label text transform."
                    },
                    "edgeLineWidth": {
                      "type": "number",
                      "description": "Architecture connector width.",
                      "minimum": 0
                    },
                    "edgeBendRadius": {
                      "type": "number",
                      "description": "Architecture connector bend radius.",
                      "minimum": 0
                    },
                    "edgeStroke": {
                      "type": "string",
                      "description": "Architecture connector color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "edgeText": {
                      "type": "string",
                      "description": "Architecture connector-label color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "iconSize": {
                      "type": "number",
                      "description": "Architecture group icon size.",
                      "exclusiveMinimum": 0
                    },
                    "serviceIconSize": {
                      "type": "number",
                      "description": "Architecture service icon size.",
                      "exclusiveMinimum": 0
                    },
                    "junctionOuterRadius": {
                      "type": "number",
                      "description": "Architecture junction outer radius.",
                      "exclusiveMinimum": 0
                    },
                    "junctionInnerRadius": {
                      "type": "number",
                      "description": "Architecture junction inner radius.",
                      "minimum": 0
                    },
                    "groupSurface": {
                      "type": "string",
                      "description": "Architecture group surface color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "groupHeaderSurface": {
                      "type": "string",
                      "description": "Architecture group-header surface color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "groupBorder": {
                      "type": "string",
                      "description": "Architecture group border color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "serviceSurface": {
                      "type": "string",
                      "description": "Architecture service surface color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "serviceBorder": {
                      "type": "string",
                      "description": "Architecture service border color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    }
                  },
                  "x-agentic-mermaid-runtime-validator": "architectureVisual"
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "this option configures graphical architecture rendering",
              "x-agentic-mermaid-applicable-builtin-families": [
                "architecture"
              ]
            },
            "timeline": {
              "type": "object",
              "description": "Timeline layout controls.",
              "additionalProperties": false,
              "properties": {
                "maxWidth": {
                  "type": "number",
                  "description": "Best-effort width budget for horizontal timelines.",
                  "exclusiveMinimum": 0
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output uses maxWidth or targetWidth",
              "x-agentic-mermaid-applicable-builtin-families": [
                "timeline"
              ]
            },
            "journey": {
              "type": "object",
              "description": "User-journey graphical controls.",
              "additionalProperties": false,
              "properties": {
                "experienceCurve": {
                  "type": "boolean",
                  "description": "Connect journey score markers with an experience curve.",
                  "default": true
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "experience curves are graphical-only",
              "x-agentic-mermaid-applicable-builtin-families": [
                "journey"
              ]
            },
            "gantt": {
              "type": "object",
              "description": "Gantt dependency and critical-path overlays.",
              "additionalProperties": false,
              "properties": {
                "dependencyArrows": {
                  "type": "boolean",
                  "description": "Draw scheduled dependency connectors.",
                  "default": false
                },
                "criticalPath": {
                  "type": "boolean",
                  "description": "Emphasize critical-path tasks and connectors.",
                  "default": false
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "graphical Gantt connector emphasis is not represented in cells",
              "x-agentic-mermaid-applicable-builtin-families": [
                "gantt"
              ]
            },
            "mermaidConfig": {
              "type": "object",
              "description": "Mermaid-style recursive runtime configuration.",
              "additionalProperties": {
                "$ref": "#/$defs/jsonValue"
              },
              "x-agentic-mermaid-terminal": "consumed"
            },
            "embedFontImport": {
              "type": "boolean",
              "description": "Embed the Google Fonts import in SVG styles; PNG forces this off for offline rasterization.",
              "default": false,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output embeds no web-font import"
            },
            "compact": {
              "type": "boolean",
              "description": "Compact SVG serialization while preserving agent hooks.",
              "default": false,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "compact controls SVG serialization"
            },
            "idPrefix": {
              "type": "string",
              "description": "Non-empty namespace for generated SVG definition IDs and local references.",
              "pattern": "^[A-Za-z0-9_.:-]+$",
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output has no SVG definition ids"
            },
            "security": {
              "type": "string",
              "enum": [
                "default",
                "strict"
              ],
              "description": "Active SVG content is rejected in every mode; strict additionally rejects every external reference. Raw Mermaid themeCSS is rejected in both modes.",
              "default": "default",
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal text has its own control-character and HTML-color safety projection"
            },
            "ganttToday": {
              "type": "string",
              "description": "Explicit deterministic date for the Gantt today marker.",
              "x-agentic-mermaid-terminal": "consumed",
              "x-agentic-mermaid-applicable-builtin-families": [
                "gantt"
              ]
            },
            "seed": {
              "type": "number",
              "description": "Deterministic re-roll seed for stochastic Styles.",
              "default": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal glyph geometry is deterministic and has no stochastic ink"
            }
          },
          "$defs": {
            "jsonValue": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/jsonValue"
                  }
                },
                {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/$defs/jsonValue"
                  }
                }
              ],
              "description": "A finite, acyclic JSON value without prototype keys.",
              "x-agentic-mermaid-validation-expectation": "a finite, acyclic JSON value without prototype keys"
            }
          },
          "description": "Shared advanced RenderOptions object, including style/palette/config/security.",
          "required": false
        }
      }
    },
    {
      "name": "render_png",
      "title": "Render Mermaid as PNG",
      "description": "Rasterize a Mermaid source string to PNG. Returns { ok, png_base64 }. Hosted rendering uses resvg-wasm with bundled fonts; bytes may differ from the local napi renderer, so hosted PNG is a convenience surface, not part of the byte-determinism contract. For file/URL artifacts use the local stdio server.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "parameters": {
        "source": {
          "type": "string",
          "description": "Mermaid source.",
          "required": true
        },
        "scale": {
          "type": "number",
          "exclusiveMinimum": 0,
          "default": 2,
          "description": "Positive output scale used when no fitTo constraint is supplied.",
          "x-agentic-mermaid-scope": "portable",
          "x-agentic-mermaid-receipt": "included",
          "required": false
        },
        "background": {
          "type": "string",
          "minLength": 1,
          "pattern": "^\\s*(?:#[0-9A-Fa-f]{3,4}|#[0-9A-Fa-f]{6}|#[0-9A-Fa-f]{8}|[tT][rR][aA][nN][sS][pP][aA][rR][eE][nN][tT]|[bB][lL][aA][cC][kK]|[sS][iI][lL][vV][eE][rR]|[gG][rR][aA][yY]|[gG][rR][eE][yY]|[wW][hH][iI][tT][eE]|[mM][aA][rR][oO][oO][nN]|[rR][eE][dD]|[pP][uU][rR][pP][lL][eE]|[fF][uU][cC][hH][sS][iI][aA]|[gG][rR][eE][eE][nN]|[lL][iI][mM][eE]|[oO][lL][iI][vV][eE]|[yY][eE][lL][lL][oO][wW]|[nN][aA][vV][yY]|[bB][lL][uU][eE]|[tT][eE][aA][lL]|[aA][qQ][uU][aA]|[oO][rR][aA][nN][gG][eE])\\s*$",
          "description": "Portable basic color or hex color painted behind the raster artifact.",
          "x-agentic-mermaid-scope": "portable",
          "x-agentic-mermaid-receipt": "included",
          "x-agentic-mermaid-runtime-validator": "portablePngBackground",
          "required": false
        },
        "fitTo": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "width": {
              "type": "integer",
              "minimum": 1,
              "description": "Exact output width in integer pixels."
            },
            "height": {
              "type": "integer",
              "minimum": 1,
              "description": "Exact output height in integer pixels."
            }
          },
          "oneOf": [
            {
              "required": [
                "width"
              ]
            },
            {
              "required": [
                "height"
              ]
            }
          ],
          "description": "Exactly one output width or height constraint.",
          "x-agentic-mermaid-scope": "portable",
          "x-agentic-mermaid-receipt": "included",
          "required": false
        },
        "options": {
          "$schema": "https://json-schema.org/draft/2020-12/schema",
          "$id": "https://agentic-mermaid.dev/schemas/render-options.schema.json",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "bg": {
              "type": "string",
              "description": "Background color or CSS variable.",
              "default": "#FFFFFF",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "fg": {
              "type": "string",
              "description": "Primary foreground and text color.",
              "default": "#27272A",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "line": {
              "type": "string",
              "description": "Connector and secondary-line color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "accent": {
              "type": "string",
              "description": "Arrowhead, highlight, and data accent color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "muted": {
              "type": "string",
              "description": "Secondary text and label color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "terminal themes have no dedicated muted-text role"
            },
            "surface": {
              "type": "string",
              "description": "Node and group surface color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "terminal cells do not paint graphical surfaces"
            },
            "border": {
              "type": "string",
              "description": "Node and group border color.",
              "x-agentic-mermaid-runtime-validator": "safeCssPaint",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "font": {
              "type": "string",
              "description": "CSS font family or stack.",
              "default": "Inter",
              "x-agentic-mermaid-runtime-validator": "safeCssFontFamily",
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "the host terminal owns the font face"
            },
            "style": {
              "anyOf": [
                {
                  "anyOf": [
                    {
                      "type": "string",
                      "description": "Registered Style or Palette name."
                    },
                    {
                      "description": "A partial declarative style record for Agentic Mermaid rendering. All fields, including formatVersion, are optional on input; resolved and registered specs normalize formatVersion to 1.",
                      "type": "object",
                      "additionalProperties": false,
                      "maxProperties": 24,
                      "properties": {
                        "formatVersion": {
                          "const": 1,
                          "description": "Persisted wire-format version. Optional on input and normalized to 1 on output."
                        },
                        "$schema": {
                          "type": "string",
                          "description": "Optional JSON Schema pointer for file-backed styles; ignored while rendering."
                        },
                        "name": {
                          "type": "string",
                          "description": "Canonical look:name or palette:name identity; required only when registering a style."
                        },
                        "blurb": {
                          "type": "string",
                          "description": "Short human-readable description used by discovery surfaces."
                        },
                        "colors": {
                          "type": "object",
                          "additionalProperties": false,
                          "maxProperties": 7,
                          "description": "Partial palette of safe, non-fetching CSS color tokens. Runtime validation applies the stricter safe-color policy.",
                          "properties": {
                            "bg": {
                              "type": "string",
                              "description": "Diagram page background. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "fg": {
                              "type": "string",
                              "description": "Primary text and foreground paint. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "line": {
                              "type": "string",
                              "description": "Connector and secondary line paint. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "accent": {
                              "type": "string",
                              "description": "Accent paint for emphasis and data series. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "muted": {
                              "type": "string",
                              "description": "Muted text and secondary data paint. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "surface": {
                              "type": "string",
                              "description": "Node and group surface fill. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            },
                            "border": {
                              "type": "string",
                              "description": "Node and group border paint. Must be a safe, non-fetching CSS color.",
                              "x-agentic-mermaid-runtime-validator": "safeCssColor"
                            }
                          }
                        },
                        "font": {
                          "type": "string",
                          "description": "Safe, non-fetching CSS font family or stack; the rendering environment supplies the font face.",
                          "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                        },
                        "roles": {
                          "type": "object",
                          "additionalProperties": false,
                          "description": "Partial semantic SceneRole defaults. Family-authored styling remains authoritative.",
                          "properties": {
                            "node": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 11,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "paddingX": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Horizontal role padding."
                                },
                                "paddingY": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Vertical role padding."
                                },
                                "cornerRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable corner radius."
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "edge": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 8,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "bendRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable connector bend radius."
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "group": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 13,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "paddingX": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Horizontal role padding."
                                },
                                "paddingY": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Vertical role padding."
                                },
                                "cornerRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable corner radius."
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "fontFamily": {
                                  "type": "string",
                                  "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                  "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                },
                                "headerFillColor": {
                                  "type": "string",
                                  "description": "Group header surface paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "group-header": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 11,
                              "properties": {
                                "fontFamily": {
                                  "type": "string",
                                  "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                  "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                },
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            },
                            "label": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "actor": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 11,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "paddingX": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Horizontal role padding."
                                },
                                "paddingY": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Vertical role padding."
                                },
                                "cornerRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable corner radius."
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "relationship": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 8,
                              "properties": {
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "bendRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable connector bend radius."
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "pie-slice": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            },
                            "legend": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                }
                              }
                            },
                            "bar": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 4,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                }
                              }
                            },
                            "series": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 3,
                              "properties": {
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                }
                              }
                            },
                            "point": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 4,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                }
                              }
                            },
                            "task": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            },
                            "milestone": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 5,
                              "properties": {
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            }
                          }
                        },
                        "semanticSlots": {
                          "type": "object",
                          "description": "Named brand-neutral role-style slots selected by semantic bindings.",
                          "maxProperties": 4096,
                          "propertyNames": {
                            "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
                            "not": {
                              "enum": [
                                "__proto__",
                                "constructor",
                                "prototype"
                              ]
                            }
                          },
                          "additionalProperties": {
                            "type": "object",
                            "additionalProperties": false,
                            "maxProperties": 16,
                            "properties": {
                              "fontFamily": {
                                "type": "string",
                                "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                              },
                              "fontSize": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 256,
                                "description": "Font size in SVG user units."
                              },
                              "fontWeight": {
                                "type": "number",
                                "minimum": 1,
                                "maximum": 1000,
                                "description": "CSS numeric font weight."
                              },
                              "letterSpacing": {
                                "type": "number",
                                "minimum": -2,
                                "maximum": 4,
                                "description": "Letter spacing in SVG user units."
                              },
                              "textTransform": {
                                "type": "string",
                                "enum": [
                                  "uppercase",
                                  "lowercase",
                                  "capitalize"
                                ],
                                "description": "Text transformation."
                              },
                              "textColor": {
                                "type": "string",
                                "description": "Text paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "paddingX": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 256,
                                "description": "Horizontal role padding."
                              },
                              "paddingY": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 256,
                                "description": "Vertical role padding."
                              },
                              "cornerRadius": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 256,
                                "description": "Applicable corner radius."
                              },
                              "lineWidth": {
                                "type": "number",
                                "exclusiveMinimum": 0,
                                "maximum": 20,
                                "description": "Border or connector width."
                              },
                              "bendRadius": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 256,
                                "description": "Applicable connector bend radius."
                              },
                              "fillColor": {
                                "type": "string",
                                "description": "Surface fill paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "borderColor": {
                                "type": "string",
                                "description": "Border paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "strokeColor": {
                                "type": "string",
                                "description": "Connector stroke paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "headerFillColor": {
                                "type": "string",
                                "description": "Group header surface paint.",
                                "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                              },
                              "cue": {
                                "type": "string",
                                "enum": [
                                  "none",
                                  "outline",
                                  "double-line",
                                  "pattern"
                                ],
                                "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                              }
                            }
                          }
                        },
                        "bindings": {
                          "type": "array",
                          "description": "Ordered equality bindings from authored/domain meaning to semantic slots.",
                          "maxItems": 4096,
                          "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "maxProperties": 4,
                            "required": [
                              "channel",
                              "value",
                              "slot"
                            ],
                            "properties": {
                              "channel": {
                                "type": "string",
                                "enum": [
                                  "category"
                                ]
                              },
                              "value": {
                                "type": "string",
                                "minLength": 1,
                                "maxLength": 256,
                                "pattern": "^[^\\r\\n\\u0000]+$"
                              },
                              "slot": {
                                "type": "string",
                                "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
                                "not": {
                                  "enum": [
                                    "__proto__",
                                    "constructor",
                                    "prototype"
                                  ]
                                }
                              },
                              "role": {
                                "type": "string",
                                "enum": [
                                  "group-header",
                                  "actor",
                                  "relationship",
                                  "pie-slice",
                                  "legend",
                                  "bar",
                                  "series",
                                  "point",
                                  "task",
                                  "milestone"
                                ]
                              }
                            }
                          }
                        },
                        "constraints": {
                          "type": "array",
                          "description": "Closed inspect-only brand constraints with warn or error actions.",
                          "maxItems": 4096,
                          "items": {
                            "oneOf": [
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "action"
                                ],
                                "properties": {
                                  "kind": {
                                    "const": "contrast"
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "warn",
                                      "error"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "node",
                                      "edge",
                                      "edge-label",
                                      "group",
                                      "group-header",
                                      "label",
                                      "actor",
                                      "lifeline",
                                      "activation",
                                      "message",
                                      "block",
                                      "note",
                                      "class-box",
                                      "member",
                                      "entity",
                                      "attribute",
                                      "relationship",
                                      "cardinality",
                                      "pie-slice",
                                      "legend",
                                      "bar",
                                      "series",
                                      "point",
                                      "axis",
                                      "grid",
                                      "plate",
                                      "section",
                                      "task",
                                      "milestone",
                                      "marker-line",
                                      "rail",
                                      "period",
                                      "event",
                                      "score",
                                      "actor-pill",
                                      "service",
                                      "junction",
                                      "icon",
                                      "title",
                                      "defs",
                                      "prelude",
                                      "chrome"
                                    ]
                                  },
                                  "minimum": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 21
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "action",
                                  "maxFraction"
                                ],
                                "properties": {
                                  "kind": {
                                    "const": "accent-area"
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "warn",
                                      "error"
                                    ]
                                  },
                                  "maxFraction": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  }
                                }
                              },
                              {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "kind",
                                  "action",
                                  "role"
                                ],
                                "properties": {
                                  "kind": {
                                    "const": "mono-role"
                                  },
                                  "action": {
                                    "type": "string",
                                    "enum": [
                                      "warn",
                                      "error"
                                    ]
                                  },
                                  "role": {
                                    "type": "string",
                                    "enum": [
                                      "node",
                                      "edge",
                                      "edge-label",
                                      "group",
                                      "group-header",
                                      "label",
                                      "actor",
                                      "lifeline",
                                      "activation",
                                      "message",
                                      "block",
                                      "note",
                                      "class-box",
                                      "member",
                                      "entity",
                                      "attribute",
                                      "relationship",
                                      "cardinality",
                                      "pie-slice",
                                      "legend",
                                      "bar",
                                      "series",
                                      "point",
                                      "axis",
                                      "grid",
                                      "plate",
                                      "section",
                                      "task",
                                      "milestone",
                                      "marker-line",
                                      "rail",
                                      "period",
                                      "event",
                                      "score",
                                      "actor-pill",
                                      "service",
                                      "junction",
                                      "icon",
                                      "title",
                                      "defs",
                                      "prelude",
                                      "chrome"
                                    ]
                                  }
                                }
                              }
                            ]
                          }
                        },
                        "stroke": {
                          "type": "string",
                          "enum": [
                            "crisp",
                            "jittered",
                            "freehand"
                          ],
                          "description": "Stroke treatment; crisp is the default renderer."
                        },
                        "roughness": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10,
                          "description": "Rough.js stroke irregularity."
                        },
                        "bowing": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10,
                          "description": "Rough.js line bowing."
                        },
                        "passes": {
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 8,
                          "description": "Number of sketch strokes; 1 is single-pass and 2 is the usual double stroke."
                        },
                        "strokeWidth": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 20,
                          "description": "Base stroke width in SVG user units."
                        },
                        "fill": {
                          "type": "string",
                          "enum": [
                            "none",
                            "hachure",
                            "solid",
                            "wash"
                          ],
                          "description": "Fill policy for rough/hybrid rendering; none and solid require a final stack that activates one of those backends."
                        },
                        "hachureAngle": {
                          "type": "number",
                          "minimum": -360,
                          "maximum": 360,
                          "description": "Hachure line angle in degrees; requires fill hachure in the final stack."
                        },
                        "hachureGap": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 100,
                          "description": "Gap between hachure lines; requires fill hachure in the final stack."
                        },
                        "fillWeight": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 20,
                          "description": "Hachure line weight; requires fill hachure in the final stack."
                        },
                        "washOpacity": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1,
                          "description": "Watercolor glaze opacity; requires fill wash in the final stack."
                        },
                        "washEdge": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1,
                          "description": "Watercolor edge-darkening opacity; requires fill wash in the final stack."
                        },
                        "backdrop": {
                          "type": "string",
                          "enum": [
                            "plain",
                            "paper-ruled",
                            "grid"
                          ],
                          "description": "Flat page furniture drawn behind the diagram."
                        },
                        "intent": {
                          "type": "string",
                          "enum": [
                            "premium",
                            "draft",
                            "lofi"
                          ],
                          "description": "Advisory intent metadata for pickers and quality tooling."
                        },
                        "mono": {
                          "type": "boolean",
                          "description": "Advisory monochrome contract: express tone through shading and weight."
                        }
                      }
                    }
                  ],
                  "x-agentic-mermaid-validation-expectation": "a registered Style name or StyleSpec"
                },
                {
                  "type": "array",
                  "items": {
                    "anyOf": [
                      {
                        "type": "string",
                        "description": "Registered Style or Palette name."
                      },
                      {
                        "description": "A partial declarative style record for Agentic Mermaid rendering. All fields, including formatVersion, are optional on input; resolved and registered specs normalize formatVersion to 1.",
                        "type": "object",
                        "additionalProperties": false,
                        "maxProperties": 24,
                        "properties": {
                          "formatVersion": {
                            "const": 1,
                            "description": "Persisted wire-format version. Optional on input and normalized to 1 on output."
                          },
                          "$schema": {
                            "type": "string",
                            "description": "Optional JSON Schema pointer for file-backed styles; ignored while rendering."
                          },
                          "name": {
                            "type": "string",
                            "description": "Canonical look:name or palette:name identity; required only when registering a style."
                          },
                          "blurb": {
                            "type": "string",
                            "description": "Short human-readable description used by discovery surfaces."
                          },
                          "colors": {
                            "type": "object",
                            "additionalProperties": false,
                            "maxProperties": 7,
                            "description": "Partial palette of safe, non-fetching CSS color tokens. Runtime validation applies the stricter safe-color policy.",
                            "properties": {
                              "bg": {
                                "type": "string",
                                "description": "Diagram page background. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "fg": {
                                "type": "string",
                                "description": "Primary text and foreground paint. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "line": {
                                "type": "string",
                                "description": "Connector and secondary line paint. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "accent": {
                                "type": "string",
                                "description": "Accent paint for emphasis and data series. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "muted": {
                                "type": "string",
                                "description": "Muted text and secondary data paint. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "surface": {
                                "type": "string",
                                "description": "Node and group surface fill. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              },
                              "border": {
                                "type": "string",
                                "description": "Node and group border paint. Must be a safe, non-fetching CSS color.",
                                "x-agentic-mermaid-runtime-validator": "safeCssColor"
                              }
                            }
                          },
                          "font": {
                            "type": "string",
                            "description": "Safe, non-fetching CSS font family or stack; the rendering environment supplies the font face.",
                            "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                          },
                          "roles": {
                            "type": "object",
                            "additionalProperties": false,
                            "description": "Partial semantic SceneRole defaults. Family-authored styling remains authoritative.",
                            "properties": {
                              "node": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 11,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "paddingX": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Horizontal role padding."
                                  },
                                  "paddingY": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Vertical role padding."
                                  },
                                  "cornerRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable corner radius."
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "edge": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 8,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "bendRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable connector bend radius."
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "group": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 13,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "paddingX": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Horizontal role padding."
                                  },
                                  "paddingY": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Vertical role padding."
                                  },
                                  "cornerRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable corner radius."
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "fontFamily": {
                                    "type": "string",
                                    "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                    "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                  },
                                  "headerFillColor": {
                                    "type": "string",
                                    "description": "Group header surface paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "group-header": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 11,
                                "properties": {
                                  "fontFamily": {
                                    "type": "string",
                                    "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                    "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                  },
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "cue": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "outline",
                                      "double-line",
                                      "pattern"
                                    ],
                                    "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                  }
                                }
                              },
                              "label": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "actor": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 11,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "paddingX": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Horizontal role padding."
                                  },
                                  "paddingY": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Vertical role padding."
                                  },
                                  "cornerRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable corner radius."
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "relationship": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 8,
                                "properties": {
                                  "fontSize": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 256,
                                    "description": "Font size in SVG user units."
                                  },
                                  "fontWeight": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 1000,
                                    "description": "CSS numeric font weight."
                                  },
                                  "letterSpacing": {
                                    "type": "number",
                                    "minimum": -2,
                                    "maximum": 4,
                                    "description": "Letter spacing in SVG user units."
                                  },
                                  "textTransform": {
                                    "type": "string",
                                    "enum": [
                                      "uppercase",
                                      "lowercase",
                                      "capitalize"
                                    ],
                                    "description": "Text transformation."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "bendRadius": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 256,
                                    "description": "Applicable connector bend radius."
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "pie-slice": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "cue": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "outline",
                                      "double-line",
                                      "pattern"
                                    ],
                                    "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                  }
                                }
                              },
                              "legend": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "textColor": {
                                    "type": "string",
                                    "description": "Text paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  }
                                }
                              },
                              "bar": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 4,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  }
                                }
                              },
                              "series": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 3,
                                "properties": {
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  }
                                }
                              },
                              "point": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 4,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  }
                                }
                              },
                              "task": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "cue": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "outline",
                                      "double-line",
                                      "pattern"
                                    ],
                                    "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                  }
                                }
                              },
                              "milestone": {
                                "type": "object",
                                "additionalProperties": false,
                                "maxProperties": 5,
                                "properties": {
                                  "fillColor": {
                                    "type": "string",
                                    "description": "Surface fill paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "borderColor": {
                                    "type": "string",
                                    "description": "Border paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "strokeColor": {
                                    "type": "string",
                                    "description": "Connector stroke paint.",
                                    "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                  },
                                  "lineWidth": {
                                    "type": "number",
                                    "exclusiveMinimum": 0,
                                    "maximum": 20,
                                    "description": "Border or connector width."
                                  },
                                  "cue": {
                                    "type": "string",
                                    "enum": [
                                      "none",
                                      "outline",
                                      "double-line",
                                      "pattern"
                                    ],
                                    "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                  }
                                }
                              }
                            }
                          },
                          "semanticSlots": {
                            "type": "object",
                            "description": "Named brand-neutral role-style slots selected by semantic bindings.",
                            "maxProperties": 4096,
                            "propertyNames": {
                              "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
                              "not": {
                                "enum": [
                                  "__proto__",
                                  "constructor",
                                  "prototype"
                                ]
                              }
                            },
                            "additionalProperties": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 16,
                              "properties": {
                                "fontFamily": {
                                  "type": "string",
                                  "description": "Safe font family/stack for roles whose descriptor exposes family-specific typography.",
                                  "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                                },
                                "fontSize": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 256,
                                  "description": "Font size in SVG user units."
                                },
                                "fontWeight": {
                                  "type": "number",
                                  "minimum": 1,
                                  "maximum": 1000,
                                  "description": "CSS numeric font weight."
                                },
                                "letterSpacing": {
                                  "type": "number",
                                  "minimum": -2,
                                  "maximum": 4,
                                  "description": "Letter spacing in SVG user units."
                                },
                                "textTransform": {
                                  "type": "string",
                                  "enum": [
                                    "uppercase",
                                    "lowercase",
                                    "capitalize"
                                  ],
                                  "description": "Text transformation."
                                },
                                "textColor": {
                                  "type": "string",
                                  "description": "Text paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "paddingX": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Horizontal role padding."
                                },
                                "paddingY": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Vertical role padding."
                                },
                                "cornerRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable corner radius."
                                },
                                "lineWidth": {
                                  "type": "number",
                                  "exclusiveMinimum": 0,
                                  "maximum": 20,
                                  "description": "Border or connector width."
                                },
                                "bendRadius": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 256,
                                  "description": "Applicable connector bend radius."
                                },
                                "fillColor": {
                                  "type": "string",
                                  "description": "Surface fill paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "borderColor": {
                                  "type": "string",
                                  "description": "Border paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "strokeColor": {
                                  "type": "string",
                                  "description": "Connector stroke paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "headerFillColor": {
                                  "type": "string",
                                  "description": "Group header surface paint.",
                                  "x-agentic-mermaid-runtime-validator": "safeStylePaint"
                                },
                                "cue": {
                                  "type": "string",
                                  "enum": [
                                    "none",
                                    "outline",
                                    "double-line",
                                    "pattern"
                                  ],
                                  "description": "Non-color semantic cue on roles whose family renderer exposes a cue projection."
                                }
                              }
                            }
                          },
                          "bindings": {
                            "type": "array",
                            "description": "Ordered equality bindings from authored/domain meaning to semantic slots.",
                            "maxItems": 4096,
                            "items": {
                              "type": "object",
                              "additionalProperties": false,
                              "maxProperties": 4,
                              "required": [
                                "channel",
                                "value",
                                "slot"
                              ],
                              "properties": {
                                "channel": {
                                  "type": "string",
                                  "enum": [
                                    "category"
                                  ]
                                },
                                "value": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256,
                                  "pattern": "^[^\\r\\n\\u0000]+$"
                                },
                                "slot": {
                                  "type": "string",
                                  "pattern": "^[A-Za-z][A-Za-z0-9._-]{0,63}$",
                                  "not": {
                                    "enum": [
                                      "__proto__",
                                      "constructor",
                                      "prototype"
                                    ]
                                  }
                                },
                                "role": {
                                  "type": "string",
                                  "enum": [
                                    "group-header",
                                    "actor",
                                    "relationship",
                                    "pie-slice",
                                    "legend",
                                    "bar",
                                    "series",
                                    "point",
                                    "task",
                                    "milestone"
                                  ]
                                }
                              }
                            }
                          },
                          "constraints": {
                            "type": "array",
                            "description": "Closed inspect-only brand constraints with warn or error actions.",
                            "maxItems": 4096,
                            "items": {
                              "oneOf": [
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "kind",
                                    "action"
                                  ],
                                  "properties": {
                                    "kind": {
                                      "const": "contrast"
                                    },
                                    "action": {
                                      "type": "string",
                                      "enum": [
                                        "warn",
                                        "error"
                                      ]
                                    },
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "node",
                                        "edge",
                                        "edge-label",
                                        "group",
                                        "group-header",
                                        "label",
                                        "actor",
                                        "lifeline",
                                        "activation",
                                        "message",
                                        "block",
                                        "note",
                                        "class-box",
                                        "member",
                                        "entity",
                                        "attribute",
                                        "relationship",
                                        "cardinality",
                                        "pie-slice",
                                        "legend",
                                        "bar",
                                        "series",
                                        "point",
                                        "axis",
                                        "grid",
                                        "plate",
                                        "section",
                                        "task",
                                        "milestone",
                                        "marker-line",
                                        "rail",
                                        "period",
                                        "event",
                                        "score",
                                        "actor-pill",
                                        "service",
                                        "junction",
                                        "icon",
                                        "title",
                                        "defs",
                                        "prelude",
                                        "chrome"
                                      ]
                                    },
                                    "minimum": {
                                      "type": "number",
                                      "minimum": 1,
                                      "maximum": 21
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "kind",
                                    "action",
                                    "maxFraction"
                                  ],
                                  "properties": {
                                    "kind": {
                                      "const": "accent-area"
                                    },
                                    "action": {
                                      "type": "string",
                                      "enum": [
                                        "warn",
                                        "error"
                                      ]
                                    },
                                    "maxFraction": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    }
                                  }
                                },
                                {
                                  "type": "object",
                                  "additionalProperties": false,
                                  "required": [
                                    "kind",
                                    "action",
                                    "role"
                                  ],
                                  "properties": {
                                    "kind": {
                                      "const": "mono-role"
                                    },
                                    "action": {
                                      "type": "string",
                                      "enum": [
                                        "warn",
                                        "error"
                                      ]
                                    },
                                    "role": {
                                      "type": "string",
                                      "enum": [
                                        "node",
                                        "edge",
                                        "edge-label",
                                        "group",
                                        "group-header",
                                        "label",
                                        "actor",
                                        "lifeline",
                                        "activation",
                                        "message",
                                        "block",
                                        "note",
                                        "class-box",
                                        "member",
                                        "entity",
                                        "attribute",
                                        "relationship",
                                        "cardinality",
                                        "pie-slice",
                                        "legend",
                                        "bar",
                                        "series",
                                        "point",
                                        "axis",
                                        "grid",
                                        "plate",
                                        "section",
                                        "task",
                                        "milestone",
                                        "marker-line",
                                        "rail",
                                        "period",
                                        "event",
                                        "score",
                                        "actor-pill",
                                        "service",
                                        "junction",
                                        "icon",
                                        "title",
                                        "defs",
                                        "prelude",
                                        "chrome"
                                      ]
                                    }
                                  }
                                }
                              ]
                            }
                          },
                          "stroke": {
                            "type": "string",
                            "enum": [
                              "crisp",
                              "jittered",
                              "freehand"
                            ],
                            "description": "Stroke treatment; crisp is the default renderer."
                          },
                          "roughness": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 10,
                            "description": "Rough.js stroke irregularity."
                          },
                          "bowing": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 10,
                            "description": "Rough.js line bowing."
                          },
                          "passes": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 8,
                            "description": "Number of sketch strokes; 1 is single-pass and 2 is the usual double stroke."
                          },
                          "strokeWidth": {
                            "type": "number",
                            "exclusiveMinimum": 0,
                            "maximum": 20,
                            "description": "Base stroke width in SVG user units."
                          },
                          "fill": {
                            "type": "string",
                            "enum": [
                              "none",
                              "hachure",
                              "solid",
                              "wash"
                            ],
                            "description": "Fill policy for rough/hybrid rendering; none and solid require a final stack that activates one of those backends."
                          },
                          "hachureAngle": {
                            "type": "number",
                            "minimum": -360,
                            "maximum": 360,
                            "description": "Hachure line angle in degrees; requires fill hachure in the final stack."
                          },
                          "hachureGap": {
                            "type": "number",
                            "exclusiveMinimum": 0,
                            "maximum": 100,
                            "description": "Gap between hachure lines; requires fill hachure in the final stack."
                          },
                          "fillWeight": {
                            "type": "number",
                            "exclusiveMinimum": 0,
                            "maximum": 20,
                            "description": "Hachure line weight; requires fill hachure in the final stack."
                          },
                          "washOpacity": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1,
                            "description": "Watercolor glaze opacity; requires fill wash in the final stack."
                          },
                          "washEdge": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1,
                            "description": "Watercolor edge-darkening opacity; requires fill wash in the final stack."
                          },
                          "backdrop": {
                            "type": "string",
                            "enum": [
                              "plain",
                              "paper-ruled",
                              "grid"
                            ],
                            "description": "Flat page furniture drawn behind the diagram."
                          },
                          "intent": {
                            "type": "string",
                            "enum": [
                              "premium",
                              "draft",
                              "lofi"
                            ],
                            "description": "Advisory intent metadata for pickers and quality tooling."
                          },
                          "mono": {
                            "type": "boolean",
                            "description": "Advisory monochrome contract: express tone through shading and weight."
                          }
                        }
                      }
                    ],
                    "x-agentic-mermaid-validation-expectation": "a registered Style name or StyleSpec"
                  },
                  "description": "Style stack merged from left to right."
                }
              ],
              "description": "A registered name, inline StyleSpec, or left-to-right stack of either.",
              "x-agentic-mermaid-runtime-validator": "styleInput",
              "x-agentic-mermaid-terminal": "consumed"
            },
            "padding": {
              "type": "number",
              "description": "Canvas padding in SVG user units.",
              "default": 40,
              "minimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output uses paddingX, paddingY, and boxBorderPadding",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart",
                "state",
                "architecture"
              ]
            },
            "nodeSpacing": {
              "type": "number",
              "description": "Horizontal spacing between sibling nodes.",
              "default": 24,
              "minimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal layout has a cell-grid spacing contract",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart",
                "state",
                "class",
                "er",
                "architecture"
              ]
            },
            "layerSpacing": {
              "type": "number",
              "description": "Vertical spacing between graph layers.",
              "default": 40,
              "minimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal layout has a cell-grid spacing contract",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart",
                "state",
                "class",
                "er",
                "architecture"
              ]
            },
            "wrappingWidth": {
              "type": "number",
              "description": "Flowchart measured-label wrapping budget in pixels.",
              "exclusiveMinimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output uses maxWidth or targetWidth",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart"
              ]
            },
            "componentSpacing": {
              "type": "number",
              "description": "Spacing between disconnected graph components for compatible extension families; no built-in family currently consumes it.",
              "minimum": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal layout has a cell-grid spacing contract",
              "x-agentic-mermaid-applicable-builtin-families": []
            },
            "transparent": {
              "type": "boolean",
              "description": "Omit the painted SVG canvas background.",
              "default": false,
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "terminal output has no painted canvas background"
            },
            "interactive": {
              "type": "boolean",
              "description": "Enable hover tooltips for supported chart data points.",
              "default": false,
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "terminal output is a static semantic projection",
              "x-agentic-mermaid-applicable-builtin-families": [
                "xychart",
                "pie",
                "quadrant"
              ]
            },
            "shadow": {
              "type": "boolean",
              "description": "Paint explicit drop shadows on node shapes.",
              "default": false,
              "x-agentic-mermaid-terminal": "projected",
              "x-agentic-mermaid-terminal-note": "elevation projects to borders and labels",
              "x-agentic-mermaid-applicable-builtin-families": [
                "flowchart",
                "state",
                "sequence",
                "timeline",
                "class",
                "er",
                "journey",
                "xychart",
                "pie",
                "quadrant",
                "gantt",
                "mindmap",
                "gitgraph"
              ]
            },
            "class": {
              "type": "object",
              "description": "Class-diagram rendering controls.",
              "additionalProperties": false,
              "properties": {
                "hierarchicalNamespaces": {
                  "type": "boolean",
                  "description": "Nest namespace compounds.",
                  "default": true
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "this option configures graphical class layout",
              "x-agentic-mermaid-applicable-builtin-families": [
                "class"
              ]
            },
            "architecture": {
              "type": "object",
              "description": "Architecture renderer visual metric and paint overrides.",
              "additionalProperties": false,
              "properties": {
                "visual": {
                  "type": "object",
                  "description": "Sparse architecture visual overrides merged over resolved defaults.",
                  "additionalProperties": false,
                  "properties": {
                    "groupHeaderHeight": {
                      "type": "number",
                      "description": "Architecture group-header height.",
                      "exclusiveMinimum": 0
                    },
                    "groupFontSize": {
                      "type": "number",
                      "description": "Architecture group-label font size.",
                      "exclusiveMinimum": 0
                    },
                    "groupFontWeight": {
                      "type": "number",
                      "description": "Architecture group-label font weight.",
                      "minimum": 1,
                      "maximum": 1000
                    },
                    "groupLetterSpacing": {
                      "type": "number",
                      "description": "Architecture group-label letter spacing."
                    },
                    "groupFont": {
                      "type": "string",
                      "description": "Architecture group-label font family.",
                      "x-agentic-mermaid-runtime-validator": "safeCssFontFamily"
                    },
                    "groupTextTransform": {
                      "type": "string",
                      "enum": [
                        "uppercase",
                        "lowercase",
                        "capitalize"
                      ],
                      "description": "Architecture group-label text transform."
                    },
                    "groupPaddingX": {
                      "type": "number",
                      "description": "Horizontal padding inside architecture groups.",
                      "minimum": 0
                    },
                    "groupPaddingY": {
                      "type": "number",
                      "description": "Vertical padding inside architecture groups.",
                      "minimum": 0
                    },
                    "groupLabelPaddingX": {
                      "type": "number",
                      "description": "Horizontal padding around architecture group labels.",
                      "minimum": 0
                    },
                    "groupCornerRadius": {
                      "type": "number",
                      "description": "Architecture group corner radius.",
                      "minimum": 0
                    },
                    "groupLineWidth": {
                      "type": "number",
                      "description": "Architecture group border width.",
                      "minimum": 0
                    },
                    "groupText": {
                      "type": "string",
                      "description": "Architecture group-label color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "serviceFontSize": {
                      "type": "number",
                      "description": "Architecture service-label font size.",
                      "exclusiveMinimum": 0
                    },
                    "serviceFontWeight": {
                      "type": "number",
                      "description": "Architecture service-label font weight.",
                      "minimum": 1,
                      "maximum": 1000
                    },
                    "serviceLetterSpacing": {
                      "type": "number",
                      "description": "Architecture service-label letter spacing."
                    },
                    "serviceTextTransform": {
                      "type": "string",
                      "enum": [
                        "uppercase",
                        "lowercase",
                        "capitalize"
                      ],
                      "description": "Architecture service-label text transform."
                    },
                    "servicePaddingX": {
                      "type": "number",
                      "description": "Horizontal padding inside architecture services.",
                      "minimum": 0
                    },
                    "servicePaddingY": {
                      "type": "number",
                      "description": "Vertical padding inside architecture services.",
                      "minimum": 0
                    },
                    "serviceCornerRadius": {
                      "type": "number",
                      "description": "Architecture service corner radius.",
                      "minimum": 0
                    },
                    "serviceLineWidth": {
                      "type": "number",
                      "description": "Architecture service border width.",
                      "minimum": 0
                    },
                    "serviceText": {
                      "type": "string",
                      "description": "Architecture service-label color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "edgeFontSize": {
                      "type": "number",
                      "description": "Architecture connector-label font size.",
                      "exclusiveMinimum": 0
                    },
                    "edgeFontWeight": {
                      "type": "number",
                      "description": "Architecture connector-label font weight.",
                      "minimum": 1,
                      "maximum": 1000
                    },
                    "edgeLetterSpacing": {
                      "type": "number",
                      "description": "Architecture connector-label letter spacing."
                    },
                    "edgeTextTransform": {
                      "type": "string",
                      "enum": [
                        "uppercase",
                        "lowercase",
                        "capitalize"
                      ],
                      "description": "Architecture connector-label text transform."
                    },
                    "edgeLineWidth": {
                      "type": "number",
                      "description": "Architecture connector width.",
                      "minimum": 0
                    },
                    "edgeBendRadius": {
                      "type": "number",
                      "description": "Architecture connector bend radius.",
                      "minimum": 0
                    },
                    "edgeStroke": {
                      "type": "string",
                      "description": "Architecture connector color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "edgeText": {
                      "type": "string",
                      "description": "Architecture connector-label color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "iconSize": {
                      "type": "number",
                      "description": "Architecture group icon size.",
                      "exclusiveMinimum": 0
                    },
                    "serviceIconSize": {
                      "type": "number",
                      "description": "Architecture service icon size.",
                      "exclusiveMinimum": 0
                    },
                    "junctionOuterRadius": {
                      "type": "number",
                      "description": "Architecture junction outer radius.",
                      "exclusiveMinimum": 0
                    },
                    "junctionInnerRadius": {
                      "type": "number",
                      "description": "Architecture junction inner radius.",
                      "minimum": 0
                    },
                    "groupSurface": {
                      "type": "string",
                      "description": "Architecture group surface color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "groupHeaderSurface": {
                      "type": "string",
                      "description": "Architecture group-header surface color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "groupBorder": {
                      "type": "string",
                      "description": "Architecture group border color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "serviceSurface": {
                      "type": "string",
                      "description": "Architecture service surface color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    },
                    "serviceBorder": {
                      "type": "string",
                      "description": "Architecture service border color.",
                      "x-agentic-mermaid-runtime-validator": "safeCssPaint"
                    }
                  },
                  "x-agentic-mermaid-runtime-validator": "architectureVisual"
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "this option configures graphical architecture rendering",
              "x-agentic-mermaid-applicable-builtin-families": [
                "architecture"
              ]
            },
            "timeline": {
              "type": "object",
              "description": "Timeline layout controls.",
              "additionalProperties": false,
              "properties": {
                "maxWidth": {
                  "type": "number",
                  "description": "Best-effort width budget for horizontal timelines.",
                  "exclusiveMinimum": 0
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output uses maxWidth or targetWidth",
              "x-agentic-mermaid-applicable-builtin-families": [
                "timeline"
              ]
            },
            "journey": {
              "type": "object",
              "description": "User-journey graphical controls.",
              "additionalProperties": false,
              "properties": {
                "experienceCurve": {
                  "type": "boolean",
                  "description": "Connect journey score markers with an experience curve.",
                  "default": true
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "experience curves are graphical-only",
              "x-agentic-mermaid-applicable-builtin-families": [
                "journey"
              ]
            },
            "gantt": {
              "type": "object",
              "description": "Gantt dependency and critical-path overlays.",
              "additionalProperties": false,
              "properties": {
                "dependencyArrows": {
                  "type": "boolean",
                  "description": "Draw scheduled dependency connectors.",
                  "default": false
                },
                "criticalPath": {
                  "type": "boolean",
                  "description": "Emphasize critical-path tasks and connectors.",
                  "default": false
                }
              },
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "graphical Gantt connector emphasis is not represented in cells",
              "x-agentic-mermaid-applicable-builtin-families": [
                "gantt"
              ]
            },
            "mermaidConfig": {
              "type": "object",
              "description": "Mermaid-style recursive runtime configuration.",
              "additionalProperties": {
                "$ref": "#/$defs/jsonValue"
              },
              "x-agentic-mermaid-terminal": "consumed"
            },
            "embedFontImport": {
              "type": "boolean",
              "description": "Embed the Google Fonts import in SVG styles; PNG forces this off for offline rasterization.",
              "default": false,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output embeds no web-font import"
            },
            "compact": {
              "type": "boolean",
              "description": "Compact SVG serialization while preserving agent hooks.",
              "default": false,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "compact controls SVG serialization"
            },
            "idPrefix": {
              "type": "string",
              "description": "Non-empty namespace for generated SVG definition IDs and local references.",
              "pattern": "^[A-Za-z0-9_.:-]+$",
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal output has no SVG definition ids"
            },
            "security": {
              "type": "string",
              "enum": [
                "default",
                "strict"
              ],
              "description": "Active SVG content is rejected in every mode; strict additionally rejects every external reference. Raw Mermaid themeCSS is rejected in both modes.",
              "default": "default",
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal text has its own control-character and HTML-color safety projection"
            },
            "ganttToday": {
              "type": "string",
              "description": "Explicit deterministic date for the Gantt today marker.",
              "x-agentic-mermaid-terminal": "consumed",
              "x-agentic-mermaid-applicable-builtin-families": [
                "gantt"
              ]
            },
            "seed": {
              "type": "number",
              "description": "Deterministic re-roll seed for stochastic Styles.",
              "default": 0,
              "x-agentic-mermaid-terminal": "not-applicable",
              "x-agentic-mermaid-terminal-note": "terminal glyph geometry is deterministic and has no stochastic ink"
            }
          },
          "$defs": {
            "jsonValue": {
              "anyOf": [
                {
                  "type": "null"
                },
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                },
                {
                  "type": "array",
                  "items": {
                    "$ref": "#/$defs/jsonValue"
                  }
                },
                {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/$defs/jsonValue"
                  }
                }
              ],
              "description": "A finite, acyclic JSON value without prototype keys.",
              "x-agentic-mermaid-validation-expectation": "a finite, acyclic JSON value without prototype keys"
            }
          },
          "description": "Shared advanced RenderOptions object.",
          "required": false
        }
      }
    },
    {
      "name": "verify",
      "title": "Verify Mermaid diagram",
      "description": "Parse and verify a Mermaid diagram without rendering it. Returns { ok, family, summary, warnings, layout: { bounds, nodes, edges } } for valid diagrams and { ok: false, errors } for parse failures. `family` is the detected diagram family and `summary` a one-line description — check them: ok:true only means the diagram is structurally valid, not that it is the kind you intended. Warnings use the layout-rubric codes.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "parameters": {
        "source": {
          "type": "string",
          "description": "Mermaid source.",
          "required": true
        }
      }
    },
    {
      "name": "describe",
      "title": "Describe Mermaid diagram",
      "description": "Describe a Mermaid diagram. format=text returns { ok, text } with one or two summary sentences; format=json returns { ok, tree } with the AX tree; format=facts returns { ok, facts } with deterministic semantic fact lines for machine checking (for example edge A -> B : label, member Duck +quack()).",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "parameters": {
        "source": {
          "type": "string",
          "description": "Mermaid source.",
          "required": true
        },
        "format": {
          "type": "string",
          "enum": [
            "text",
            "json",
            "facts"
          ],
          "description": "text (default), json AX tree, or facts semantic read-back.",
          "required": false
        }
      }
    },
    {
      "name": "mutate",
      "title": "Edit Mermaid diagram",
      "description": "Apply a list of structured edit ops to an existing Mermaid `source` and return the edited diagram. This is the declarative counterpart to `execute`: plain JSON in, plain JSON out, no sandbox. Prefer it for straightforward edits; reserve `execute` for logic the ops don't express. Returns { ok, family, source, verify:{ ok, warnings } } on success, or { ok:false, family, opIndex, error } — where `error` names the offending field and lists the valid ones — when an op is malformed or cannot apply. Ops apply in order and are all-or-nothing: the first failing op stops the batch (its position is `opIndex`) and the input is left untouched. Each op is { \"kind\": <op>, …fields }. Call `describe_sdk` ...",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "parameters": {
        "source": {
          "type": "string",
          "description": "Mermaid source to edit.",
          "required": true
        },
        "ops": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object"
          },
          "description": "Non-empty ordered list of edit ops; each is { kind, ...fields }.",
          "required": true
        }
      }
    },
    {
      "name": "build",
      "title": "Build Mermaid diagram",
      "description": "Author a new Mermaid diagram from blank by folding a list of structured ops over an empty diagram of `family`. The declarative counterpart to hand-writing source. Returns the same envelope as `mutate`: { ok, family, source, verify } or { ok:false, family, opIndex, error }. Call `describe_sdk` for the family before authoring unfamiliar ops.",
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      },
      "parameters": {
        "family": {
          "type": "string",
          "description": "Diagram family to author (one of: flowchart, state, sequence, timeline, class, er, journey, architecture, xychart, pie, quadrant, gantt, mindmap, gitgraph, radar).",
          "required": true
        },
        "ops": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "object"
          },
          "description": "Non-empty ordered list of ops; each is { kind, ...fields }.",
          "required": true
        }
      }
    }
  ],
  "generatedFrom": {
    "packageVersion": "0.4.1",
    "gitSha": "d2d821cb07f46d39770c3b731c346ef0c22ea773",
    "buildTime": "2026-07-31T11:27:14Z"
  }
}
