From 00c66eb1db692c795c611b5bf1282dc12aa13a78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Mon, 13 Jul 2026 00:52:18 +0000 Subject: [PATCH 1/2] fix(media-use): ingest derived video outputs --- skills/media-use/scripts/resolve.mjs | 7 +++++-- skills/media-use/scripts/resolve.test.mjs | 14 ++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/skills/media-use/scripts/resolve.mjs b/skills/media-use/scripts/resolve.mjs index 617443ac70..986f0722d4 100644 --- a/skills/media-use/scripts/resolve.mjs +++ b/skills/media-use/scripts/resolve.mjs @@ -19,6 +19,8 @@ import { findGlobalBySha } from "./lib/cache.mjs"; import { heygenAuthMethod } from "../audio/scripts/lib/heygen.mjs"; import { buildCube, paramsFromIntent } from "./lib/cube-build.mjs"; import { validateCubeFile } from "./lib/cube-validate.mjs"; + +const INGEST_TYPES = [...listTypes(), "video"]; import { analyzeMediaGrade, formatMeasuredNote } from "./lib/grade-analyzer.mjs"; import { freezeLibraryLut, @@ -720,8 +722,8 @@ async function resolveColor(type, intent, options) { } async function ingest(src) { - if (!type || !listTypes().includes(type)) { - console.error(`error: --from requires --type (one of: ${listTypes().join(", ")})`); + if (!type || !INGEST_TYPES.includes(type)) { + console.error(`error: --from requires --type (one of: ${INGEST_TYPES.join(", ")})`); process.exit(2); } const isUrl = /^https?:\/\//i.test(src); @@ -1135,6 +1137,7 @@ const DEFAULT_EXT = { icon: ".svg", logo: ".svg", brand: ".png", + video: ".mp4", grade: ".cube", lut: ".cube", }; diff --git a/skills/media-use/scripts/resolve.test.mjs b/skills/media-use/scripts/resolve.test.mjs index fea0e3be8c..36eef549df 100644 --- a/skills/media-use/scripts/resolve.test.mjs +++ b/skills/media-use/scripts/resolve.test.mjs @@ -379,6 +379,20 @@ test("--help exits 0", () => { assert.ok(out.includes("--stats")); }); +test("--from registers a derived video as documented", () => { + setup(); + const source = join(tmp, "derived.mp4"); + writeFileSync(source, "derived video bytes"); + + const out = runResolve(["--from", source, "--type", "video", "--project", tmp, "--json"]); + const parsed = JSON.parse(out.trim()); + assert.equal(parsed.ok, true); + assert.equal(parsed.type, "video"); + assert.match(parsed.path, /^\.media\/video\/video_001\.mp4$/); + assert.equal(readManifest(tmp)[0]?.type, "video"); + cleanup(); +}); + test("unknown type error lists grade and lut", () => { try { runResolve(["--type", "bogus", "--intent", "x"], { stdio: "pipe" }); From 1b627e2313626604613da0682f6d7bb4c3d64001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Mon, 13 Jul 2026 01:55:32 +0000 Subject: [PATCH 2/2] style(media-use): keep ingest types after imports --- skills-manifest.json | 2 +- skills/media-use/scripts/resolve.mjs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/skills-manifest.json b/skills-manifest.json index dd90e451b2..21eeca454e 100644 --- a/skills-manifest.json +++ b/skills-manifest.json @@ -46,7 +46,7 @@ "files": 10 }, "media-use": { - "hash": "2b235d475759716a", + "hash": "881facf2d5e94517", "files": 122 }, "motion-graphics": { diff --git a/skills/media-use/scripts/resolve.mjs b/skills/media-use/scripts/resolve.mjs index 986f0722d4..ba38636eea 100644 --- a/skills/media-use/scripts/resolve.mjs +++ b/skills/media-use/scripts/resolve.mjs @@ -19,8 +19,6 @@ import { findGlobalBySha } from "./lib/cache.mjs"; import { heygenAuthMethod } from "../audio/scripts/lib/heygen.mjs"; import { buildCube, paramsFromIntent } from "./lib/cube-build.mjs"; import { validateCubeFile } from "./lib/cube-validate.mjs"; - -const INGEST_TYPES = [...listTypes(), "video"]; import { analyzeMediaGrade, formatMeasuredNote } from "./lib/grade-analyzer.mjs"; import { freezeLibraryLut, @@ -37,6 +35,8 @@ import { versionLessThan, } from "./lib/heygen-cli.mjs"; +const INGEST_TYPES = [...listTypes(), "video"]; + // resolve shells `fetch`/`freezeUrl` and modern ESM; 18 is the floor where those // exist without flags. Named so the --doctor node check verifies something real // (O2). Declared before the top-level `--doctor` branch that calls runDoctor().