Files
hyperframes/docs
Michael Wang 8239fe4702 fix: the dev Studio's renders follow the received-project rule, and a received project's .env keys never replace the person's own (#8004)
* fix(studio): dev Studio renders apply the received-project rule for outside files

The Vite Studio adapter started every render with files from outside the
project allowed. It now asks the CLI's outsideAssetsAllowed, the same check
the CLI's embedded Studio, hyperframes render and benchmark use. A project
whose received-files record lists code files, or cannot be read, renders
without files from outside the project, and the reason prints with a
[studio] prefix.

The adapter loads the rule from the CLI source through the dev server, as it
already does for background removal. It runs only from a source checkout, so
studio takes no package dependency on the CLI.

* fix(cli): a received project's .env provider key never replaces your own credential

A received project's .env could set OPENROUTER_API_KEY, GEMINI_API_KEY,
GOOGLE_API_KEY or Vertex settings that outranked a vision or Gemini
credential the person set in the shell, so capture, snapshot describe and
media-use speech and music could send content to another account.

After the CLI and capture load a project .env, each provider key it set is
unset when that .env came with a received project (a received-files record
lists it, or a record cannot be read) and the person has their own
credential for a competing provider. One stderr line names the key, the
.env file and the credential used instead.

A person's own project .env keeps its keys and its current precedence, so
an OPENROUTER_API_KEY in a project .env still wins over a Gemini key in the
shell, as the docs describe. Voice needs no change: the person's HeyGen
credential already ranks above ElevenLabs.

* fix(cli,media-use): media-use scripts apply the received .env rule, ElevenLabs included

The media-use audio scripts read the project .env again, so a Gemini key the
CLI had left out came back. They now apply the same rule after loading: a
key from a received project's .env gives way to the person's own credential
for a competing provider. GEMINI_API_KEY and GOOGLE_API_KEY give way to the
person's Gemini key or service account. ELEVENLABS_API_KEY gives way to the
person's HeyGen sign-in, saved key or shell key. A dropped key gets one
stderr line that names the file and the credential used instead.

A received ElevenLabs key that is still used, because the person has no
competing credential, gets one stderr line naming the .env before speech
starts. hyperframes media-use tells the engine which keys it took from a
project .env (HYPERFRAMES_PROJECT_ENV_ORIGINS), so a key the CLI loaded is
not mistaken for the shell's.

When the project's folders are too many to scan for received-files
records, the CLI's note now says the project's origin could not be
checked, instead of calling it a received project.

* refactor(studio): check the shape of the CLI's outside-files rule before calling it

The Vite adapter loads outsideAssetsAllowed from the CLI source at run time.
It now checks that the export is a function and treats only a true result
as allowed, instead of casting the module's export.

* docs(auth): a received project's ElevenLabs key gives way to your HeyGen credential

* test(studio): load the received-project rule before render waits start
2026-11-17 05:04:15 +00:00
..
2026-11-17 01:59:35 +00:00