{
  "manifest": {
    "schemaVersion": 1,
    "sdkVersion": "0.1.0",
    "id": "example.quieter-clips",
    "version": "1.0.0",
    "name": "Quieter clips",
    "description": "Propose a lower volume for existing video clips, then review and apply the changes in the Editor.",
    "kind": "editor-extension",
    "runtime": "javascript",
    "license": "MIT",
    "provenance": {
      "notice": "MIT License\n\nCopyright (c) 2026 StillMade SDK contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and \nassociated documentation files (the \"Software\"), to deal in the Software without restriction, including \nwithout limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell \ncopies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the \nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial \nportions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT \nLIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO \nEVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER \nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE \nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n"
    },
    "inputs": {
      "timeline": {
        "type": "timeline",
        "primary": true,
        "context": "timeline",
        "semantic": "timeline",
        "required": true,
        "description": "Current Editor timeline containing the clips to adjust."
      },
      "volume": {
        "type": "number",
        "min": 0,
        "max": 100,
        "default": 50,
        "semantic": "clip_volume_percent",
        "required": false,
        "description": "Target volume percentage for each video clip."
      }
    },
    "outputs": {
      "edit": {
        "type": "timeline-edit",
        "primary": true,
        "semantic": "timeline_edit",
        "description": "A reviewable proposal that changes clip volume."
      }
    },
    "permissions": {
      "project": [
        "context.timeline.read",
        "timeline.propose"
      ]
    },
    "ui": [
      {
        "port": "volume",
        "control": "slider"
      }
    ]
  },
  "code": "if (!input.timeline.clips.length) throw new Error(\"Add clips in the Editor first\"); return {edit:{schemaVersion:1,title:\"Lower clip volume\",timelineId:input.timeline.activeTimelineId,commands:input.timeline.clips.slice(0,100).map(clip=>({collection:\"clips\",operation:\"volume\",before:clip,values:{volume:input.volume}}))}};",
  "tests": [
    {
      "name": "Propose without changing the source",
      "input": {
        "timeline": {
          "schemaVersion": 1,
          "activeTimelineId": "timeline-01",
          "clips": [
            {
              "id": "clip-1",
              "trackId": "video",
              "name": "Opening",
              "start": 0,
              "duration": 3,
              "sourceDuration": 3,
              "volume": 100
            }
          ]
        },
        "volume": 50
      },
      "expected": {
        "edit": {
          "schemaVersion": 1,
          "title": "Lower clip volume",
          "timelineId": "timeline-01",
          "commands": [
            {
              "collection": "clips",
              "operation": "volume",
              "before": {
                "id": "clip-1",
                "trackId": "video",
                "name": "Opening",
                "start": 0,
                "duration": 3,
                "sourceDuration": 3,
                "volume": 100
              },
              "values": {
                "volume": 50
              }
            }
          ]
        }
      }
    }
  ]
}