Add MiniMax and PinkCherry LTX as pickable video engines, with still or text start.

Shot 1 can run text-to-video; later shots still extend from the last frame. Recommend output is also normalized into shot-script cards.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-27 19:38:53 -05:00
co-authored by Cursor
parent 2bebeea526
commit 40cd17f35c
15 changed files with 676 additions and 120 deletions
+39
View File
@@ -1,3 +1,5 @@
import { parseShotScript } from './parseShots'
export function parseEditPasses(text: string): string[] | null {
const src = String(text || '').replace(/\r\n/g, '\n')
const marker = /^[ \t]*---pass\s+(\d+)---[ \t]*$/gim
@@ -21,3 +23,40 @@ export function parseEditPasses(text: string): string[] | null {
export function looksLikeShotScript(text: string) {
return /^[ \t]*shot\s+[2-9]\d*\b/im.test(String(text || ''))
}
function stripFences(text: string) {
return String(text || '')
.replace(/^\s*```(?:[\w-]+)?\s*\n?/, '')
.replace(/\n?```\s*$/, '')
.trim()
}
function splitInlineShotMarkers(text: string) {
return String(text || '')
.replace(/\r\n/g, '\n')
.replace(/(^|[^A-Za-z])shot\s+(\d+)\s*[:.)\-]?\s*/gi, '$1\n\nshot $2\n')
.replace(/\n{3,}/g, '\n\n')
.trim()
}
function formatShotBody(body: string) {
let text = String(body || '').trim()
text = text.replace(/^\s*[:.\-–)]\s*/, '')
text = text.replace(/\s*\[SHOT CONFIGURATION\]\s*/gi, '\n\n[SHOT CONFIGURATION]\n')
text = text.replace(/\s*\[SUBJECT DIRECTION(?:\s*&\s*ACTION)?\]\s*/gi, '\n\n[SUBJECT DIRECTION & ACTION]\n')
text = text.replace(/\s*\[AUDIO CUES\]\s*/gi, '\n\n[AUDIO CUES]\n')
text = text.replace(/[ \t]+\n/g, '\n').replace(/\n{3,}/g, '\n\n').trim()
return text
}
export function normalizeShotScript(text: string) {
const src = splitInlineShotMarkers(stripFences(text))
const shots = parseShotScript(src)
if (!shots.length) return src
if (shots.length === 1 && !/^[ \t]*shot\s+\d+\b/im.test(src)) {
return formatShotBody(shots[0].prompt)
}
return shots
.map(shot => `shot ${shot.n}\n${formatShotBody(shot.prompt)}`.trim())
.join('\n\n')
}