// A synthetic video project for the video assistant (release 38 lane E): the // reactions project's cut (reactionProject.mjs) with a look on it -- a quick // blur slide, room at both edges, the loudness evened -- and a fourth clip // with a wide window; a deck variant with an effect on; and the REQUEST TABLE, // what a person asks for in words, what a model answers (in the ops' one // shape, `{op, id, key, value}`) and what the checks make of it. // // Synthetic, like everything in the kit: no real project, recording or person. import { mkdirSync, writeFileSync } from "node:fs"; import path from "node:path"; import { reactionProject } from "./reactionProject.mjs"; export const ASSIST_NOTE = "n_assist0001"; export const ASSIST_AT = "2026-10-20T00:00:00.000Z"; /** The look the plain cut starts with. */ export const ASSIST_LOOK = Object.freeze({ headerHeight: 0, footerHeight: 0, transition: 0.22, transitionStyle: "blurslide", loudness: Object.freeze({ target: -16 }), room: Object.freeze({ tail: true, head: true }), }); /** The plain cut (no deck): r001–r003 from the reactions project, and r004, a clip whose window is wide. */ export function assistManifest() { const { manifest } = reactionProject(); const m = structuredClone(manifest); m.render = { width: 1920, height: 1080, fps: 30, ...structuredClone(ASSIST_LOOK) }; m.timeline.push({ type: "clip", id: "r004", channel: m.timeline[0].channel, video: m.timeline[0].video, start: 500, end: 530, cutStart: 510, cutEnd: 520, quote: "" }); return m; } /** The same cut under a deck, with the glitch on. */ export function assistDeckManifest() { const m = assistManifest(); const { captions: _c, ...render } = m.render; m.render = { ...render, transitionStyle: "fade", chrome: { engine: "hyperframes", layout: "deck", deck: { qr: { show: false } }, fx: { glitch: {} } } }; return m; } const op = (o, id, key, value) => ({ op: o, id, key, value }); /** * The request table: `{ request, scope?, deck?, answer, diff, refused }` -- * `answer` the model's `{ops, reply}`, `diff` the diff lines kept (in order), * `refused` a pattern each refusal's reason matches (in order). */ export const ASSIST_REQUESTS = Object.freeze([ { request: "make the joins 0.15 s", answer: [op("look", "", "transition", 0.15)], diff: ["join 0.22 s → 0.15 s"], refused: [] }, { request: "quicker joins", answer: [op("look", "", "transition", 0.12)], diff: ["join 0.22 s → 0.12 s"], refused: [] }, { request: "no QR", answer: [op("look", "", "qr", false)], diff: ["QR code on → off"], refused: [] }, { request: "louder", answer: [op("look", "", "loudness", -14)], diff: ["loudness -16 LUFS → -14 LUFS"], refused: [] }, { request: "smear less", answer: [op("slide", "", "blur", 0.3)], diff: ["smear 0.5 → 0.3"], refused: [] }, { request: "keep 2 s after the last word", answer: [op("room", "", "maxS", 2)], diff: ["room tail up to 2.5 s → 2 s"], refused: [] }, { request: "cut the first 3 seconds of r002", scope: "clips", answer: [op("clip_edges", "r002", "start", 91)], diff: ["r002 in 88 s → 91 s"], refused: [] }, { request: "make the joins 5 seconds long", answer: [op("look", "", "transition", 5)], diff: [], refused: [/render\.transition must be a number of seconds from 0 \(a hard cut\) to 3/] }, { request: "hard cuts, no joins", answer: [op("look", "", "transition", 0)], diff: ["join 0.22 s → a hard cut"], refused: [] }, { request: "dip to black between clips", answer: [op("look", "", "transitionStyle", "fadeblack")], diff: ["join style blur slide → dip to black"], refused: [] }, { request: "the slide travels too far", answer: [op("slide", "", "travel", 0.04)], diff: ["slide travel 0.08 → 0.04"], refused: [] }, { request: "no grain on the slide", answer: [op("slide", "", "grain", 0)], diff: ["grain 2 → 0"], refused: [] }, { request: "turn on speaker captions", answer: [op("look", "", "captions", true)], diff: ["speaker captions off → on"], refused: [] }, { request: "even out the volume at -18", answer: [op("look", "", "loudness", -18)], diff: ["loudness -16 LUFS → -18 LUFS"], refused: [] }, { request: "leave the sound as recorded", answer: [op("look", "", "loudness", null)], diff: ["loudness -16 LUFS → as recorded"], refused: [] }, { request: "no muted lead-in", answer: [op("room", "", "head", false)], diff: ["room head on → off"], refused: [] }, { request: "no room on r003", scope: "clips", answer: [op("clip_room", "r003", "off", true)], diff: ["r003 room the cut's (tail + head) → none"], refused: [] }, { request: "end r001 a second later", scope: "clips", answer: [op("clip_edges", "r001", "end", 48)], diff: ["r001 out 47 s → 48 s"], refused: [] }, { request: "start r001 at 30", scope: "clips", answer: [op("clip_edges", "r001", "start", 30)], diff: [], refused: [/outside the clip's source window \(38\.5–48\.5 s\)/] }, { request: "tighten r004 to start at 516", scope: "clips", answer: [op("clip_edges", "r004", "start", 516)], diff: [], refused: [/moves an edge 6 s; one op moves an edge at most 3 s/] }, { request: "cut the first 6 seconds of r004", scope: "clips", answer: [op("clip_edges", "r004", "start", 516)], diff: ["r004 in 510 s → 516 s"], refused: [] }, { request: "a bigger header", answer: [op("look", "", "headerHeight", 56)], diff: ["header off → 56 px"], refused: [] }, { request: "make the joins 0.15 s with less smear", answer: [op("look", "", "transition", 0.15), op("slide", "", "blur", 0.3)], diff: ["join 0.22 s → 0.15 s", "smear 0.5 → 0.3"], refused: [] }, { request: "tighten r002 a little", scope: "look", answer: [op("clip_edges", "r002", "end", 98)], diff: [], refused: [/a clip_edges op is outside what was asked about \(look\)/] }, { request: "add a spinning logo", answer: [{ op: "html", id: "", key: "", value: "
" }], diff: [], refused: [/no op "html"/] }, { request: "glitch the deck", scope: "fx", answer: [op("fx", "deck", "motion.in", 0.6)], diff: [], refused: [/this cut does not draw deck/] }, { request: "slow the deck's slide in", deck: true, scope: "fx", answer: [op("fx", "deck", "motion.in", 0.6)], diff: ["the deck's slide in 0.45 s → 0.6 s"], refused: [] }, { request: "a longer glitch, 3 seconds", deck: true, scope: "fx", answer: [op("fx", "fx.glitch", "seconds", 3)], diff: [], refused: [/the glitch's length is seconds from 0\.2 to 1\.5/] }, { request: "a taller deck", deck: true, scope: "fx", answer: [op("fx", "deck", "height", 300)], diff: [], refused: [/deck has no param "height"/] }, ]); /** The model's answer for a row: `{ops, reply}` in the schema's shape. */ export const answerOf = (row) => ({ ops: row.answer, reply: "" }); /** * The project on disk: its manifest (plain, or the deck variant), and with * `note` a notes.json holding an open comment on the whole project. * @param {string} dir * @param {{ deck?: boolean, note?: string | null, anchor?: Record }} [o] */ export function writeAssistProject(dir, { deck = false, note = null, anchor = { kind: "whole" } } = {}) { const manifest = deck ? assistDeckManifest() : assistManifest(); mkdirSync(dir, { recursive: true }); writeFileSync(path.join(dir, "video.manifest.json"), `${JSON.stringify(manifest, null, 2)}\n`); if (note) { writeFileSync( path.join(dir, "notes.json"), `${JSON.stringify({ version: 1, subject: { kind: "video-project", project: path.basename(dir) }, notes: [{ id: ASSIST_NOTE, status: "open", author: "operator", text: note, at: ASSIST_AT, updatedAt: ASSIST_AT, anchor, replies: [] }] }, null, 1)}\n`, ); } return { dir, manifest }; }