mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-04 21:17:30 +00:00
* fix(skills): paid-plan cloud final keeps the composition fps and high quality Follow-up to #6884 from its review: the cloud command agents copy had no --fps, so a 24 or 60 fps composition rendered at 30, and cloud's default `standard` is below the local `delivery` final. Step 5 and cloud.md now spell out `cloud render --fps <data-fps> --quality high -o <path>`; the render table uses `-o` to stay within the entry's byte budget and restores the "Hosted, no local Chrome or FFmpeg" row. — wanbi Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(skills): pin --fps and --quality high on the paid-plan cloud final Review on #6886: a later byte-budget trim of hyperframes-cli/SKILL.md or cloud.md could drop the flags silently. The test asserts both files' paid-plan command reads `cloud render --fps <data-fps> --quality high -o …`. — wanbi Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
58 lines
2.3 KiB
JavaScript
58 lines
2.3 KiB
JavaScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { mkdtempSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
import { tmpdir } from "node:os";
|
|
import { join } from "node:path";
|
|
import {
|
|
checkCoreSkills,
|
|
descriptionOf,
|
|
missingPaths,
|
|
registeredCommands,
|
|
unknownCommands,
|
|
} from "./check-core-skills.mjs";
|
|
|
|
test("the repo's core skills pass", () => {
|
|
assert.deepEqual(checkCoreSkills(), []);
|
|
});
|
|
|
|
test("the skills teach the direct sign-in, not the old key and executable rules", () => {
|
|
const read = (path) => readFileSync(new URL(`../skills/${path}`, import.meta.url), "utf8");
|
|
assert.doesNotMatch(read("reverse-any-video/references/people.md"), /Without a HeyGen key/);
|
|
assert.doesNotMatch(read("media-use/SKILL.md"), /HeyGen calls also need/);
|
|
const heygen = read("media-use/references/heygen.md");
|
|
assert.match(heygen, /~\/\.hyperframes\/credentials/);
|
|
assert.doesNotMatch(heygen, /~\/\.heygen\/credentials/);
|
|
});
|
|
|
|
test("the paid-plan cloud final keeps the composition fps and high quality", () => {
|
|
for (const path of ["hyperframes-cli/SKILL.md", "hyperframes-cli/references/cloud.md"]) {
|
|
const text = readFileSync(new URL(`../skills/${path}`, import.meta.url), "utf8");
|
|
assert.match(text, /`cloud render --fps <data-fps> --quality high -o [^`]+`/, path);
|
|
}
|
|
});
|
|
|
|
test("reads the registered commands, quoted or not", () => {
|
|
const source = `const commandLoaders = {\n init: () => x,\n "catch-up": () => y,\n};`;
|
|
assert.deepEqual([...registeredCommands(source)], ["init", "catch-up"]);
|
|
});
|
|
|
|
test("flags a command the CLI does not register", () => {
|
|
const content = "Run `npx hyperframes check --json`, then `npx hyperframes frame 3`.";
|
|
assert.deepEqual(unknownCommands(content, new Set(["check"])), ["frame"]);
|
|
});
|
|
|
|
test("reads a one-line description", () => {
|
|
assert.equal(
|
|
descriptionOf("---\nname: x\ndescription: Does a thing.\n---\n# x"),
|
|
"Does a thing.",
|
|
);
|
|
});
|
|
|
|
test("flags a path the skill does not ship, and skips placeholders", () => {
|
|
const dir = mkdtempSync(join(tmpdir(), "core-skills-"));
|
|
mkdirSync(join(dir, "references"));
|
|
writeFileSync(join(dir, "references", "a.md"), "# a");
|
|
const content = "`references/a.md`, `references/b.md`, `references/routes/<workflow>.md`";
|
|
assert.deepEqual(missingPaths(content, dir), ["references/b.md"]);
|
|
});
|