{"schemaVersion":1,"id":"recommended.sm-edit-assistant","version":"1.0.0","name":"Edit Assistant workflow","description":"An editable production workflow using Edit Assistant v2.0.2.","stages":[{"id":"main","blockId":"sm.edit-assistant","version":"2.0.2","label":"Edit Assistant"}],"connections":[],"packages":[{"manifest":{"schemaVersion":1,"sdkVersion":"0.1.0","id":"sm.edit-assistant","version":"2.0.2","name":"Edit Assistant","description":"Turn a plain-language request and optional time range into a strictly validated timeline edit that stays reviewable before Apply.","kind":"task","runtime":"capability","entry":"src/capability.json","license":"MIT","provenance":{"notice":"Original source (authorship declared by the packager)\nLicense: MIT\nChanges: Original implementation declared by the packager; no reused repository or dependency code.\nFiles: LICENSE, src/capability.json, src/view.json\n\nMIT License\n\nCopyright (c) 2026 StillMade contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","portableSources":[{"kind":"original","license":"MIT","paths":["LICENSE","src/capability.json","src/view.json"],"evidence":["upstream/0/LICENSE","upstream/0/src/capability.json","upstream/0/src/view.json"],"changes":"Original implementation declared by the packager; no reused repository or dependency code."}]},"inputs":{"timeline":{"type":"timeline","context":"timeline","primary":true,"description":"Current timeline snapshot used for exact before-state checks.","semantic":"timeline","required":true},"selection":{"type":"timeline-range","default":{"schemaVersion":2,"startMs":0,"endMs":0},"description":"Optional selected range. Equal zero values mean the whole timeline.","semantic":"timeline_range","required":false},"request":{"type":"text","default":"Tighten this section while preserving its meaning and media.","description":"The edit to propose.","semantic":"edit_request","required":false}},"outputs":{"edit":{"type":"timeline-edit","primary":true,"description":"A validated proposal previewed before it can alter the timeline.","semantic":"timeline_edit_proposal"}},"permissions":{"project":["context.timeline.read","timeline.propose"],"capabilities":["timeline.propose"],"network":[],"filesystem":[],"secrets":[]},"ui":[{"port":"request","control":"text"}]},"capability":{"schemaVersion":1,"operation":"timeline.propose","context":{"timeline":{"$input":"timeline"},"selection":{"$input":"selection"},"request":{"$input":"request"}},"instruction":"Act as a precise timeline editing assistant. Follow the user's request only within the selected millisecond range when startMs and endMs differ; when both are zero, treat the full timeline as selected. Use only supported StillMade timeline-edit commands. Preserve media URLs, asset and version identities, content outside the range, locked tracks and items, and existing text unless the request explicitly requires a supported change. Prefer the smallest sufficient set of commands. Every command must copy the exact current target into before. Use the timeline activeTimelineId. Never invent clips, audio, captions, tracks, media, transitions, LUTs, or IDs. Return strict JSON only.","maxTokens":3000,"output":"edit"},"view":{"html":"<main class=\"edit-assistant\"><header><h1>Edit Assistant</h1><p>Describe one change, limit it to a range if needed, then review the proposal before Apply.</p></header><label for=\"request\">What should change?</label><textarea id=\"request\" rows=\"5\" maxlength=\"6000\"></textarea><fieldset><legend>Time range in seconds</legend><label for=\"start\">Start<input id=\"start\" type=\"number\" min=\"0\" step=\"0.1\" value=\"0\"></label><label for=\"end\">End<input id=\"end\" type=\"number\" min=\"0\" step=\"0.1\" value=\"0\"></label><p>Leave both at 0 to use the whole timeline.</p></fieldset><button id=\"run\" type=\"button\">Prepare edit</button><output id=\"status\" role=\"status\" aria-live=\"polite\">Waiting for a timeline.</output></main>\n","css":".edit-assistant { box-sizing: border-box; max-width: 760px; min-height: 100%; margin: 0 auto; padding: 24px; color: var(--fg); background: var(--bg); font-family: var(--font-body); }.edit-assistant h1 { margin: 0 0 8px; font-family: var(--font-display); font-size: 36px; font-style: italic; font-weight: 200; }.edit-assistant p,.edit-assistant output { color: var(--fg-muted); }.edit-assistant > label { display: block; margin: 24px 0 8px; }.edit-assistant textarea { box-sizing: border-box; width: 100%; padding: 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-elev-1); color: var(--fg); font: inherit; line-height: 1.6; resize: vertical; }.edit-assistant fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; }.edit-assistant fieldset p { grid-column: 1 / -1; margin: 0; font-size: 12px; }.edit-assistant fieldset label { display: grid; gap: 6px; }.edit-assistant input { box-sizing: border-box; width: 100%; padding: 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-elev-1); color: var(--fg); font: inherit; }.edit-assistant button { display: block; margin: 16px 0; padding: 11px 18px; border: 1px solid var(--fg); border-radius: 999px; background: var(--fg); color: var(--bg); font: inherit; cursor: pointer; }.edit-assistant button:disabled { opacity: .5; cursor: default; }.edit-assistant textarea:focus-visible,.edit-assistant input:focus-visible,.edit-assistant button:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }\n","javascript":"const instruction=document.getElementById('request'),run=document.getElementById('run'),status=document.getElementById('status');\nconst start=document.getElementById('start'),end=document.getElementById('end');\nlet current={},busy=false,revision=0,canEdit=false;\nrun.disabled=true;\nStillMade.bindShared('request','request');\nStillMade.bindShared('start','start');StillMade.bindShared('end','end');\nconst refresh=shared=>{\n canEdit=shared.canEdit;run.disabled=busy||!canEdit||!current.timeline;\n if(!busy)status.textContent=shared.outputs.edit?'Saved proposal ready. Review every change, then Apply.':current.timeline?'Ready to prepare a reviewable edit.':'Waiting for a timeline.';\n};\nStillMade.onShared(refresh);\nStillMade.onInput(input=>{\n current=input;revision+=1;\n StillMade.setSharedDefaults({request:input.request||'',start:input.selection?.schemaVersion===2?input.selection.startMs/1000:0,end:input.selection?.schemaVersion===2?input.selection.endMs/1000:0});\n refresh(StillMade.getShared());\n});\nrun.addEventListener('click',async()=>{\n if(busy||!canEdit)return;\n const request=instruction.value.trim();\n if(!current.timeline){status.textContent='Connect a timeline first.';return;}\n if(!request){status.textContent='Describe the edit you want.';return;}\n const startMs=Math.round(Number(start.value)*1000),endMs=Math.round(Number(end.value)*1000);\n if(!Number.isSafeInteger(startMs)||!Number.isSafeInteger(endMs)||startMs<0||endMs<startMs){status.textContent='Choose a valid time range.';return;}\n const started=revision;busy=true;run.disabled=true;status.textContent='Review the AI call in StillMade to continue.';\n try{const result=await StillMade.run({timeline:current.timeline,selection:{schemaVersion:2,startMs,endMs},request});status.textContent=result.edit?'Proposal ready. Review every change, then Apply.':'No edit proposal was returned.';}\n catch(error){status.textContent=error.message||'The edit could not be prepared.';}\n finally{busy=false;run.disabled=!canEdit||!current.timeline;if(started!==revision)status.textContent='Timeline changed. Run again for the current cut.';}\n});\n"},"tests":[{"name":"Tighten one selected clip","input":{"timeline":{"schemaVersion":1,"activeTimelineId":"timeline-1","tracks":[{"id":"video"}],"clips":[{"id":"clip-1","trackId":"video","kind":"video","url":"https://media.example/clip.mp4","start":0,"duration":6}],"audioItems":[],"captions":[]},"selection":{"schemaVersion":2,"startMs":0,"endMs":6000},"request":"Trim the selected clip to five seconds without replacing it."},"expectations":{"edit":{"kind":"timeline-edit","minCommands":1,"maxCommands":12}}},{"name":"Improve a selected caption","input":{"timeline":{"schemaVersion":1,"activeTimelineId":"timeline-2","tracks":[{"id":"captions"}],"clips":[],"audioItems":[],"captions":[{"id":"caption-1","trackId":"captions","text":"Hello there","start":1,"end":3}]},"selection":{"schemaVersion":2,"startMs":1000,"endMs":3000},"request":"Make the selected caption clearer while keeping its timing."},"expectations":{"edit":{"kind":"timeline-edit","minCommands":1,"maxCommands":8}}}],"portable":{"format":"stillmade-block/1","dependencies":[],"sources":[{"kind":"original","license":"MIT","paths":["LICENSE","src/capability.json","src/view.json"],"evidence":["upstream/0/LICENSE","upstream/0/src/capability.json","upstream/0/src/view.json"],"changes":"Original implementation declared by the packager; no reused repository or dependency code."}],"files":{"upstream/0/LICENSE":"MIT License\n\nCopyright (c) 2026 StillMade contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","upstream/0/src/capability.json":"{\n  \"schemaVersion\": 1,\n  \"operation\": \"timeline.propose\",\n  \"context\": {\n    \"timeline\": {\n      \"$input\": \"timeline\"\n    },\n    \"selection\": {\n      \"$input\": \"selection\"\n    },\n    \"request\": {\n      \"$input\": \"request\"\n    }\n  },\n  \"instruction\": \"Act as a precise timeline editing assistant. Follow the user's request only within the selected millisecond range when startMs and endMs differ; when both are zero, treat the full timeline as selected. Use only supported StillMade timeline-edit commands. Preserve media URLs, asset and version identities, content outside the range, locked tracks and items, and existing text unless the request explicitly requires a supported change. Prefer the smallest sufficient set of commands. Every command must copy the exact current target into before. Use the timeline activeTimelineId. Never invent clips, audio, captions, tracks, media, transitions, LUTs, or IDs. Return strict JSON only.\",\n  \"maxTokens\": 3000,\n  \"output\": \"edit\"\n}","upstream/0/src/view.json":"{\n  \"html\": \"<main class=\\\"edit-assistant\\\"><header><h1>Edit Assistant</h1><p>Describe one change, limit it to a range if needed, then review the proposal before Apply.</p></header><label for=\\\"request\\\">What should change?</label><textarea id=\\\"request\\\" rows=\\\"5\\\" maxlength=\\\"6000\\\"></textarea><fieldset><legend>Time range in seconds</legend><label for=\\\"start\\\">Start<input id=\\\"start\\\" type=\\\"number\\\" min=\\\"0\\\" step=\\\"0.1\\\" value=\\\"0\\\"></label><label for=\\\"end\\\">End<input id=\\\"end\\\" type=\\\"number\\\" min=\\\"0\\\" step=\\\"0.1\\\" value=\\\"0\\\"></label><p>Leave both at 0 to use the whole timeline.</p></fieldset><button id=\\\"run\\\" type=\\\"button\\\">Prepare edit</button><output id=\\\"status\\\" role=\\\"status\\\" aria-live=\\\"polite\\\">Waiting for a timeline.</output></main>\\n\",\n  \"css\": \".edit-assistant { box-sizing: border-box; max-width: 760px; min-height: 100%; margin: 0 auto; padding: 24px; color: var(--fg); background: var(--bg); font-family: var(--font-body); }.edit-assistant h1 { margin: 0 0 8px; font-family: var(--font-display); font-size: 36px; font-style: italic; font-weight: 200; }.edit-assistant p,.edit-assistant output { color: var(--fg-muted); }.edit-assistant > label { display: block; margin: 24px 0 8px; }.edit-assistant textarea { box-sizing: border-box; width: 100%; padding: 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--bg-elev-1); color: var(--fg); font: inherit; line-height: 1.6; resize: vertical; }.edit-assistant fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; }.edit-assistant fieldset p { grid-column: 1 / -1; margin: 0; font-size: 12px; }.edit-assistant fieldset label { display: grid; gap: 6px; }.edit-assistant input { box-sizing: border-box; width: 100%; padding: 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-elev-1); color: var(--fg); font: inherit; }.edit-assistant button { display: block; margin: 16px 0; padding: 11px 18px; border: 1px solid var(--fg); border-radius: 999px; background: var(--fg); color: var(--bg); font: inherit; cursor: pointer; }.edit-assistant button:disabled { opacity: .5; cursor: default; }.edit-assistant textarea:focus-visible,.edit-assistant input:focus-visible,.edit-assistant button:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }\\n\",\n  \"javascript\": \"const instruction=document.getElementById('request'),run=document.getElementById('run'),status=document.getElementById('status');\\nconst start=document.getElementById('start'),end=document.getElementById('end');\\nlet current={},busy=false,revision=0,canEdit=false;\\nrun.disabled=true;\\nStillMade.bindShared('request','request');\\nStillMade.bindShared('start','start');StillMade.bindShared('end','end');\\nconst refresh=shared=>{\\n canEdit=shared.canEdit;run.disabled=busy||!canEdit||!current.timeline;\\n if(!busy)status.textContent=shared.outputs.edit?'Saved proposal ready. Review every change, then Apply.':current.timeline?'Ready to prepare a reviewable edit.':'Waiting for a timeline.';\\n};\\nStillMade.onShared(refresh);\\nStillMade.onInput(input=>{\\n current=input;revision+=1;\\n StillMade.setSharedDefaults({request:input.request||'',start:input.selection?.schemaVersion===2?input.selection.startMs/1000:0,end:input.selection?.schemaVersion===2?input.selection.endMs/1000:0});\\n refresh(StillMade.getShared());\\n});\\nrun.addEventListener('click',async()=>{\\n if(busy||!canEdit)return;\\n const request=instruction.value.trim();\\n if(!current.timeline){status.textContent='Connect a timeline first.';return;}\\n if(!request){status.textContent='Describe the edit you want.';return;}\\n const startMs=Math.round(Number(start.value)*1000),endMs=Math.round(Number(end.value)*1000);\\n if(!Number.isSafeInteger(startMs)||!Number.isSafeInteger(endMs)||startMs<0||endMs<startMs){status.textContent='Choose a valid time range.';return;}\\n const started=revision;busy=true;run.disabled=true;status.textContent='Review the AI call in StillMade to continue.';\\n try{const result=await StillMade.run({timeline:current.timeline,selection:{schemaVersion:2,startMs,endMs},request});status.textContent=result.edit?'Proposal ready. Review every change, then Apply.':'No edit proposal was returned.';}\\n catch(error){status.textContent=error.message||'The edit could not be prepared.';}\\n finally{busy=false;run.disabled=!canEdit||!current.timeline;if(started!==revision)status.textContent='Timeline changed. Run again for the current cut.';}\\n});\\n\"\n}"},"lineage":{"parents":[],"changes":"Packaged original Block source for StillMade."}}}],"license":"MIT"}