计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
hyperframes-video【效率与协作】HyperFrames MP4/GIF videos; motion graphics; explainer clips; 视频、短片、动图、动画成片。
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use the host-provided HyperFrames runtime for video deliverables when it is available in the environment context.
available=true.npx, npx --yes, npm install, global installs, or a user-machine HyperFrames CLI.$BOX_AGENT_NODE "$HYPERFRAMES_RUNNER_PATH" for HyperFrames commands. The runner treats StaticGuard contract messages, browser page errors, missing local assets, and timeline registration timeouts as failures; it also finds the actual rendered MP4, copies it to the requested output path, and runs ffprobe validation.HYPERFRAMES_RUNNER_PATH is missing, fall back to $BOX_AGENT_NODE "$HYPERFRAMES_CLI_PATH" and manually enforce the same checks..) to inspect and render, not index.html. For render, omit --composition unless rendering a separate composition HTML file; --composition main is wrong because main is an id, not a file path.data-composition-id in the project root. Do not leave template-index.html, backups, or reference copies with composition metadata beside index.html; put references outside the project or save them as .txt without composition attributes.$HYPERFRAMES_TEMPLATE_DIR when it exists; it contains the stable composition contract. Treat it as the template root itself, not a templates parent. It may already end in templates/basic-composition, so copy it with cp -R "$HYPERFRAMES_TEMPLATE_DIR"/. <project-dir>/ and use vendor assets from "$HYPERFRAMES_TEMPLATE_DIR/vendor"; do not append another /basic-composition.--strict first. If strict fails, fix the composition and retry rather than handing raw CLI errors to the user.Use this branch when the user asks to convert an existing HTML file, folder, webpage, landing page, or "这里面的 html" into video. The goal is fidelity, not redesign.
index.html, linked CSS/JS, and local assets), then open that exact page in a browser at the target viewport. If the original page renders, capture that page; do not rebuild it from memory.NODE_PATH; do not install anything. Launch Chromium with process.env.BOX_AGENT_PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH || process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH || process.env.HYPERFRAMES_BROWSER_PATH, record the source file://.../index.html with Playwright recordVideo, then convert the recorded WebM to MP4 with $HYPERFRAMES_FFMPEG_PATH.index.html under 5500 characters so it fits in one write_file call with safety margin.[Full tool-call argument omitted from model history]; that is a history placeholder, not file content.append_file only with fresh, literal content that is visibly present in the current tool call. If append fails or the file becomes partial, rewrite a smaller complete file from scratch.</html>. A HyperFrames project should have one complete <!doctype html> ... </html> document.The renderable HTML must have one root composition element with:
data-composition-id="main"
data-duration="5"
data-width="1920"
data-height="1080"
data-start="0"
Use a single, stable composition id unless the user needs multiple outputs. Keep the root width, height, duration, and start aligned with the rendered video. Do not omit data-start; strict/static guard failures for this field are blocking, even when layout sampling says there are 0 issues.
The animation timeline must be seekable:
window.__timelines = window.__timelines || {};
window.__timelines.main = timeline;
window.hyperframesReady = Promise.all(
[...document.images].map(img =>
img.complete && img.naturalWidth > 0
? img.decode().catch(() => undefined)
: new Promise((resolve, reject) => {
img.onload = () => resolve();
img.onerror = () => reject(new Error(`Image failed to load: ${img.src}`));
}),
),
);
window.seekHyperframes = async (time) => {
timeline.pause(time);
};
Register the timeline object itself, not a factory function. Do not use window.__timelines.main = () => timeline or a function that creates and returns a timeline unless the runtime contract explicitly asks for that shape.
If the composition uses local images, screenshots, videos, fonts, or other media, window.hyperframesReady must wait for those assets to load/decode. Promise.resolve() is only acceptable for a composition with no external assets.
When changing the composition id, change the timeline key to exactly match it.
hyperframes-video or another clear task path under the session cwd or the user's explicit destination.mkdir -p hyperframes-video
cp -R "$HYPERFRAMES_TEMPLATE_DIR"/. hyperframes-video/
data-* composition fields and timeline registration intact. For the first successful render, favor a compact 4-6 scene composition that can be written as one complete file.cd hyperframes-video
"$BOX_AGENT_NODE" "$HYPERFRAMES_RUNNER_PATH" inspect .
If the visible tool result is empty or unclear, immediately rerun the check with stderr included, for example:
"$BOX_AGENT_NODE" "$HYPERFRAMES_RUNNER_PATH" inspect . 2>&1 | head -120
If you must use the raw CLI, inspect stderr as well as the exit code. Any [StaticGuard] Invalid HyperFrame contract output is a failure that must be fixed before rendering.
"$BOX_AGENT_NODE" "$HYPERFRAMES_RUNNER_PATH" render . --strict --quality draft --output ../video.mp4
The runner reports final_output=... after copying the actual HyperFrames render into the requested path. Use that path in the final answer; do not guess from the --out argument if the runner reports a different location.
"${HYPERFRAMES_FFPROBE_PATH:-ffprobe}" -v error -show_entries stream=codec_name,width,height,r_frame_rate -show_entries format=duration,size -of json ../video.mp4
rm -rf to clean frame folders; write sampled frames into a fresh subdirectory or overwrite exact known frame files so the client does not stop for destructive-command approval:frames_dir="frames/contact-$(date +%Y%m%d-%H%M%S)"
mkdir -p "$frames_dir"
"${HYPERFRAMES_FFMPEG_PATH:-ffmpeg}" -v error -y -i ../video.mp4 \
-vf "select='eq(n,0)+eq(n,60)+eq(n,150)+eq(n,240)'" -vsync 0 "$frames_dir/frame-%02d.png"
"${HYPERFRAMES_FFMPEG_PATH:-ffmpeg}" -v error -y -framerate 1 -i "$frames_dir/frame-%02d.png" \
-vf "scale=240:-1,tile=4x1" -frames:v 1 "$frames_dir/contact.png"
If sampled frames do not show the requested main visual, key text, and end state, fix the composition and render again. Do not report "验证通过" from ffprobe alone.
Report the final MP4 path, duration, resolution, and any fallback used.
data-composition-id, data-duration, data-width, data-height, and data-start.window.__timelines[compositionId] and implement seekHyperframes.inspect . and render ., not inspect index.html.render --composition expects an HTML file path such as compositions/intro.html; do not pass a composition id like main.template-index.html that still contain data-composition-id; strict render must pass before reporting completion.final_output line, or parse the actual Rendering ... MP4 path and copy it to the user-facing artifact path before reporting completion.FILE_TOOL_ARGUMENT_TOO_LARGE: simplify the composition to one complete HTML file under 5500 characters, usually by generating repeated scene markup from JS arrays. Do not split into append chunks unless every chunk is freshly regenerated literal content.</body></html>, or half-written script.execute_code to inspect images, JSON, paths, or media metadata, print the result explicitly. An expression without print(...) may return (No output).Arial, sans-serif, or bundled/local font assets. Do not rely on system fonts such as PingFang SC unless they are declared with @font-face.transform on the same element with GSAP transform animation. Do not set initial CSS transforms on stickers, badges, tags, or stage elements that GSAP will animate; use gsap.set(...) or a wrapper instead.window.hyperframesReady wait for document.images decode, confirm local asset paths exist, render again, then inspect sampled frames. Do not accept ffprobe-only validation for visual deliverables.