{
  "openapi": "3.1.1",
  "info": {
    "title": "Panelcraft API",
    "version": "1.0.0",
    "summary": "Deterministic tools for people and AI agents.",
    "description": "Every endpoint performs the same calculation as the human page and returns inputs, result, units, assumptions, sources, warnings and computedAt. MCP endpoint: /mcp."
  },
  "servers": [
    {
      "url": "https://panelcraft.usefulweb.app"
    }
  ],
  "paths": {
    "/api/v1/tools": {
      "get": {
        "operationId": "listTools",
        "summary": "Catalog of all tools",
        "responses": {
          "200": {
            "description": "Tool list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/{id}": {
      "get": {
        "operationId": "getTool",
        "summary": "Definition of one tool",
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "panelcraft-book-plan",
                "panelcraft-figure-reference",
                "flipline-comic-page",
                "flipline-screentone"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tool definition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/panelcraft-book-plan/calculate": {
      "post": {
        "operationId": "calculatePanelcraftBookPlan",
        "summary": "Plan a multi-page comic, contact sheet and folded booklet order.",
        "description": "Create an editable Panelcraft comic book with ordered pages and panel grids. Export a clean SVG contact sheet, complete lettering CSV and book project, plus a deterministic sheet-front and sheet-back imposition plan for a folded booklet.\n\nMethodology:\n- Create 1–12 pages using the same bounded Comic Desk page parser as the interactive workspace. Each page has 1–12 rectangular panels; page dimensions are 1000 × 1400 px at 150 DPI.\n- A contact sheet uses 360 px thumbnails, up to four columns, unique SVG definition IDs and a maximum area of 8 megapixels. It is an overview, not a print-size page export.\n- Booklet page count rounds up to a multiple of four. Sheet fronts pair the last and first remaining pages; backs pair the second and penultimate. Pages beyond the source count are blanks. Right-to-left binding reverses each pair. Consult the printer manual for duplex orientation.\n\nImposition is a page-order plan for manually arranging a folded booklet. It does not rescale pages to a printer sheet or set printer-specific duplex options.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "panelcraft_book_plan",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PanelcraftBookPlanInput"
              },
              "examples": {
                "example1": {
                  "summary": "An eight-page pocket comic",
                  "value": {}
                },
                "example2": {
                  "summary": "A six-page right-to-left draft",
                  "value": {
                    "pages": 6,
                    "reading": "rtl",
                    "rows": 1,
                    "columns": 2
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PanelcraftBookPlanResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/panelcraft-figure-reference/calculate": {
      "post": {
        "operationId": "calculatePanelcraftFigureReference",
        "summary": "Create a stylized posed mannequin, drawing reference and reusable 3D scene.",
        "description": "Choose height, artistic proportions and one of eight original poses. Export single-view and four-view vector drawing references, a low-poly OBJ and editable figure or Form Studio projects; continue refining joint angles in Figure Lab.\n\nMethodology:\n- Original procedural geometry with millimetres and Z up; no MakeHuman meshes, assets or source code are included. Height is the neutral design height; bent poses occupy a different bounding box.\n- Arms and legs are constant-length articulated segments. Shoulder abduction and flex, elbow flex, hip flex and knee flex are in degrees. A lowest-vertex translation places the posed mesh on the ground.\n- The figure consists of separate ten-sided extruded solids. OBJ contains triangles in millimetres, without skinning, UVs, face detail, clothing or animation. SVG is an orthographic painter-order reference, not a production renderer.\n\nA stylized jointed mannequin for art and scene blocking. Proportions are artistic controls, not anatomical, medical or ergonomic measurements.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "panelcraft_figure_reference",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PanelcraftFigureReferenceInput"
              },
              "examples": {
                "example1": {
                  "summary": "A neutral drawing reference",
                  "value": {}
                },
                "example2": {
                  "summary": "A seated figure in three quarters",
                  "value": {
                    "pose": "figure-seated",
                    "azimuth": -55,
                    "elevation": 25
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PanelcraftFigureReferenceResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/flipline-comic-page/calculate": {
      "post": {
        "operationId": "calculateFliplineComicPage",
        "summary": "Plan comic panels, reading order and dialogue in an editable page.",
        "description": "Create a comic page from a grid and one dialogue line per panel. Choose reading direction and print resolution, add optional rough figures, and download an SVG, lettering CSV and editable Flipline Comic Desk project.\n\nMethodology:\n- Comic pages are 400–2400 px wide, 400–4000 px high and at most 6 megapixels. A grid contains 1–12 panels and a page supports 36 balloons. Reading order follows spatial rows, left-to-right or right-to-left.\n- One input line creates one speech balloon in reading order. Wrapping estimates system sans-serif widths and reduces lettering to fit, down to 12 px. Overflow is rejected for tool exports; original text remains in the editable project. Review glyph layout before printing.\n- SVG dimensions use millimetres = pixels / DPI × 25.4. Lettering CSV follows reading order and guards formula-like leading characters. Optional figures are authored geometric staging, not generated illustrations.\n\nIndependent page-layout tool. No MediBang project import, CMYK conversion or exact font-metric guarantee.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "flipline_comic_page",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FliplineComicPageInput"
              },
              "examples": {
                "example1": {
                  "summary": "Four panels and a small discovery",
                  "value": {}
                },
                "example2": {
                  "summary": "A right-to-left conversation",
                  "value": {
                    "reading": "rtl",
                    "rows": 1,
                    "columns": 2,
                    "dialogue": "Did you see it?\nThere, by the window."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FliplineComicPageResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tools/flipline-screentone/calculate": {
      "post": {
        "operationId": "calculateFliplineScreentone",
        "summary": "Make dot, line and crosshatch tones with explicit pitch, coverage and print scale.",
        "description": "Generate a repeating vector screentone, inspect its nominal ink coverage and lines per inch, and download an SVG or reusable tone recipe. Open it as a Comic Desk study or apply the recipe to an existing panel.\n\nMethodology:\n- Pitch is the repeating cell size in source pixels. Nominal lines per inch = DPI / pitch; physical size in mm = pixels / DPI × 25.4. No printer-specific dot gain or color conversion is modelled.\n- For dots, radius = pitch × sqrt(coverage / π). Parallel stripe width = pitch × coverage. For perpendicular crosshatch, stripe width = pitch × (1 − sqrt(1 − coverage)), accounting for overlap. Pattern rotation preserves this nominal coverage.\n- Coverage is 5–75%, pitch 4–80 px and angle −90° to 90°. SVG keeps vector patterns; the tone recipe imports into Comic Desk with pitch rescaled to preserve lines per inch at the page DPI. Avoid resampling a rasterized tone to reduce moiré.\n\nNominal geometric coverage, not a measured ink density. Raster resampling and printing can introduce moiré.",
        "tags": [
          "apps"
        ],
        "x-mcp-tool": "flipline_screentone",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FliplineScreentoneInput"
              },
              "examples": {
                "example1": {
                  "summary": "A 20% dot tone",
                  "value": {}
                },
                "example2": {
                  "summary": "A 35% crosshatch",
                  "value": {
                    "pattern": "crosshatch",
                    "coverage": 35,
                    "angle": 0,
                    "pitch": 20
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FliplineScreentoneResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/workflows": {
      "get": {
        "operationId": "listWorkflows",
        "summary": "Multi-tool workflows",
        "responses": {
          "200": {
            "description": "Workflow list.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. 422 responses include per-field `errors`.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "PanelcraftBookPlanInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "title": "Book title",
            "type": "string",
            "maxLength": 120,
            "default": "A small adventure"
          },
          "author": {
            "title": "Author or credit",
            "type": "string",
            "maxLength": 120,
            "default": ""
          },
          "pages": {
            "title": "Book pages",
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "default": 8
          },
          "rows": {
            "title": "Panel rows",
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "default": 2
          },
          "columns": {
            "title": "Panel columns",
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "default": 2
          },
          "reading": {
            "title": "Reading and binding direction",
            "type": "string",
            "enum": [
              "ltr",
              "rtl"
            ],
            "default": "ltr"
          },
          "sheetColumns": {
            "title": "Contact-sheet columns",
            "type": "integer",
            "minimum": 1,
            "maximum": 4,
            "default": 3
          }
        },
        "required": []
      },
      "PanelcraftBookPlanResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "project",
              "report",
              "imposition",
              "contactSheet",
              "projectFile",
              "letteringCsv",
              "openInApp"
            ],
            "properties": {
              "project": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "format",
                  "version",
                  "name",
                  "author",
                  "reading",
                  "pages"
                ],
                "properties": {
                  "format": {
                    "const": "panelcraft-book"
                  },
                  "version": {
                    "const": 1
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "author": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "reading": {
                    "enum": [
                      "ltr",
                      "rtl"
                    ]
                  },
                  "pages": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 12,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "id",
                        "notes",
                        "comic"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[-a-zA-Z0-9_]{1,64}$"
                        },
                        "notes": {
                          "type": "string",
                          "maxLength": 2000
                        },
                        "comic": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "format",
                            "version",
                            "name",
                            "width",
                            "height",
                            "dpi",
                            "margin",
                            "gutter",
                            "border",
                            "paper",
                            "reading",
                            "panels",
                            "balloons",
                            "artwork"
                          ],
                          "properties": {
                            "format": {
                              "const": "flipline-comic"
                            },
                            "version": {
                              "const": 1
                            },
                            "name": {
                              "type": "string",
                              "maxLength": 120
                            },
                            "width": {
                              "type": "integer",
                              "minimum": 400,
                              "maximum": 2400
                            },
                            "height": {
                              "type": "integer",
                              "minimum": 400,
                              "maximum": 4000
                            },
                            "dpi": {
                              "type": "integer",
                              "minimum": 72,
                              "maximum": 600
                            },
                            "margin": {
                              "type": "number"
                            },
                            "gutter": {
                              "type": "number"
                            },
                            "border": {
                              "type": "number"
                            },
                            "paper": {
                              "type": "string"
                            },
                            "reading": {
                              "enum": [
                                "ltr",
                                "rtl"
                              ]
                            },
                            "panels": {
                              "type": "array",
                              "minItems": 1,
                              "maxItems": 12,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "id",
                                  "name",
                                  "x",
                                  "y",
                                  "width",
                                  "height",
                                  "paper",
                                  "fit",
                                  "zoom",
                                  "panX",
                                  "panY",
                                  "sourceWidth",
                                  "sourceHeight",
                                  "tone"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "maxLength": 64
                                  },
                                  "name": {
                                    "type": "string",
                                    "maxLength": 80
                                  },
                                  "x": {
                                    "type": "number"
                                  },
                                  "y": {
                                    "type": "number"
                                  },
                                  "width": {
                                    "type": "number"
                                  },
                                  "height": {
                                    "type": "number"
                                  },
                                  "paper": {
                                    "type": "string"
                                  },
                                  "fit": {
                                    "enum": [
                                      "contain",
                                      "cover"
                                    ]
                                  },
                                  "zoom": {
                                    "type": "number"
                                  },
                                  "panX": {
                                    "type": "number"
                                  },
                                  "panY": {
                                    "type": "number"
                                  },
                                  "sourceWidth": {
                                    "type": "integer"
                                  },
                                  "sourceHeight": {
                                    "type": "integer"
                                  },
                                  "tone": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                      "kind",
                                      "pitch",
                                      "coverage",
                                      "angle",
                                      "ink",
                                      "over"
                                    ],
                                    "properties": {
                                      "kind": {
                                        "enum": [
                                          "none",
                                          "dots",
                                          "lines",
                                          "crosshatch"
                                        ]
                                      },
                                      "pitch": {
                                        "type": "number",
                                        "minimum": 4,
                                        "maximum": 80
                                      },
                                      "coverage": {
                                        "type": "number",
                                        "minimum": 0.05,
                                        "maximum": 0.75
                                      },
                                      "angle": {
                                        "type": "number",
                                        "minimum": -90,
                                        "maximum": 90
                                      },
                                      "ink": {
                                        "type": "string",
                                        "pattern": "^#[a-fA-F0-9]{6}$"
                                      },
                                      "over": {
                                        "type": "boolean"
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "balloons": {
                              "type": "array",
                              "maxItems": 36,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "id",
                                  "panel",
                                  "kind",
                                  "x",
                                  "y",
                                  "width",
                                  "height",
                                  "tailX",
                                  "tailY",
                                  "text",
                                  "fontSize",
                                  "ink",
                                  "paper"
                                ],
                                "properties": {
                                  "id": {
                                    "type": "string",
                                    "maxLength": 64
                                  },
                                  "panel": {
                                    "type": "string",
                                    "maxLength": 64
                                  },
                                  "kind": {
                                    "enum": [
                                      "speech",
                                      "thought",
                                      "caption"
                                    ]
                                  },
                                  "x": {
                                    "type": "number"
                                  },
                                  "y": {
                                    "type": "number"
                                  },
                                  "width": {
                                    "type": "number"
                                  },
                                  "height": {
                                    "type": "number"
                                  },
                                  "tailX": {
                                    "type": "number"
                                  },
                                  "tailY": {
                                    "type": "number"
                                  },
                                  "text": {
                                    "type": "string",
                                    "maxLength": 600
                                  },
                                  "fontSize": {
                                    "type": "number"
                                  },
                                  "ink": {
                                    "type": "string"
                                  },
                                  "paper": {
                                    "type": "string"
                                  }
                                }
                              }
                            },
                            "artwork": {
                              "type": "object",
                              "additionalProperties": false,
                              "required": [
                                "format",
                                "version",
                                "name",
                                "width",
                                "height",
                                "fps",
                                "paper",
                                "boards"
                              ],
                              "properties": {
                                "format": {
                                  "const": "flipline-story"
                                },
                                "version": {
                                  "const": 1
                                },
                                "name": {
                                  "type": "string",
                                  "maxLength": 120
                                },
                                "width": {
                                  "type": "integer",
                                  "minimum": 32,
                                  "maximum": 1600
                                },
                                "height": {
                                  "type": "integer",
                                  "minimum": 32,
                                  "maximum": 1600
                                },
                                "fps": {
                                  "type": "integer",
                                  "minimum": 1,
                                  "maximum": 30
                                },
                                "paper": {
                                  "type": "string",
                                  "pattern": "^#[a-fA-F0-9]{6}$"
                                },
                                "boards": {
                                  "type": "array",
                                  "minItems": 1,
                                  "maxItems": 48,
                                  "items": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                      "id",
                                      "title",
                                      "scene",
                                      "shot",
                                      "camera",
                                      "frames",
                                      "action",
                                      "dialogue",
                                      "notes",
                                      "locked",
                                      "marks",
                                      "reference"
                                    ],
                                    "properties": {
                                      "id": {
                                        "type": "string",
                                        "pattern": "^[-a-zA-Z0-9_]{1,80}$"
                                      },
                                      "title": {
                                        "type": "string",
                                        "maxLength": 80
                                      },
                                      "scene": {
                                        "type": "string",
                                        "maxLength": 80
                                      },
                                      "shot": {
                                        "enum": [
                                          "wide",
                                          "medium",
                                          "close",
                                          "detail",
                                          "over-shoulder"
                                        ]
                                      },
                                      "camera": {
                                        "enum": [
                                          "static",
                                          "pan-left",
                                          "pan-right",
                                          "tilt-up",
                                          "tilt-down",
                                          "push-in",
                                          "pull-out",
                                          "handheld"
                                        ]
                                      },
                                      "frames": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 3600
                                      },
                                      "action": {
                                        "type": "string",
                                        "maxLength": 1200
                                      },
                                      "dialogue": {
                                        "type": "string",
                                        "maxLength": 1200
                                      },
                                      "notes": {
                                        "type": "string",
                                        "maxLength": 1200
                                      },
                                      "locked": {
                                        "type": "boolean"
                                      },
                                      "marks": {
                                        "type": "array",
                                        "maxItems": 500,
                                        "items": {
                                          "type": "object",
                                          "additionalProperties": false,
                                          "required": [
                                            "id",
                                            "kind",
                                            "points",
                                            "color",
                                            "size",
                                            "fill"
                                          ],
                                          "properties": {
                                            "brush": {
                                              "type": "object",
                                              "additionalProperties": false,
                                              "required": [
                                                "kind",
                                                "opacity",
                                                "flow",
                                                "spacing",
                                                "texture",
                                                "pressure",
                                                "seed"
                                              ],
                                              "properties": {
                                                "kind": {
                                                  "enum": [
                                                    "ink",
                                                    "pencil",
                                                    "marker",
                                                    "wash",
                                                    "airbrush"
                                                  ]
                                                },
                                                "opacity": {
                                                  "type": "number",
                                                  "minimum": 0,
                                                  "maximum": 1
                                                },
                                                "flow": {
                                                  "type": "number",
                                                  "minimum": 0,
                                                  "maximum": 1
                                                },
                                                "spacing": {
                                                  "type": "number",
                                                  "minimum": 0.08,
                                                  "maximum": 1
                                                },
                                                "texture": {
                                                  "type": "number",
                                                  "minimum": 0,
                                                  "maximum": 1
                                                },
                                                "pressure": {
                                                  "type": "boolean"
                                                },
                                                "seed": {
                                                  "type": "integer",
                                                  "minimum": 0,
                                                  "maximum": 4294967295
                                                }
                                              }
                                            },
                                            "pressures": {
                                              "type": "array",
                                              "minItems": 1,
                                              "maxItems": 4096,
                                              "items": {
                                                "type": "number",
                                                "minimum": 0,
                                                "maximum": 1
                                              }
                                            },
                                            "id": {
                                              "type": "string",
                                              "minLength": 1,
                                              "maxLength": 80
                                            },
                                            "kind": {
                                              "enum": [
                                                "pen",
                                                "eraser",
                                                "line",
                                                "rect",
                                                "ellipse",
                                                "image"
                                              ]
                                            },
                                            "points": {
                                              "type": "array",
                                              "minItems": 1,
                                              "maxItems": 4096,
                                              "items": {
                                                "type": "array",
                                                "minItems": 2,
                                                "maxItems": 2,
                                                "items": {
                                                  "type": "number",
                                                  "minimum": 0,
                                                  "maximum": 1
                                                }
                                              }
                                            },
                                            "color": {
                                              "type": "string",
                                              "pattern": "^#[a-fA-F0-9]{6}$"
                                            },
                                            "size": {
                                              "type": "number",
                                              "minimum": 1,
                                              "maximum": 100
                                            },
                                            "fill": {
                                              "type": "boolean"
                                            },
                                            "source": {
                                              "type": "string",
                                              "pattern": "^data:image/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$"
                                            },
                                            "angle": {
                                              "type": "number",
                                              "minimum": -360,
                                              "maximum": 360,
                                              "description": "Clockwise rotation in degrees around the center of the mark bounds (normalized to -180…180)."
                                            },
                                            "flipX": {
                                              "type": "boolean",
                                              "description": "Mirror horizontally around the mark center."
                                            },
                                            "flipY": {
                                              "type": "boolean",
                                              "description": "Mirror vertically around the mark center."
                                            }
                                          }
                                        }
                                      },
                                      "reference": {
                                        "type": [
                                          "object",
                                          "null"
                                        ],
                                        "additionalProperties": false,
                                        "required": [
                                          "source",
                                          "opacity",
                                          "visible"
                                        ],
                                        "properties": {
                                          "source": {
                                            "type": "string",
                                            "pattern": "^data:image/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$"
                                          },
                                          "opacity": {
                                            "type": "number",
                                            "minimum": 0,
                                            "maximum": 1
                                          },
                                          "visible": {
                                            "type": "boolean"
                                          }
                                        }
                                      }
                                    }
                                  }
                                }
                              },
                              "description": "Story Desk. Frame-based board durations, half-open timeline intervals and non-drop-frame timecodes. Up to 600 seconds total and 120 seconds per board at the chosen FPS. Canvas up to 2 MP, 50000 points, 2000 marks and 6 million source-image characters across all boards. Ink erasers affect preceding ink only; the independent reference is preserved. Camera moves are planning labels, not animated camera paths."
                            }
                          },
                          "description": "Comic Desk page. At most 6 MP, 12 panels and 36 balloons. Panel/artwork board IDs align by index. Shared Story Desk mark budgets apply; image marks are disallowed. PNG references match declared dimensions, at most 2 MP each and 8 MP total. All embedded references together fit 6 million characters. Text overflow is reported, never silently exported by the workspace."
                        }
                      }
                    }
                  }
                },
                "description": "Panelcraft 1.0 comic book, 1–12 ordered pages. Each comic follows the Flipline Comic Desk schema. Aggregate normalized page JSON must fit 24 million characters. Page IDs are unique. Per-page art and image limits apply. Reading sets booklet binding; each page retains its own panel reading direction."
              },
              "report": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "pages",
                  "panels",
                  "balloons",
                  "overflow",
                  "embeddedCharacters"
                ],
                "properties": {
                  "pages": {
                    "type": "integer"
                  },
                  "panels": {
                    "type": "integer"
                  },
                  "balloons": {
                    "type": "integer"
                  },
                  "overflow": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "page",
                        "id"
                      ],
                      "properties": {
                        "page": {
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "embeddedCharacters": {
                    "type": "integer"
                  }
                }
              },
              "imposition": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "pages",
                  "paddedPages",
                  "blankPages",
                  "sheets"
                ],
                "properties": {
                  "pages": {
                    "type": "integer"
                  },
                  "paddedPages": {
                    "type": "integer"
                  },
                  "blankPages": {
                    "type": "integer"
                  },
                  "sheets": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "sheet",
                        "front",
                        "back"
                      ],
                      "properties": {
                        "sheet": {
                          "type": "integer"
                        },
                        "front": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "items": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        },
                        "back": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "items": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        }
                      }
                    }
                  }
                }
              },
              "contactSheet": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "projectFile": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "letteringCsv": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "openInApp": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      },
      "PanelcraftFigureReferenceInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "pose": {
            "title": "Starting pose",
            "type": "string",
            "enum": [
              "figure-standing",
              "figure-wave",
              "figure-stride",
              "figure-seated",
              "figure-reach",
              "figure-run",
              "figure-present",
              "figure-crouch"
            ],
            "default": "figure-standing"
          },
          "height": {
            "title": "Neutral figure height (mm)",
            "type": "number",
            "minimum": 1200,
            "maximum": 2200,
            "default": 1750
          },
          "heads": {
            "title": "Height in head units",
            "type": "number",
            "minimum": 6,
            "maximum": 9,
            "default": 7.5
          },
          "shoulders": {
            "title": "Shoulder width (% of height)",
            "type": "number",
            "minimum": 18,
            "maximum": 32,
            "default": 25
          },
          "hips": {
            "title": "Hip width (% of height)",
            "type": "number",
            "minimum": 13,
            "maximum": 26,
            "default": 18
          },
          "build": {
            "title": "Limb and torso width (%)",
            "type": "number",
            "minimum": 65,
            "maximum": 140,
            "default": 100
          },
          "azimuth": {
            "title": "View azimuth (degrees)",
            "type": "number",
            "minimum": -360,
            "maximum": 360,
            "default": -90
          },
          "elevation": {
            "title": "View elevation (degrees)",
            "type": "number",
            "minimum": 5,
            "maximum": 85,
            "default": 12
          },
          "color": {
            "title": "Figure color (HEX)",
            "type": "string",
            "maxLength": 7,
            "default": "#668f87"
          },
          "joints": {
            "title": "Optional joint overrides (JSON)",
            "type": "string",
            "maxLength": 2000,
            "default": ""
          }
        },
        "required": []
      },
      "PanelcraftFigureReferenceResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "project",
              "form",
              "solids",
              "triangles",
              "reference",
              "turnaround",
              "figureFile",
              "model",
              "formFile",
              "openInApp"
            ],
            "properties": {
              "project": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "format",
                  "version",
                  "name",
                  "height",
                  "heads",
                  "shoulders",
                  "hips",
                  "build",
                  "color",
                  "left",
                  "right",
                  "azimuth",
                  "elevation",
                  "outline"
                ],
                "properties": {
                  "format": {
                    "const": "usefulweb-figure"
                  },
                  "version": {
                    "const": 1
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 100
                  },
                  "height": {
                    "type": "number",
                    "minimum": 1200,
                    "maximum": 2200
                  },
                  "heads": {
                    "type": "number",
                    "minimum": 6,
                    "maximum": 9
                  },
                  "shoulders": {
                    "type": "number",
                    "minimum": 0.18,
                    "maximum": 0.32
                  },
                  "hips": {
                    "type": "number",
                    "minimum": 0.13,
                    "maximum": 0.26
                  },
                  "build": {
                    "type": "number",
                    "minimum": 0.65,
                    "maximum": 1.4
                  },
                  "color": {
                    "type": "string",
                    "pattern": "^#[a-fA-F0-9]{6}$"
                  },
                  "left": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "abduction",
                      "flex",
                      "elbow",
                      "hip",
                      "knee"
                    ],
                    "properties": {
                      "abduction": {
                        "type": "number",
                        "minimum": -30,
                        "maximum": 180
                      },
                      "flex": {
                        "type": "number",
                        "minimum": -90,
                        "maximum": 120
                      },
                      "elbow": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 150
                      },
                      "hip": {
                        "type": "number",
                        "minimum": -70,
                        "maximum": 100
                      },
                      "knee": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 150
                      }
                    }
                  },
                  "right": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "abduction",
                      "flex",
                      "elbow",
                      "hip",
                      "knee"
                    ],
                    "properties": {
                      "abduction": {
                        "type": "number",
                        "minimum": -30,
                        "maximum": 180
                      },
                      "flex": {
                        "type": "number",
                        "minimum": -90,
                        "maximum": 120
                      },
                      "elbow": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 150
                      },
                      "hip": {
                        "type": "number",
                        "minimum": -70,
                        "maximum": 100
                      },
                      "knee": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 150
                      }
                    }
                  },
                  "azimuth": {
                    "type": "number",
                    "minimum": -360,
                    "maximum": 360
                  },
                  "elevation": {
                    "type": "number",
                    "minimum": 5,
                    "maximum": 85
                  },
                  "outline": {
                    "type": "boolean"
                  }
                }
              },
              "form": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "format",
                  "version",
                  "name",
                  "units",
                  "grid",
                  "snap",
                  "objects",
                  "scenes"
                ],
                "properties": {
                  "format": {
                    "const": "kerfwise-form"
                  },
                  "version": {
                    "const": 1
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "units": {
                    "enum": [
                      "mm",
                      "in"
                    ]
                  },
                  "grid": {
                    "type": "number",
                    "minimum": 0.1,
                    "maximum": 10000
                  },
                  "snap": {
                    "type": "boolean"
                  },
                  "objects": {
                    "type": "array",
                    "maxItems": 128,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "id",
                        "name",
                        "tag",
                        "color",
                        "profile",
                        "height",
                        "x",
                        "y",
                        "z",
                        "rotation",
                        "visible",
                        "locked"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^[-a-zA-Z0-9_]{1,64}$"
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "tag": {
                          "type": "string",
                          "maxLength": 40
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#[a-fA-F0-9]{6}$"
                        },
                        "profile": {
                          "type": "array",
                          "minItems": 3,
                          "maxItems": 64,
                          "items": {
                            "type": "array",
                            "minItems": 2,
                            "maxItems": 2,
                            "items": {
                              "type": "number",
                              "minimum": -100000,
                              "maximum": 100000
                            }
                          }
                        },
                        "height": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 100000
                        },
                        "x": {
                          "type": "number",
                          "minimum": -100000,
                          "maximum": 100000
                        },
                        "y": {
                          "type": "number",
                          "minimum": -100000,
                          "maximum": 100000
                        },
                        "z": {
                          "type": "number",
                          "minimum": -100000,
                          "maximum": 100000
                        },
                        "rotation": {
                          "type": "number"
                        },
                        "tiltX": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "tiltY": {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        "visible": {
                          "type": "boolean"
                        },
                        "locked": {
                          "type": "boolean"
                        },
                        "orthogonal": {
                          "type": "string",
                          "maxLength": 12000
                        }
                      }
                    }
                  },
                  "scenes": {
                    "type": "array",
                    "maxItems": 8,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "name",
                        "camera"
                      ],
                      "properties": {
                        "name": {
                          "type": "string",
                          "maxLength": 60
                        },
                        "camera": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "azimuth",
                            "elevation",
                            "span",
                            "target"
                          ],
                          "properties": {
                            "azimuth": {
                              "type": "number"
                            },
                            "elevation": {
                              "type": "number",
                              "minimum": 5,
                              "maximum": 90
                            },
                            "span": {
                              "type": "number",
                              "minimum": 10,
                              "maximum": 1000000
                            },
                            "target": {
                              "type": "array",
                              "minItems": 3,
                              "maxItems": 3,
                              "items": {
                                "type": "number"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              },
              "solids": {
                "type": "number"
              },
              "triangles": {
                "type": "number"
              },
              "reference": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "turnaround": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "figureFile": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "model": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "formFile": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "openInApp": {
                "type": "string"
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      },
      "FliplineComicPageInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "name": {
            "title": "Comic page name",
            "type": "string",
            "maxLength": 120,
            "default": "A small discovery"
          },
          "dialogue": {
            "title": "Dialogue lines in reading order",
            "type": "string",
            "maxLength": 8000,
            "default": "What is that light?\nA little farther…\nWe found a new way.\nLet us draw it."
          },
          "rows": {
            "title": "Panel rows",
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "default": 2
          },
          "columns": {
            "title": "Panel columns",
            "type": "integer",
            "minimum": 1,
            "maximum": 12,
            "default": 2
          },
          "width": {
            "title": "Page width (px)",
            "type": "integer",
            "minimum": 400,
            "maximum": 2400,
            "default": 1000
          },
          "height": {
            "title": "Page height (px)",
            "type": "integer",
            "minimum": 400,
            "maximum": 4000,
            "default": 1400
          },
          "dpi": {
            "title": "Page resolution (DPI)",
            "type": "integer",
            "minimum": 72,
            "maximum": 600,
            "default": 150
          },
          "reading": {
            "title": "Panel reading direction",
            "type": "string",
            "enum": [
              "ltr",
              "rtl"
            ],
            "default": "ltr"
          },
          "figures": {
            "title": "Include rough staging figures",
            "type": "boolean",
            "default": true
          }
        },
        "required": []
      },
      "FliplineComicPageResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "project",
              "report",
              "pageSvg",
              "projectFile",
              "letteringCsv",
              "openInApp"
            ],
            "properties": {
              "project": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "format",
                  "version",
                  "name",
                  "width",
                  "height",
                  "dpi",
                  "margin",
                  "gutter",
                  "border",
                  "paper",
                  "reading",
                  "panels",
                  "balloons",
                  "artwork"
                ],
                "properties": {
                  "format": {
                    "const": "flipline-comic"
                  },
                  "version": {
                    "const": 1
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 120
                  },
                  "width": {
                    "type": "integer",
                    "minimum": 400,
                    "maximum": 2400
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 400,
                    "maximum": 4000
                  },
                  "dpi": {
                    "type": "integer",
                    "minimum": 72,
                    "maximum": 600
                  },
                  "margin": {
                    "type": "number"
                  },
                  "gutter": {
                    "type": "number"
                  },
                  "border": {
                    "type": "number"
                  },
                  "paper": {
                    "type": "string"
                  },
                  "reading": {
                    "enum": [
                      "ltr",
                      "rtl"
                    ]
                  },
                  "panels": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 12,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "id",
                        "name",
                        "x",
                        "y",
                        "width",
                        "height",
                        "paper",
                        "fit",
                        "zoom",
                        "panX",
                        "panY",
                        "sourceWidth",
                        "sourceHeight",
                        "tone"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "maxLength": 64
                        },
                        "name": {
                          "type": "string",
                          "maxLength": 80
                        },
                        "x": {
                          "type": "number"
                        },
                        "y": {
                          "type": "number"
                        },
                        "width": {
                          "type": "number"
                        },
                        "height": {
                          "type": "number"
                        },
                        "paper": {
                          "type": "string"
                        },
                        "fit": {
                          "enum": [
                            "contain",
                            "cover"
                          ]
                        },
                        "zoom": {
                          "type": "number"
                        },
                        "panX": {
                          "type": "number"
                        },
                        "panY": {
                          "type": "number"
                        },
                        "sourceWidth": {
                          "type": "integer"
                        },
                        "sourceHeight": {
                          "type": "integer"
                        },
                        "tone": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "kind",
                            "pitch",
                            "coverage",
                            "angle",
                            "ink",
                            "over"
                          ],
                          "properties": {
                            "kind": {
                              "enum": [
                                "none",
                                "dots",
                                "lines",
                                "crosshatch"
                              ]
                            },
                            "pitch": {
                              "type": "number",
                              "minimum": 4,
                              "maximum": 80
                            },
                            "coverage": {
                              "type": "number",
                              "minimum": 0.05,
                              "maximum": 0.75
                            },
                            "angle": {
                              "type": "number",
                              "minimum": -90,
                              "maximum": 90
                            },
                            "ink": {
                              "type": "string",
                              "pattern": "^#[a-fA-F0-9]{6}$"
                            },
                            "over": {
                              "type": "boolean"
                            }
                          }
                        }
                      }
                    }
                  },
                  "balloons": {
                    "type": "array",
                    "maxItems": 36,
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "id",
                        "panel",
                        "kind",
                        "x",
                        "y",
                        "width",
                        "height",
                        "tailX",
                        "tailY",
                        "text",
                        "fontSize",
                        "ink",
                        "paper"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "maxLength": 64
                        },
                        "panel": {
                          "type": "string",
                          "maxLength": 64
                        },
                        "kind": {
                          "enum": [
                            "speech",
                            "thought",
                            "caption"
                          ]
                        },
                        "x": {
                          "type": "number"
                        },
                        "y": {
                          "type": "number"
                        },
                        "width": {
                          "type": "number"
                        },
                        "height": {
                          "type": "number"
                        },
                        "tailX": {
                          "type": "number"
                        },
                        "tailY": {
                          "type": "number"
                        },
                        "text": {
                          "type": "string",
                          "maxLength": 600
                        },
                        "fontSize": {
                          "type": "number"
                        },
                        "ink": {
                          "type": "string"
                        },
                        "paper": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "artwork": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "format",
                      "version",
                      "name",
                      "width",
                      "height",
                      "fps",
                      "paper",
                      "boards"
                    ],
                    "properties": {
                      "format": {
                        "const": "flipline-story"
                      },
                      "version": {
                        "const": 1
                      },
                      "name": {
                        "type": "string",
                        "maxLength": 120
                      },
                      "width": {
                        "type": "integer",
                        "minimum": 32,
                        "maximum": 1600
                      },
                      "height": {
                        "type": "integer",
                        "minimum": 32,
                        "maximum": 1600
                      },
                      "fps": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 30
                      },
                      "paper": {
                        "type": "string",
                        "pattern": "^#[a-fA-F0-9]{6}$"
                      },
                      "boards": {
                        "type": "array",
                        "minItems": 1,
                        "maxItems": 48,
                        "items": {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "id",
                            "title",
                            "scene",
                            "shot",
                            "camera",
                            "frames",
                            "action",
                            "dialogue",
                            "notes",
                            "locked",
                            "marks",
                            "reference"
                          ],
                          "properties": {
                            "id": {
                              "type": "string",
                              "pattern": "^[-a-zA-Z0-9_]{1,80}$"
                            },
                            "title": {
                              "type": "string",
                              "maxLength": 80
                            },
                            "scene": {
                              "type": "string",
                              "maxLength": 80
                            },
                            "shot": {
                              "enum": [
                                "wide",
                                "medium",
                                "close",
                                "detail",
                                "over-shoulder"
                              ]
                            },
                            "camera": {
                              "enum": [
                                "static",
                                "pan-left",
                                "pan-right",
                                "tilt-up",
                                "tilt-down",
                                "push-in",
                                "pull-out",
                                "handheld"
                              ]
                            },
                            "frames": {
                              "type": "integer",
                              "minimum": 1,
                              "maximum": 3600
                            },
                            "action": {
                              "type": "string",
                              "maxLength": 1200
                            },
                            "dialogue": {
                              "type": "string",
                              "maxLength": 1200
                            },
                            "notes": {
                              "type": "string",
                              "maxLength": 1200
                            },
                            "locked": {
                              "type": "boolean"
                            },
                            "marks": {
                              "type": "array",
                              "maxItems": 500,
                              "items": {
                                "type": "object",
                                "additionalProperties": false,
                                "required": [
                                  "id",
                                  "kind",
                                  "points",
                                  "color",
                                  "size",
                                  "fill"
                                ],
                                "properties": {
                                  "brush": {
                                    "type": "object",
                                    "additionalProperties": false,
                                    "required": [
                                      "kind",
                                      "opacity",
                                      "flow",
                                      "spacing",
                                      "texture",
                                      "pressure",
                                      "seed"
                                    ],
                                    "properties": {
                                      "kind": {
                                        "enum": [
                                          "ink",
                                          "pencil",
                                          "marker",
                                          "wash",
                                          "airbrush"
                                        ]
                                      },
                                      "opacity": {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 1
                                      },
                                      "flow": {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 1
                                      },
                                      "spacing": {
                                        "type": "number",
                                        "minimum": 0.08,
                                        "maximum": 1
                                      },
                                      "texture": {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 1
                                      },
                                      "pressure": {
                                        "type": "boolean"
                                      },
                                      "seed": {
                                        "type": "integer",
                                        "minimum": 0,
                                        "maximum": 4294967295
                                      }
                                    }
                                  },
                                  "pressures": {
                                    "type": "array",
                                    "minItems": 1,
                                    "maxItems": 4096,
                                    "items": {
                                      "type": "number",
                                      "minimum": 0,
                                      "maximum": 1
                                    }
                                  },
                                  "id": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 80
                                  },
                                  "kind": {
                                    "enum": [
                                      "pen",
                                      "eraser",
                                      "line",
                                      "rect",
                                      "ellipse",
                                      "image"
                                    ]
                                  },
                                  "points": {
                                    "type": "array",
                                    "minItems": 1,
                                    "maxItems": 4096,
                                    "items": {
                                      "type": "array",
                                      "minItems": 2,
                                      "maxItems": 2,
                                      "items": {
                                        "type": "number",
                                        "minimum": 0,
                                        "maximum": 1
                                      }
                                    }
                                  },
                                  "color": {
                                    "type": "string",
                                    "pattern": "^#[a-fA-F0-9]{6}$"
                                  },
                                  "size": {
                                    "type": "number",
                                    "minimum": 1,
                                    "maximum": 100
                                  },
                                  "fill": {
                                    "type": "boolean"
                                  },
                                  "source": {
                                    "type": "string",
                                    "pattern": "^data:image/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$"
                                  },
                                  "angle": {
                                    "type": "number",
                                    "minimum": -360,
                                    "maximum": 360,
                                    "description": "Clockwise rotation in degrees around the center of the mark bounds (normalized to -180…180)."
                                  },
                                  "flipX": {
                                    "type": "boolean",
                                    "description": "Mirror horizontally around the mark center."
                                  },
                                  "flipY": {
                                    "type": "boolean",
                                    "description": "Mirror vertically around the mark center."
                                  }
                                }
                              }
                            },
                            "reference": {
                              "type": [
                                "object",
                                "null"
                              ],
                              "additionalProperties": false,
                              "required": [
                                "source",
                                "opacity",
                                "visible"
                              ],
                              "properties": {
                                "source": {
                                  "type": "string",
                                  "pattern": "^data:image/(png|jpeg|webp);base64,[A-Za-z0-9+/=]+$"
                                },
                                "opacity": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 1
                                },
                                "visible": {
                                  "type": "boolean"
                                }
                              }
                            }
                          }
                        }
                      }
                    },
                    "description": "Story Desk. Frame-based board durations, half-open timeline intervals and non-drop-frame timecodes. Up to 600 seconds total and 120 seconds per board at the chosen FPS. Canvas up to 2 MP, 50000 points, 2000 marks and 6 million source-image characters across all boards. Ink erasers affect preceding ink only; the independent reference is preserved. Camera moves are planning labels, not animated camera paths."
                  }
                },
                "description": "Comic Desk page. At most 6 MP, 12 panels and 36 balloons. Panel/artwork board IDs align by index. Shared Story Desk mark budgets apply; image marks are disallowed. PNG references match declared dimensions, at most 2 MP each and 8 MP total. All embedded references together fit 6 million characters. Text overflow is reported, never silently exported by the workspace."
              },
              "report": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "panels",
                  "balloons",
                  "widthMm",
                  "heightMm",
                  "pixels",
                  "readingOrder",
                  "overflow",
                  "toneLpi"
                ],
                "properties": {
                  "panels": {
                    "type": "integer"
                  },
                  "balloons": {
                    "type": "integer"
                  },
                  "widthMm": {
                    "type": "number"
                  },
                  "heightMm": {
                    "type": "number"
                  },
                  "pixels": {
                    "type": "integer"
                  },
                  "readingOrder": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "overflow": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "toneLpi": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "panel",
                        "linesPerInch"
                      ],
                      "properties": {
                        "panel": {
                          "type": "string"
                        },
                        "linesPerInch": {
                          "type": "number"
                        }
                      }
                    }
                  }
                }
              },
              "pageSvg": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "projectFile": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "letteringCsv": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "openInApp": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      },
      "FliplineScreentoneInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "pattern": {
            "title": "Tone pattern",
            "type": "string",
            "enum": [
              "dots",
              "lines",
              "crosshatch"
            ],
            "default": "dots"
          },
          "pitch": {
            "title": "Tone pitch (px)",
            "type": "integer",
            "minimum": 4,
            "maximum": 80,
            "default": 14
          },
          "coverage": {
            "title": "Tone coverage (%)",
            "type": "integer",
            "minimum": 5,
            "maximum": 75,
            "default": 20
          },
          "angle": {
            "title": "Tone angle (°)",
            "type": "integer",
            "minimum": -90,
            "maximum": 90,
            "default": 45
          },
          "dpi": {
            "title": "Tone resolution (DPI)",
            "type": "integer",
            "minimum": 72,
            "maximum": 600,
            "default": 150
          },
          "width": {
            "title": "Swatch width (px)",
            "type": "integer",
            "minimum": 64,
            "maximum": 1600,
            "default": 600
          },
          "height": {
            "title": "Swatch height (px)",
            "type": "integer",
            "minimum": 64,
            "maximum": 1600,
            "default": 400
          },
          "ink": {
            "title": "Tone ink (HEX)",
            "type": "string",
            "maxLength": 7,
            "default": "#253e45"
          }
        },
        "required": []
      },
      "FliplineScreentoneResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "recipe",
              "linesPerInch",
              "widthMm",
              "heightMm",
              "nominalCoverage",
              "swatch",
              "recipeFile",
              "openInApp"
            ],
            "properties": {
              "recipe": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "format",
                  "version",
                  "tone",
                  "dpi",
                  "width",
                  "height"
                ],
                "properties": {
                  "format": {
                    "const": "flipline-tone"
                  },
                  "version": {
                    "const": 1
                  },
                  "tone": {
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "kind",
                      "pitch",
                      "coverage",
                      "angle",
                      "ink",
                      "over"
                    ],
                    "properties": {
                      "kind": {
                        "enum": [
                          "none",
                          "dots",
                          "lines",
                          "crosshatch"
                        ]
                      },
                      "pitch": {
                        "type": "number",
                        "minimum": 4,
                        "maximum": 80
                      },
                      "coverage": {
                        "type": "number",
                        "minimum": 0.05,
                        "maximum": 0.75
                      },
                      "angle": {
                        "type": "number",
                        "minimum": -90,
                        "maximum": 90
                      },
                      "ink": {
                        "type": "string",
                        "pattern": "^#[a-fA-F0-9]{6}$"
                      },
                      "over": {
                        "type": "boolean"
                      }
                    }
                  },
                  "dpi": {
                    "type": "integer",
                    "minimum": 72,
                    "maximum": 600
                  },
                  "width": {
                    "type": "integer",
                    "minimum": 64,
                    "maximum": 1600
                  },
                  "height": {
                    "type": "integer",
                    "minimum": 64,
                    "maximum": 1600
                  }
                }
              },
              "linesPerInch": {
                "type": "number"
              },
              "widthMm": {
                "type": "number"
              },
              "heightMm": {
                "type": "number"
              },
              "nominalCoverage": {
                "type": "number"
              },
              "swatch": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "recipeFile": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "artifactId",
                  "filename",
                  "mime",
                  "bytes",
                  "sha256",
                  "path"
                ],
                "properties": {
                  "artifactId": {
                    "type": "string"
                  },
                  "filename": {
                    "type": "string"
                  },
                  "mime": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "path": {
                    "type": "string",
                    "description": "Download path on the same site (valid for about 2 hours)."
                  }
                }
              },
              "openInApp": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}