{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cueframe-ai/json-schema/cueframe-ai-brief-list-response-schema.json",
  "title": "BriefListResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cueframe-ai-briefs-api-openapi.yml#/components/schemas/BriefListResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BriefResponse"
      }
    },
    "pagination": {
      "$ref": "#/$defs/PaginationMeta"
    }
  },
  "required": [
    "data",
    "pagination"
  ],
  "additionalProperties": false,
  "$defs": {
    "BriefAudio": {
      "type": "object",
      "properties": {
        "music": {
          "type": "object",
          "properties": {
            "enabled": {
              "type": "boolean",
              "description": "Whether the compose carries a music bed."
            },
            "mood": {
              "description": "Freeform mood/genre prompt for the GENERATED bed (e.g. 'understated editorial, warm'). Ignored when mediaId pins a track.",
              "type": "string",
              "maxLength": 300
            },
            "mediaId": {
              "description": "Pin a client-imported track as the bed. HONOR-OR-REFUSE: must be an org-owned kind:'audio' media item, else 422 — never accept-and-ignore. Absent ⇒ generate from mood.",
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "enabled"
          ],
          "additionalProperties": false
        },
        "sfx": {
          "type": "object",
          "properties": {
            "intensity": {
              "type": "string",
              "enum": [
                "off",
                "light",
                "standard",
                "dense"
              ],
              "description": "SFX placement density. Real-footage content keeps restraint caps regardless ('dense' is the explicit opt-out); generated/graphic-led content unlocks the standard tier."
            }
          },
          "required": [
            "intensity"
          ],
          "additionalProperties": false
        }
      },
      "additionalProperties": false
    },
    "BriefBeat": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "intent": {
          "type": "string",
          "minLength": 1,
          "description": "What this beat DOES editorially (hook the claim, prove it, CTA…)."
        },
        "durationSec": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "source": {
          "description": "MOMENT PINNING: this beat uses EXACTLY this window of this media item — honored to-the-frame or refused. v1: every sourced beat must reference the SAME mediaId (multi-source briefs are refused loudly, not silently merged).",
          "type": "object",
          "properties": {
            "mediaId": {
              "type": "string",
              "minLength": 1
            },
            "startSec": {
              "type": "number",
              "minimum": 0
            },
            "endSec": {
              "type": "number",
              "exclusiveMinimum": 0
            }
          },
          "required": [
            "mediaId",
            "startSec",
            "endSec"
          ],
          "additionalProperties": false
        },
        "graphic": {
          "description": "GRAPHICS MANDATE: the plan MUST carry a graphics request of this role overlapping this beat's window — enforced at the plan gate (honor-or-refuse, like moment pinning). Prose mustIncludes reaches only the judge; this is the checkable form.",
          "type": "object",
          "properties": {
            "role": {
              "type": "string",
              "enum": [
                "title-card",
                "stat",
                "lower-third",
                "pull-quote",
                "hero",
                "logo-tag",
                "enumeration",
                "sequence",
                "comparison"
              ],
              "description": "The mandated graphic's editorial role (the graphics-plan GraphicRole vocabulary)."
            },
            "items": {
              "description": "Mandated list items (enumeration/sequence) — carried VERBATIM into the plan's copy.items.",
              "maxItems": 8,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              }
            }
          },
          "required": [
            "role"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "intent"
      ],
      "additionalProperties": false
    },
    "BriefExclusion": {
      "type": "string",
      "enum": [
        "overlay",
        "component",
        "card",
        "no-transitions"
      ]
    },
    "BriefGates": {
      "type": "object",
      "properties": {
        "holdAt": {
          "description": "Checkpoint gates — the compose pauses at each named stage for review via resume. DEFAULT (gates absent): the compose holds at EVERY stage — your agent reviews and resumes each one; an unreviewed checkpoint times out loudly after 60min. Auto-progression is the opt-in (gates.autoApprove: true).",
          "maxItems": 3,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "content",
              "layout",
              "motion"
            ]
          }
        },
        "autoApprove": {
          "description": "true = fully autonomous (compose runs with NO gates — the headless opt-in; without it a brief holds at every stage by default). Mutually exclusive with a non-empty holdAt.",
          "type": "boolean"
        },
        "reviewMode": {
          "description": "Who captures the review decision. Default 'agent': you relay the packet and call resume. 'hosted': every checkpoint mints a review-page URL (checkpoint.ready payload + get_checkpoint's reviewUrl) where a human approves/revises from the browser — no account, no agent session; the recorded decision rides the SAME resume rail and you learn of it via checkpoint webhooks / wait_job.",
          "type": "string",
          "enum": [
            "agent",
            "hosted"
          ]
        }
      },
      "additionalProperties": false
    },
    "BriefQuote": {
      "type": "object",
      "properties": {
        "composeUsd": {
          "type": "number"
        },
        "renderUsdPerExport": {
          "type": "number"
        },
        "estimatedJourneyUsd": {
          "type": "number",
          "description": "compose + expected renders — relay this BEFORE composing."
        },
        "revisionCyclesIncluded": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "Revise cycles the compose price includes per gate (A1). Beyond this, resume(revise) is refused with `revision_cycles_exhausted` — saying no never silently charges."
        }
      },
      "required": [
        "composeUsd",
        "renderUsdPerExport",
        "estimatedJourneyUsd",
        "revisionCyclesIncluded"
      ],
      "additionalProperties": false
    },
    "BriefResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "projectId": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "authored",
            "clip"
          ],
          "description": "authored = create_brief; clip = minted by suggest_briefs from an AI clip suggestion."
        },
        "sourceSuggestionId": {
          "description": "kind:'clip' provenance — the suggestion this Brief was minted from.",
          "type": "string"
        },
        "name": {
          "type": "string",
          "maxLength": 200
        },
        "goal": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2000,
          "description": "What the video must accomplish."
        },
        "audience": {
          "type": "string",
          "maxLength": 500
        },
        "platform": {
          "type": "string",
          "maxLength": 100
        },
        "format": {
          "$ref": "#/$defs/Format"
        },
        "durationSec": {
          "description": "Target output duration. HONOR-OR-REFUSE: compose validates it against the beat-source window (±1.5s) and refuses a brief it cannot honor.",
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 3600
        },
        "tone": {
          "type": "string",
          "maxLength": 500
        },
        "cta": {
          "type": "string",
          "maxLength": 500
        },
        "locale": {
          "description": "Output language (BCP-47 tag, e.g. 'es-419'): ALL on-screen copy + captions.",
          "type": "string",
          "maxLength": 35
        },
        "hook": {
          "type": "string",
          "maxLength": 500
        },
        "caption": {
          "type": "string",
          "maxLength": 2000
        },
        "beats": {
          "maxItems": 24,
          "type": "array",
          "items": {
            "$ref": "#/$defs/BriefBeat"
          }
        },
        "mustIncludes": {
          "maxItems": 24,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "references": {
          "maxItems": 12,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "captions": {
          "type": "object",
          "properties": {
            "styleId": {
              "description": "Caption style id (e.g. 'serif-emphasis@1').",
              "type": "string",
              "minLength": 1
            },
            "emphasisPhrases": {
              "description": "Phrases rendered in the caption EMPHASIS style (the big-serif treatment). Matched against the transcript; drives CaptionWord.emphasis.",
              "maxItems": 24,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1
              }
            }
          },
          "additionalProperties": false
        },
        "motionStyle": {
          "type": "object",
          "properties": {
            "textAnimation": {
              "type": "string"
            },
            "transitions": {
              "type": "string"
            },
            "colorMood": {
              "type": "string"
            },
            "captionStyle": {
              "type": "string"
            }
          },
          "additionalProperties": false
        },
        "seededGraphics": {
          "maxItems": 16,
          "type": "array",
          "items": {
            "$ref": "#/$defs/TimelineClip"
          },
          "description": "Client-authored graphic clips the Director must carry VERBATIM: seeded into the design loop's base composition as LOCKED clips (never re-authored, never discarded)."
        },
        "exclusions": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "$ref": "#/$defs/BriefExclusion"
          }
        },
        "gates": {
          "$ref": "#/$defs/BriefGates"
        },
        "audio": {
          "$ref": "#/$defs/BriefAudio"
        },
        "quote": {
          "$ref": "#/$defs/BriefQuote"
        },
        "createdAt": {
          "type": "number"
        },
        "updatedAt": {
          "type": "number"
        }
      },
      "required": [
        "id",
        "projectId",
        "kind",
        "goal",
        "quote",
        "createdAt",
        "updatedAt"
      ],
      "additionalProperties": false
    },
    "ComponentExecutionRef": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "version": {
              "type": "number",
              "const": 3
            },
            "componentId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "sourceVersionId": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "params": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/ComponentParameterValue"
              }
            },
            "seed": {
              "type": "string",
              "minLength": 1
            },
            "assets": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "additionalProperties": {
                "type": "string",
                "minLength": 1
              }
            },
            "mediaBindings": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                }
              }
            }
          },
          "required": [
            "version",
            "componentId",
            "sourceVersionId",
            "params",
            "seed"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "version": {
              "type": "number",
              "const": 4
            },
            "componentId": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256
            },
            "sourceVersionId": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "params": {
              "type": "object",
              "propertyNames": {
                "type": "string"
              },
              "additionalProperties": {
                "$ref": "#/$defs/ComponentParameterValue"
              }
            },
            "seed": {
              "type": "string",
              "minLength": 1
            },
            "assets": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "minLength": 1,
                "maxLength": 256
              },
              "additionalProperties": {
                "type": "string",
                "minLength": 1
              }
            },
            "mediaBindings": {
              "type": "object",
              "propertyNames": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "additionalProperties": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                }
              }
            }
          },
          "required": [
            "version",
            "componentId",
            "sourceVersionId",
            "params",
            "seed"
          ],
          "additionalProperties": false
        }
      ]
    },
    "ComponentParameterValue": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ComponentParameterValue"
          }
        },
        {
          "type": "object",
          "propertyNames": {
            "type": "string"
          },
          "additionalProperties": {
            "$ref": "#/$defs/ComponentParameterValue"
          }
        }
      ]
    },
    "Format": {
      "type": "object",
      "properties": {
        "aspectRatio": {
          "type": "string",
          "enum": [
            "16:9",
            "9:16",
            "1:1",
            "4:5"
          ]
        },
        "fps": {
          "anyOf": [
            {
              "type": "number",
              "const": 24
            },
            {
              "type": "number",
              "const": 25
            },
            {
              "type": "number",
              "const": 30
            },
            {
              "type": "number",
              "const": 60
            }
          ]
        },
        "resolution": {
          "type": "string",
          "enum": [
            "hd",
            "fhd",
            "4k"
          ]
        },
        "platform": {
          "type": "string"
        }
      },
      "required": [
        "aspectRatio"
      ]
    },
    "PaginationMeta": {
      "type": "object",
      "properties": {
        "hasMore": {
          "type": "boolean"
        },
        "nextCursor": {
          "type": [
            "string",
            "null"
          ]
        },
        "prevCursor": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "hasMore",
        "nextCursor",
        "prevCursor"
      ],
      "additionalProperties": false,
      "description": "Cursor pagination metadata."
    },
    "TimelineClip": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "minLength": 1
        },
        "startTime": {
          "type": "number",
          "minimum": 0
        },
        "duration": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "source": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "media"
                },
                "mediaId": {
                  "type": "string"
                },
                "trim": {
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "number",
                      "minimum": 0
                    },
                    "end": {
                      "type": "number",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "start",
                    "end"
                  ]
                },
                "excludedRanges": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "start": {
                        "type": "number",
                        "minimum": 0
                      },
                      "end": {
                        "type": "number",
                        "minimum": 0
                      },
                      "reason": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "start",
                      "end"
                    ]
                  }
                },
                "volume": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 4
                },
                "muted": {
                  "type": "boolean"
                },
                "playbackRate": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "sync": {
                  "type": "string",
                  "enum": [
                    "video",
                    "independent"
                  ]
                },
                "kenBurns": {
                  "description": "Still-image motion. When unset, an image clip slowly pushes in (`in`) unless its fit is `contain` or it keyframes scale, position or rotation, so a keyframed clip renders exactly its keyframed values; set `none` for a still that holds.",
                  "type": "string",
                  "enum": [
                    "in",
                    "out",
                    "pan-l",
                    "pan-r",
                    "none"
                  ]
                },
                "volumeDb": {
                  "type": "number"
                },
                "fadeInMs": {
                  "type": "number",
                  "minimum": 0
                },
                "fadeOutMs": {
                  "type": "number",
                  "minimum": 0
                },
                "loop": {
                  "type": "boolean"
                },
                "audioRole": {
                  "description": "Mix role. A role sets the clip's default gain when it has no `volume` or `volumeDb`: vo 0 dB, sfx -6 dB, music -8 dB (-16 dB when any vo clip exists), ambience -22 dB. Set `volumeDb: 0` to keep a role and play the source at its own level.",
                  "type": "string",
                  "enum": [
                    "sfx",
                    "music",
                    "vo",
                    "ambience"
                  ]
                },
                "duck": {
                  "type": "object",
                  "properties": {
                    "duckDb": {
                      "type": "number",
                      "maximum": 0
                    },
                    "attackMs": {
                      "type": "number",
                      "minimum": 0
                    },
                    "releaseMs": {
                      "type": "number",
                      "minimum": 0
                    },
                    "windows": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "startMs": {
                            "type": "number"
                          },
                          "endMs": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "startMs",
                          "endMs"
                        ]
                      }
                    }
                  },
                  "required": [
                    "duckDb",
                    "attackMs",
                    "releaseMs"
                  ]
                },
                "anchor": {
                  "type": "object",
                  "properties": {
                    "clipId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "offsetMs": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "clipId",
                    "offsetMs"
                  ]
                },
                "reframe": {
                  "type": "object",
                  "properties": {
                    "segments": {
                      "minItems": 1,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "startSec": {
                            "type": "number",
                            "minimum": 0,
                            "description": "Segment START in seconds, clip-relative. Segments tile the clip's duration in order."
                          },
                          "endSec": {
                            "type": "number",
                            "exclusiveMinimum": 0,
                            "description": "Segment END in seconds, clip-relative. The span (endSec − startSec) is this segment's duration — the window `ease` ramps over."
                          },
                          "focus": {
                            "oneOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "const": "frame-center"
                                  }
                                },
                                "required": [
                                  "mode"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "const": "point"
                                  },
                                  "x": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  },
                                  "y": {
                                    "type": "number",
                                    "minimum": 0,
                                    "maximum": 1
                                  }
                                },
                                "required": [
                                  "mode",
                                  "x",
                                  "y"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "const": "face"
                                  },
                                  "faceId": {
                                    "type": "string",
                                    "minLength": 1
                                  },
                                  "shotScale": {
                                    "type": "string",
                                    "enum": [
                                      "close",
                                      "standard",
                                      "wide"
                                    ]
                                  }
                                },
                                "required": [
                                  "mode",
                                  "faceId"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "const": "all-faces"
                                  }
                                },
                                "required": [
                                  "mode"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "mode": {
                                    "type": "string",
                                    "const": "active-speaker"
                                  }
                                },
                                "required": [
                                  "mode"
                                ]
                              }
                            ],
                            "description": "WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."
                          },
                          "intent": {
                            "description": "Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic — NOT honored by the derive math and excluded from the variant cache key.",
                            "type": "string"
                          },
                          "zoom": {
                            "description": "How TIGHT the framing is — the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6–0.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale`: a face-tracked shot is sized EITHER by the editorial scale (shotScale, calibrated to the detected face) OR by an explicit zoom — never both.",
                            "type": "number",
                            "minimum": 0.1,
                            "maximum": 1
                          },
                          "ease": {
                            "description": "Zoom/center ramp DURATIONS in SECONDS at this segment's edges — NOT a unitless 0–1 curve. ~0.3–0.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` ≤ the segment's duration (endSec − startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing.",
                            "type": "object",
                            "properties": {
                              "in": {
                                "type": "number",
                                "minimum": 0,
                                "description": "Ease-IN ramp DURATION in seconds at the segment START."
                              },
                              "out": {
                                "type": "number",
                                "minimum": 0,
                                "description": "Ease-OUT ramp DURATION in seconds at the segment END."
                              }
                            },
                            "required": [
                              "in",
                              "out"
                            ]
                          },
                          "bias": {
                            "description": "Optional FINE framing nudge off the focus center, source-normalized in [−0.3, 0.3]. A small correction (headroom, rule-of-thirds), NOT a reframe — use `focus`/`zoom` for the actual shot. Omit (treated as 0) to sit dead-center on the focus.",
                            "type": "object",
                            "properties": {
                              "x": {
                                "type": "number",
                                "minimum": -0.3,
                                "maximum": 0.3,
                                "description": "Horizontal nudge, source-normalized (+ = right)."
                              },
                              "y": {
                                "type": "number",
                                "minimum": -0.3,
                                "maximum": 0.3,
                                "description": "Vertical nudge, source-normalized (+ = down)."
                              }
                            },
                            "required": [
                              "x",
                              "y"
                            ]
                          }
                        },
                        "required": [
                          "startSec",
                          "endSec",
                          "focus"
                        ]
                      }
                    }
                  },
                  "required": [
                    "segments"
                  ]
                }
              },
              "required": [
                "kind",
                "mediaId"
              ]
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "component"
                },
                "componentId": {
                  "type": "string",
                  "minLength": 1
                },
                "props": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "zPlane": {
                  "type": "string",
                  "enum": [
                    "front",
                    "behind-subject"
                  ]
                },
                "execution": {
                  "$ref": "#/$defs/ComponentExecutionRef"
                },
                "placement": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "number",
                          "const": 3
                        },
                        "kind": {
                          "type": "string",
                          "const": "clip"
                        }
                      },
                      "required": [
                        "version",
                        "kind"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "version": {
                          "type": "number",
                          "const": 3
                        },
                        "kind": {
                          "type": "string",
                          "const": "content-slots"
                        },
                        "slots": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string",
                            "minLength": 1,
                            "maxLength": 256
                          },
                          "additionalProperties": {
                            "type": "object",
                            "properties": {
                              "targetClipIds": {
                                "type": "array",
                                "items": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 256
                                }
                              },
                              "ownership": {
                                "type": "string",
                                "enum": [
                                  "reference",
                                  "exclusive"
                                ]
                              }
                            },
                            "required": [
                              "targetClipIds",
                              "ownership"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "version",
                        "kind",
                        "slots"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "retired": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "kind",
                "componentId",
                "props"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "overlay"
                },
                "primitiveId": {
                  "type": "string",
                  "minLength": 1,
                  "pattern": "^(?!custom$)"
                },
                "params": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "zPlane": {
                  "type": "string",
                  "enum": [
                    "front",
                    "behind-subject"
                  ]
                },
                "anchor": {
                  "type": "object",
                  "properties": {
                    "space": {
                      "type": "string",
                      "const": "scene"
                    },
                    "x": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "y": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  },
                  "required": [
                    "space",
                    "x",
                    "y"
                  ]
                },
                "parallax": {
                  "type": "number",
                  "minimum": -0.3,
                  "maximum": 0.3
                }
              },
              "required": [
                "kind",
                "primitiveId",
                "params"
              ]
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "effect"
                },
                "component": {
                  "$ref": "#/$defs/ComponentExecutionRef"
                },
                "targetTrackIds": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "wrapperOrder": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "primitiveId": {
                  "type": "string",
                  "minLength": 1
                },
                "params": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "kind"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "card"
                },
                "html": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Self-contained card markup sized to the format's pixel frame. Motion comes from frame-driven vars, never @keyframes or transition: --cf-frame, --cf-t (seconds), --cf-fps, --cf-duration, --cf-progress, --cf-ease, --cf-enter, --cf-exit. Visible copy goes in the html as plain text. Wrap a run in <span data-cf-split=\"words\"> or \"chars\" and each unit becomes its own span carrying --cf-i (its index, the group carries --cf-n), so one rule staggers it (in chars, spaces count as units), e.g. opacity:clamp(0,calc(var(--cf-t)*4 - var(--cf-i)*.3),1). save_as_template binds that copy with textParams match."
                },
                "tokens": {
                  "description": "Style values the html reads as CSS custom properties: key x becomes --cf-x, so never put dashes in a key. Use tokens for colours and sizes, not visible copy.",
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "zPlane": {
                  "type": "string",
                  "const": "front"
                }
              },
              "required": [
                "kind",
                "html"
              ]
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "composition"
                },
                "compositionId": {
                  "type": "string",
                  "minLength": 1
                },
                "trim": {
                  "type": "object",
                  "properties": {
                    "start": {
                      "type": "number",
                      "minimum": 0
                    },
                    "end": {
                      "type": "number",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "start",
                    "end"
                  ]
                }
              },
              "required": [
                "kind",
                "compositionId"
              ],
              "additionalProperties": false
            }
          ]
        },
        "kind": {
          "type": "string",
          "enum": [
            "video",
            "audio",
            "image",
            "overlay",
            "effect"
          ]
        },
        "opacity": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "scale": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "rotation": {
          "type": "number"
        },
        "position": {
          "type": "object",
          "properties": {
            "x": {
              "type": "number",
              "minimum": -1,
              "maximum": 2
            },
            "y": {
              "type": "number",
              "minimum": -1,
              "maximum": 2
            }
          },
          "required": [
            "x",
            "y"
          ],
          "description": "Clip CENTRE as a fraction of the frame: {x:0.5,y:0.5} is dead centre, 0 to 1 is inside the frame, and a little overshoot (down to -1, up to 2) is how an entrance starts off-canvas. NOT pixels: the renderer maps x to `left: x*100%`, so `x: 180` sits 180 frame-widths away and draws nothing."
        },
        "region": {
          "description": "A window in the frame that the clip draws into and is clipped to (top-left corner and size, each a frame fraction). Inside a region, `position` and `scale` act relative to that window, so content moved past its edge is cut off. Omit it to place the clip against the whole frame.",
          "type": "object",
          "properties": {
            "x": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "y": {
              "type": "number",
              "minimum": 0,
              "maximum": 1
            },
            "w": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 1
            },
            "h": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 1
            }
          },
          "required": [
            "x",
            "y",
            "w",
            "h"
          ]
        },
        "fit": {
          "type": "string",
          "enum": [
            "cover",
            "contain"
          ]
        },
        "captionVisibility": {
          "description": "Video media clip only. Hide native captions while this clip is topmost and covers the lower picture, or when an opaque, effect-free clip has an explicitly full-frame region, even with fit:contain. Caption words and timings remain stored and resume when another visible clip takes over.",
          "type": "string",
          "enum": [
            "visible",
            "hidden"
          ]
        },
        "effects": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "component": {
                "$ref": "#/$defs/ComponentExecutionRef"
              },
              "window": {
                "type": "object",
                "properties": {
                  "startTime": {
                    "type": "number",
                    "minimum": 0
                  },
                  "duration": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  }
                },
                "required": [
                  "startTime",
                  "duration"
                ],
                "additionalProperties": false
              },
              "primitiveId": {
                "type": "string",
                "minLength": 1
              },
              "params": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {}
              }
            },
            "additionalProperties": false
          }
        },
        "transitionIn": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "minLength": 1
            },
            "duration": {
              "type": "number",
              "exclusiveMinimum": 0
            },
            "id": {
              "type": "string",
              "minLength": 1
            },
            "component": {
              "$ref": "#/$defs/ComponentExecutionRef"
            },
            "fromClipId": {
              "type": "string",
              "minLength": 1
            },
            "toClipId": {
              "type": "string",
              "minLength": 1
            },
            "handlePolicy": {
              "type": "string",
              "const": "outgoing-overrun-at-cut-v1"
            }
          },
          "required": [
            "type",
            "duration"
          ]
        },
        "linkGroupId": {
          "type": "string",
          "minLength": 1
        },
        "tweens": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "propertyGroup": {
                "type": "string",
                "enum": [
                  "visual",
                  "scale",
                  "rotation",
                  "position"
                ]
              },
              "position": {
                "type": "number"
              },
              "duration": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "keyframes": {
                "type": "object",
                "properties": {
                  "format": {
                    "type": "string",
                    "const": "percentage"
                  },
                  "easeEach": {
                    "type": "string",
                    "const": "none"
                  },
                  "keyframes": {
                    "minItems": 2,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "percentage": {
                          "type": "number"
                        },
                        "properties": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {
                            "type": "number"
                          }
                        },
                        "ease": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "percentage",
                        "properties"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "format",
                  "easeEach",
                  "keyframes"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "id",
              "propertyGroup",
              "position",
              "duration",
              "keyframes"
            ],
            "additionalProperties": false
          }
        },
        "automation": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number",
              "const": 1
            },
            "lanes": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "target": {
                    "type": "string",
                    "const": "volume"
                  },
                  "points": {
                    "minItems": 2,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "t": {
                          "type": "number"
                        },
                        "v": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "t",
                        "v"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "target",
                  "points"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "version",
            "lanes"
          ],
          "additionalProperties": false
        },
        "color": {
          "type": "object",
          "properties": {
            "version": {
              "type": "number",
              "const": 1
            },
            "enabled": {
              "type": "boolean"
            },
            "grade": {
              "type": "object",
              "properties": {
                "exposure": {
                  "type": "number",
                  "minimum": -4,
                  "maximum": 4
                },
                "contrast": {
                  "type": "number",
                  "minimum": -1,
                  "maximum": 1
                },
                "highlights": {
                  "type": "number",
                  "minimum": -1,
                  "maximum": 1
                },
                "shadows": {
                  "type": "number",
                  "minimum": -1,
                  "maximum": 1
                },
                "whites": {
                  "type": "number",
                  "minimum": -1,
                  "maximum": 1
                },
                "blacks": {
                  "type": "number",
                  "minimum": -1,
                  "maximum": 1
                },
                "temperature": {
                  "type": "number",
                  "minimum": -1,
                  "maximum": 1
                },
                "tint": {
                  "type": "number",
                  "minimum": -1,
                  "maximum": 1
                },
                "vibrance": {
                  "type": "number",
                  "minimum": -1,
                  "maximum": 1
                },
                "saturation": {
                  "type": "number",
                  "minimum": -1,
                  "maximum": 1
                }
              },
              "required": [
                "exposure",
                "contrast",
                "highlights",
                "shadows",
                "whites",
                "blacks",
                "temperature",
                "tint",
                "vibrance",
                "saturation"
              ],
              "additionalProperties": false
            },
            "looks": {
              "maxItems": 2,
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "mediaId": {
                    "type": "string"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "enabled": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "mediaId",
                  "sha256",
                  "enabled"
                ],
                "additionalProperties": false
              }
            },
            "display": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "mediaId": {
                      "type": "string"
                    },
                    "sha256": {
                      "type": "string"
                    },
                    "enabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "mediaId",
                    "sha256",
                    "enabled"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "bundled": {
                      "type": "string",
                      "enum": [
                        "daylight-negative",
                        "tungsten-negative",
                        "soft-negative",
                        "slide",
                        "black-and-white"
                      ]
                    },
                    "enabled": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "bundled",
                    "enabled"
                  ],
                  "additionalProperties": false
                }
              ]
            },
            "creative": {
              "type": "object",
              "properties": {
                "mediaId": {
                  "type": "string"
                },
                "sha256": {
                  "type": "string"
                },
                "enabled": {
                  "type": "boolean"
                },
                "strength": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              },
              "required": [
                "mediaId",
                "sha256",
                "enabled",
                "strength"
              ],
              "additionalProperties": false
            },
            "halation": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "amount": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 0.5
                },
                "radius": {
                  "type": "number",
                  "minimum": 0.0005,
                  "maximum": 0.02
                },
                "threshold": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 16
                },
                "tint": {
                  "type": "array",
                  "prefixItems": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    }
                  ],
                  "items": false,
                  "minItems": 3,
                  "maxItems": 3
                }
              },
              "required": [
                "enabled",
                "amount",
                "radius",
                "threshold",
                "tint"
              ],
              "additionalProperties": false
            },
            "grain": {
              "type": "object",
              "properties": {
                "enabled": {
                  "type": "boolean"
                },
                "profile": {
                  "type": "string",
                  "enum": [
                    "daylight-negative",
                    "tungsten-negative",
                    "soft-negative",
                    "slide",
                    "black-and-white"
                  ]
                },
                "gauge": {
                  "type": "string",
                  "enum": [
                    "super8",
                    "super16",
                    "super35",
                    "65mm"
                  ]
                },
                "amount": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 2
                },
                "size": {
                  "type": "number",
                  "minimum": 0.5,
                  "maximum": 4
                },
                "seed": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 4294967295
                }
              },
              "required": [
                "enabled",
                "profile",
                "gauge",
                "amount",
                "size",
                "seed"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "version",
            "enabled",
            "grade",
            "looks"
          ],
          "additionalProperties": false
        },
        "legacyKeyframes": {
          "type": "object",
          "properties": {
            "needsUpgrade": {
              "type": "boolean",
              "const": true
            },
            "channels": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "record": {}
          },
          "required": [
            "needsUpgrade",
            "channels",
            "record"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "id",
        "startTime",
        "duration",
        "source"
      ],
      "additionalProperties": false
    }
  }
}