feat(cli): add agent-first media treatment tools

This commit is contained in:
ukimsanov
2026-07-24 18:42:07 -07:00
parent e710a1686f
commit 4582881d00
28 changed files with 3402 additions and 62 deletions
+28
View File
@@ -553,6 +553,7 @@ test("--help exits 0", () => {
assert.ok(out.includes("media-use resolve"));
assert.ok(out.includes("--type"));
assert.ok(out.includes("--for"));
assert.ok(out.includes("--analyze"));
assert.ok(out.includes("--from"));
assert.ok(out.includes("--local-only"));
assert.ok(out.includes("--stats"));
@@ -765,6 +766,33 @@ test("smart grade merges measured adjust and keeps stdout valid JSON", () => {
cleanup();
});
test("grade analysis returns evidence without recording a candidate", () => {
if (!HAS_FFMPEG) {
console.log(" (skipped: ffmpeg not on PATH)");
return;
}
setup();
const frame = makeFrame(tmp, "under.png", "0x202020");
const proc = spawnResolve([
"--type",
"grade",
"--for",
frame,
"--analyze",
"--project",
tmp,
"--json",
]);
assert.equal(proc.status, 0, proc.stderr);
const parsed = JSON.parse(proc.stdout);
assert.equal(parsed.ok, true);
assert.equal(parsed.type, "grade-analysis");
assert.ok(parsed.adjust.exposure > 0, "under-exposed frame should suggest lift");
assert.ok(parsed.measured.frames > 0);
assert.equal(readManifest(tmp).length, 0);
cleanup();
});
test("emitted grading block survives the core normalizeHfColorGrading contract", () => {
if (!CAN_TSX) {
console.log(" (skipped: tsx / core source unavailable)");