* fix(cli): own render-slot lock dir; refuse cache files other accounts can write Sharing one render slot across accounts no longer means sharing HYPERFRAMES_CACHE_DIR, which holds the browser, packages and helpers each account runs. HYPERFRAMES_RENDER_LOCK_DIR names a folder of lock records only, created sticky and writable by all (1777); the per-user lock folder is created 0700. Help text, errors and docs no longer suggest sharing the cache or chmod 777. foreignWritablePath (core/cache-dir) refuses a cached file whose path up to the cache root is owned by another account or is group/world-writable. Chrome (CLI, engine, inspector), optional packages (incl. the Sherpa runtime), the whisper.cpp build, the TTS script, the Apple audio helpers, opencv.js and the Lambda handler reinstall or rebuild instead of running such a file, and trustedCacheRoot moves their installs to ~/.cache/hyperframes when another account can write HYPERFRAMES_CACHE_DIR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): seal own cache installs against umask 002 and repair old lock folder modes sealCacheInstall (core/cache-dir) takes group and world write off what this account just installed and the folders above it up to the cache root, so an install made under umask 002 passes foreignWritablePath on the next run instead of being refused and fetched again. Chrome, optional packages, the whisper.cpp build, opencv.js, the TTS script, the Apple audio helpers and the Lambda handler call it after installing. ensureLockDir makes an existing per-user lock folder 0700 again when an older release left it open, and adds the sticky bit to an existing HYPERFRAMES_RENDER_LOCK_DIR folder, warning once with the folder's name when it cannot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * refactor(cli): drop added comments to pass the comment ratchet The explanations move into names: the mode bits in core/cache-dir are GROUP_OR_WORLD_WRITE and WITHOUT_GROUP_OR_WORLD_WRITE, and the owner check is anotherAccountCanWrite. No change in behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): verify the lock folder through a no-follow handle and stage installs owner-only The render lock folder is opened with O_NOFOLLOW | O_DIRECTORY and checked and chmod-ed through that descriptor: a link, or a folder another account owns (root may own a shared one), is refused with RenderLockFolderRefused instead of being made world-writable or used as is. Chrome staging, the optional-package staging folder, the whisper.cpp build folder and the opencv, TTS, Apple helper and Lambda handler folders are created 0700, and Chrome's staged tree is sealed before it leaves staging, so nothing is group-writable while it installs. foreignWritablePath accepts a sticky folder owned by this account or root, as /tmp is, and tolerates a statSync without options; tests whose cache sat directly in /tmp, and tests that mock statSync, failed on both. Docs note that a record naming a live process of another account holds the shared slot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(cli): skip the uid-based Chrome cache refusal cases where there is no uid Windows has no process.getuid, so the ownership check never runs there and the two cases that expect a refusal cannot hold. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(core): raise the unpacked size budget for the cache ownership checks core grew to 4418013 bytes unpacked with foreignWritablePath, sealCacheInstall and trustedCacheRoot; the budget follows the usual 5% headroom over that size. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@hyperframes/core
Types, parsers, generators, compiler, linter, runtime, and frame adapters for the Hyperframes video framework.
Install
npm install @hyperframes/core
Most users don't need to install core directly — the CLI, producer, and studio packages depend on it internally.
What's inside
| Module | Description |
|---|---|
| Types | TimelineElement, CompositionSpec, Asset, canvas dimensions, defaults |
| Parsers | parseHtml — extract timeline elements from HTML; parseGsapScript — parse GSAP animations |
| Generators | generateHyperframesHtml — produce valid Hyperframes HTML from a composition spec |
| Compiler | compileTimingAttrs — resolve data-start / data-duration into absolute times |
| Linter | lintHyperframeHtml — validate Hyperframes HTML (missing attributes, overlapping tracks, etc.) |
| Runtime | IIFE script injected into the browser — manages seek, media playback, and the window.__hf protocol |
| Frame Adapters | Pluggable animation drivers (GSAP, Lottie, CSS, or custom) |
Generated composition trust
Composition generators require trusted authors for code-bearing inputs. styles and
generateHyperframesStyles preserve authored CSS, which can load external resources.
animations may contain __raw: values that are emitted as JavaScript;
includeScripts: true includes executable timeline code. serializeGsapAnimations
also accepts raw preamble, postamble, and a code-bearing timelineVar. Never fill
these inputs with untrusted data. Attribute encoding and closing-tag containment
are not a sandbox; render untrusted compositions in an appropriately isolated
execution environment and never serve them on a privileged origin.
Text content retains the supported inline-formatting sanitizer contract. The clip parser intentionally flattens inner formatting to text, so parse/generate is not a lossless replacement for editing the source HTML.
Frame Adapters
A frame adapter tells the engine how to seek your animation to a specific frame:
import { createGSAPFrameAdapter } from "@hyperframes/core";
const adapter = createGSAPFrameAdapter({
getTimeline: () => gsap.timeline(),
compositionId: "my-video",
});
Implement FrameAdapter for custom animation runtimes:
import type { FrameAdapter } from "@hyperframes/core";
const myAdapter: FrameAdapter = {
id: "my-adapter",
getDurationFrames: () => 300,
seekFrame: (frame) => {
/* seek your animation */
},
};
Parsing and generating HTML
import { parseHtml, generateHyperframesHtml } from "@hyperframes/core";
const { elements, metadata } = parseHtml(htmlString);
const html = generateHyperframesHtml(spec);
Linting
import { lintHyperframeHtml } from "@hyperframes/core/lint";
const result = lintHyperframeHtml(htmlString);
// result.findings: { severity, message, elementId }[]
Documentation
Full documentation: hyperframes.heygen.com/packages/core
Related packages
@hyperframes/engine— rendering engine that drives the browser@hyperframes/producer— full render pipeline (capture + encode)hyperframes— CLI