* test(cli): count print calls whose value is not plainly the CLI's own
Each CLI source file's count of such print calls is kept in a baseline,
so a new one shows up in the change that adds it. Print calls whose
output another program reads are named in the test.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): tighten the print count rule
A name the file declares itself is no longer taken for the colour helper
or a converter, a local form of a value counts unless the value is a
number, JSON text inside a line for people counts, and spinner lines and
clack's framing calls are counted too. A file listed with more calls than
it has now gets a message that names the list.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): name the lines other programs parse
The count rule now also sees writes to a bare `stdout` or `stderr`, and
the `@hf-*` lines and the `--json` failure body are listed as output for
another program instead of sitting in the baseline.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
A failed --json run of lambda, cloudrun and beats answered with the
message as people see it on the terminal, with control characters
already written out as text. The JSON message now carries the value as
it was given; the line for people is unchanged.
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): show control characters as text in more lines that repeat a stored value
Lines printed by the timeline edit commands, check, diff, preview --list,
telemetry status, the update and skills notices, the FFmpeg install hint, the
cloud render data-fps warning, the capture font summary, the project key notice
and the plain progress lines of a run with no terminal now pass the repeated
value through the text helpers, as the other commands' lines do.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): leave Windows line endings out of a planned diff
A file saved with CRLF line endings had every changed line of the
planned diff end in a visible \x0d. The line ending is now dropped
before the line is shown; a carriage return inside a line still shows.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* fix(skills): ask before usage notes and destroy, and keep media downloads on public hosts
Media downloads now connect only to an address the host name resolved to after checking it is public; a name that points at a private address is refused before connecting. Skills tell the person once before sending usage notes and honour a no; a catalog gap report no longer carries the search text. Reverse says plainly it needs a HyperFrames Pro sign-in, and cloudrun/lambda destroy wait for the person's yes.
* fix(media-use): give each media download its own connection
* chore(skills): refresh the skills manifest and split out the gap report step
A process that may only read the history folder now finds a live owner's lock busy at once instead of reporting the refused claim write, so readers show the history quietly.
* test(producer): an older GSAP our templates name, or a blocked CDN's GSAP 3, renders offline
* fix(producer): a render serves every GSAP the CLI ships, and its own when the CDN is blocked
* fix(cli): the CLI's size limit covers the GSAP 3.14.2 files renders serve
* fix(cli): make the cache folder private before a pinned download writes into it (SECOPS-2745)
The measuring tools' pinned-file downloader (measure/pinnedFiles.ts, for the
MediaPipe hand landmarker) made its folder with a plain mkdir, downloaded into
it, and only checked the folder was private in the seal afterwards. A folder
another account owned, a group/world-writable one, or a link out of the cache
received the bytes before the refusal. The model downloaders were worse: the
TTS and background-removal models (utils/pinnedFile.ts) and the whisper models
never checked at all, and trusted a cached copy from such a folder.
Every pinned download into the HyperFrames cache now runs
ensurePrivateCacheDir first: a new folder is made 0700, the person's own
group/world-writable folder loses those bits, and a link, a foreign owner or a
folder another account can change is refused before any partial or final file
is written or any cached copy is used. Temp files stay inside the verified
folder and are renamed into place. opencv.ts, which already did this, now
shares ensurePinnedFiles instead of its own copy of the loop.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): keep the pinned downloaders' comment share at the base (SECOPS-2745)
Cuts the comment lines the private-cache fix added to pinnedFiles.ts,
pinnedFile.ts and whisper/manager.ts so each file's comment share is back
at or under its merge-base share, and names ensurePinnedFile's root
cacheRoot so the call reads without the comment.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): publish updates a committed project only when this machine linked the folder (SECOPS-2048)
.hyperframes/project.json travels with every copy of a project (a clone,
a zip, a download), yet publish took its project id and space id as the
update target, and with --yes overwrote any project the recipient could
write without asking.
Publish now updates the descriptor's project, and uses its space, only
when this machine's own link record (outside the folder, keyed by its
path) names the same project and space. The link record now keeps the
space it published into; records from before keep linking their own
project. Otherwise:
- interactively, publish asks "Update project <id> in place? No
publishes this folder as its own project." with No as the default;
No publishes a new project and rewrites the descriptor to it
- with --yes, publish refuses (publish_target_unconfirmed) and points
to --update <id> [--space <space>]
- --update <id> still names the project explicitly, but the
descriptor's space is not used unless --space names it
checkPublishTransition counts the descriptor as a legacy update under
the same rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(cli): carry the publish link rules in names, not comments (SECOPS-2048)
The comment ratchet allows a file's comment share only to go down. Drop
the comments the fix added and name the meaning instead: PERSONAL_SPACE
for the "" space id, recordPredatesSpaces for a link record written
before the space was kept, teamLinkedHere in the publish transition.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* test(cli): keep projectLink's real exports in the publishProject mock (SECOPS-2048)
publishProject now imports PERSONAL_SPACE from projectLink; the mock
replaced the whole module, so the constant was missing.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): print project file names in check's stderr notes as visible escapes (SECOPS-2752)
The text_over_face note printed the unread video's reason raw, and that
reason carries the project's file name and the decoder's own error text,
so a video named with ESC, BEL or CR could drive the terminal during
`hyperframes check`. The same check output path had four more lines
printing project-derived text raw: the project-lock waiting notice (the
holder is read from the project's lock file), the "images did not load"
warning (image addresses read back from the page), the font-localization
warning (the injector's error text), and the saved report's Revision line
(read from the project's history).
Each now goes through the existing @hyperframes/core terminal-text helper:
terminalLines where the text is an error message whose line breaks are
kept, terminalText for one-line notices. Plain names print as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* fix(cli): keep check's escape fix within the comment ratchet and testable on Windows (SECOPS-2752)
Drop the three comment lines the escape fix added to source files, which
raised their comment share. The text_over_face hostile-name test now feeds
the name through the candidate and an injected reader, so it runs on every
platform; the real-reader case, which needs a file named with control
characters, runs everywhere but Windows, whose file names cannot hold them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(core): keep the SVG element and attribute allowlist in its own module
* test(studio): clipboard writes refuse markup a scripting preview reads differently
* fix(studio): paste and duplicate write only allowed markup unless it comes from the same file
* test(core): inline SVG with its namespace declarations pastes from another file
* fix(core): paste keeps SVG namespace declarations and checks xlink:href as a link
* chore(cli): regenerate the media-use SVG sanitizer from its moved allowlist
* test(cli): the doctor output test prints rows without running every machine check
* test(cli): call the row printer directly in the doctor output test
* test(cli): a render's encoder failure or crash names its code for Desktop
* fix(cli): a crashed or encoder-failed render tells Desktop its code
* fix(cli): an encoder failure is named by its encoder class before a file error
* test(cli): a bad source clip or a full disk is not named an encoder exit
* fix(cli): only the encoder's own failures are named encoder exits, file codes first
* fix(cli): a usage error or a --json render keeps stdout free of the code line
* fix(media-use): refuse links under .media before reserving, writing or recording
A received project could carry links at .media, at a type folder, at the
next asset name or its .tmp name, or at the preferences store's temp
names, and resolve or prefs record wrote through them to files outside
the project.
- ownMediaDir now checks every folder down to the type folder, making
each one level at a time, before the lock, the allocator, the record
append or a project preference write touches anything inside it.
- The allocator ignores ids past nine digits, so a planted huge id can't
push it back onto a name the project holds, and it skips any name that
already exists.
- The asset writers and the LUT .tmp writers create new files only.
- The preferences store writes through replaceFile, a random temp name
created exclusively and renamed into place.
Both copies of manifest.mjs and prefs-store.mjs change together.
* test(media-use): read the preferences file through one no-follow handle
The test checked the file's type and then read it by path, which CodeQL
reports as a check-then-use race. Open it once without following a link
and check and read through that handle.
* fix(media-use): keep a failed write's error when replaceFile can't remove its temp file
The preferences store now writes through replaceFile. Its old write made
temp cleanup best-effort, so a cleanup error never hid the write error,
and the store's tests guard that. replaceFile now does the same.
* fix(media-use): leave freezeUrl's write as it was
CodeQL's http-to-file-access rule flags every write of downloaded bytes,
and main already carries that alert on this line. Adding the wx flag only
re-keyed it as new. The reserved name freezeUrl writes is already checked
free in a checked folder, so the line goes back to main's text; copying a
local file keeps COPYFILE_EXCL.
* Revert "fix(media-use): leave freezeUrl's write as it was"
This reverts commit 1427e73ec2.
The still-copying heartbeat that check prints while it makes
browser-playable copies now passes the video's file name through
terminalText, so control characters show as escapes and the line stays
on one line. check --prepare-media prints a failed file's name the same
way, while the reason keeps its own lines.
The printed-text wiring test now also covers the media-copy progress
lines in checkBrowser.ts.
* fix(media-use): a transcript cut named inside the project is never written through a linked folder
* chore(skills): refresh the media-use entry in the skills manifest
* revert(cli): hold the proxy fix and its Node floor for v0.10.0
This reverts commit 2960319749 (#8311), except a stale fallow-ignore line it had removed.
* chore(ci): allow the revert to delete the three files the proxy fix added
* fix(cli): show control characters as text in notices that repeat a failure reason
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): keep a usage hint on one line
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): show control characters as text in prompt-log notices that repeat a failure reason
The source check now also reads clack.log calls. The five notices it
found (play and present port messages, the file approval notice) go
through terminalText.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): a proxy that drops the connection fails a request once instead of retrying nonstop
Raises the minimum Node.js to 22.19, which undici 8 requires.
* fix(cli): drop the comments the comment-share check refuses
* docs: the engine, producer and CLI skill say Node.js 22.19
* test(engine): the dropping proxy matches its host exactly
* chore(skills): rehash the CLI skill after the merge
* docs(skills): keep the CLI skill within its size budget
* chore(skills): rehash the CLI skill after the trim
* fix(core): show text direction marks as visible text in printed lines
The unknown-command line and its suggestion follow the same rule.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): move the unknown-command text test to a file of its own
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): write the direction mark in the test as an escape
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): run the unknown command text test with the default test group
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): keep the suggestion under an unknown command on one line
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): show typed and project text as visible text in every line cli.ts prints
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): show typed text as visible text in the missing-value and extra-argument lines
The two argument checks that print their own line now show control
characters and line breaks in the repeated word as visible text. JSON
output keeps the message as built. A usage error from the argument
parser prints on one line like the CLI's own.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* fix(studio-server): history keeps undo steps in order when file times and its clock disagree
* fix(studio-server): a removal made while a turn was closed can join that turn
* test(cli): both of check's deadlines report check_deadline
* fix(cli): check reports its own deadlines as check_deadline
* test(cli): the --timeout idle window also reports check_deadline
* test(cli): the Windows Chrome watchdog spares a pid that now runs another program
* fix(cli): the Windows Chrome watchdog kills only its own Chrome, never a reused pid
* test(cli): no preview lifecycle test may end a real process by a made-up pid
* fix(cli): the log-path preview test stops its made-up child through a fake, not a real kill
* test(cli): the Windows child reaper spares a held pid that now runs another program
* fix(cli): the Windows child reaper kills only the child it started, never a reused pid
* test(cli): the reaper's stand-ins outlive the fixture, so only the reaper can end them
* test(cli): the kill-failure test keeps processTree's other exports, which the reaper reads
* fix(cli): print check and validate setup commands on their own lines
When no browser can be set up on Linux ARM64, check and validate now
print the setup commands on lines of their own after the reason.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): split setup commands only for a stopped check
A finding with any other code keeps its whole message on one line.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): print capture setup commands on their own lines
When a capture fails because no browser can be set up on Linux ARM64, the
reason stays on the `Capture failed:` line and the setup commands this CLI
writes follow it on separate lines, instead of being joined to it with
`\x0a`. The design style extraction notice now keeps its reason on one line
like the other capture warnings. JSON output and BLOCKED.md are unchanged.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* refactor(cli): name the setup lines field for what it holds
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): read --json before the command name the same as after it
`hyperframes --json <command>` turned on the JSON failure answer but never
reached the command, so the command printed for people. The flag now moves
behind the command's own arguments before anything reads them, so both
spellings are one run: a command with a `json` flag answers in JSON, and a
command without one refuses the flag as it already did after its name.
A `--json` behind `--` is an argument and no longer turns the JSON failure
answer on.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): follow --json to its one meaning in the entry-point cases
Rows that put --json before the command name to see a command's lines
for people now run without it, and the word-tier catalog case checks
the ready-to-paste command.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): drop init's handling for a JSON run that can no longer start
init has no JSON output, and --json is now refused in both positions before
init runs. The status holding, the JSON-run check and init's own answer text
had no caller left. Its tests run without --json and assert the printed line.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): let the command table load preview where the studio packages are not built
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): read --json before `help <command>` the same as after it
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): cover command words run with no subcommand in the --json table
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): a catalog gap report never carries a query a shell would run
* fix(cli): a catalog gap report hands back a line only when every shell reads the query as text
* test(cli): type the envelope's query and expect sh double quotes around an apostrophe
* fix(cli): keep notices and capture warnings to the line they are printed on
A warning or failure reason from capture, and the command named in the
left-out-files notice, could carry a line break and start a line of
their own. They are printed as one line now, control characters shown
as text. The figma component, usage and measure hands status lines go
through the same helper.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* docs(cli): describe how printed lines show control characters and line breaks
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* docs(cli): name the commands whose printed lines changed
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): a received-files write waits while Windows still holds the lock file
* fix(cli): a received-files write waits out a held lock instead of failing on Windows
* test(cli): the held-lock test matches the lock by its ending, as Windows spells temp short
* test(cli): a stop finds the process its child started even when pgrep fails
* fix(cli): a stop reads the process tree from /proc on Linux, so load cannot hide a child
* fix(cli): show control characters as text in init, skills and render printed lines
Lines that quote a name, a path, a flag value, a tool's reply or a caught
message now pass it through terminalText / terminalLines before printing.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): build the expected init path with the platform separator
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): init prints only commands that run as written; one line per render progress update
A project name or old-flag value with a control character is left out of the
printed commands: the next steps say to go into the project folder, and the
renamed-flag examples use a placeholder. A render progress update whose text
has line breaks is written as one line.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): init answers a --json run with a refused value as given
With --json before the command name, a refused --resolution, a missing --video
or --audio file, a folder that is not empty and a failed example now report
the value as it was given in the answer, and as visible text on the terminal.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): init's renamed-flag refusals answer --json with the value as given
The two lines keep the example people see. A --json answer now names the flag
and the value as typed. One entry-point case per init failure line, and a check
that a new failure line cannot be added with a bare console.error.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): answer a --json init failure with the value exactly as given
A failure line's values now reach the answer untouched, line breaks and
trailing spaces included. Status lines wait until the project is made, so
a later failure still answers in JSON, and a run that asked for JSON no
longer stops to ask questions. Next steps for a folder name that cannot
be typed back are printed as bare commands under a prose line.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): hold a converted video's status lines with the rest of init's
With every answer given by flags, init printed the two lines about
converting a video through a spinner, apart from its other status lines.
At a terminal that drew on stdout ahead of the JSON answer to a failed
run. They now go the same way as the other status lines; the run that
asks questions keeps its spinner.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): cover a failed project after a converted video in a JSON run
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): show control characters as text in more commands' printed lines
tts, remove-background, media-treatment, telemetry, docs, update, add,
catalog, diff, doctor, clean, compare and grade-compare now pass quoted
names, paths, queries and caught messages through terminalText or
terminalLines at the line that prints them. JSON output is unchanged.
Refs #8336.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): remove-background --json reports a refused flag's value as given
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): docs answers a --json run with an unknown topic as given
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): telemetry, catalog and tts answer a --json run with the value as given
With --json before the command name these commands print their lines for
people, and the answer was built from those lines, so it carried the
visible form of a control character instead of the value.
- telemetry: an unknown subcommand and a preference that cannot be saved
- catalog: a query with no searchable words and a registry that cannot be read
- tts: a failed synthesis answers with the reason alone
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): explain the catalog gap report in words when the query cannot be printed as typed
The hint printed a ready-to-paste feedback command with the query in it. A
query with a line break or another control character was shown rewritten
inside that command, so pasting it reported different text. Both hint
branches now print the command only when it prints unchanged, and a plain
sentence otherwise. The JSON report_gap value is unchanged.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): show control characters as text in the remaining commands' printed lines
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* fix(cli): capture --json reports a failed run's values as given
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
* test(cli): match the capture output folder on any platform
The folder is printed as a full path, so its root and separators differ on Windows.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>