mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-23 11:29:54 +00:00
e83ddaed28b426104c041c3e7fe3fa9eee9689ad
7
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
183bf2a416 |
fix(cli): keep files received that a host's kept record still lists (#8100)
* fix(cli): keep files received that a host's kept record still lists When the received-state file names a project as expected and the host keeps its own copy of that project's record beside the state file, the received-file checks read the record together with each entry that copy lists whose path still holds something. A record shortened or emptied outside the host no longer makes those files read as the person's own. A kept copy with no list, a doubted one, a link or one that cannot be read counts every file as received; with no kept copy, nothing changes. * fix(cli): keep a record's own lines when the host's kept copy cannot be read A kept copy with no list, or one that cannot be read, now counts every file as received through its own entry, named by the kept copy's path, instead of hiding the record's lines from Studio's rename and move tracking. A copy found only by folder identity counts only when its identity matches the folder, and a copy that disappears mid-read counts as no copy. * docs(cli): say a kept entry whose file is gone is not added back |
||
|
|
061ff5bbb0 |
fix(cli): never write project records through symlinks under .hyperframes (#7950)
* fix(cli): never write project records through symlinks under .hyperframes The committed team descriptor (.hyperframes/project.json) and the HeyGen job log (.hyperframes/heygen-jobs.jsonl) were written with path-based mkdir/write/ append calls that follow links, so a cloned project could point either file, or .hyperframes itself, at a file outside the project and have publish or a paid HeyGen job overwrite or append to it. - projectRecords: add appendRecord (O_NOFOLLOW open, same plain file checked by fstat/lstat, real folders from .hyperframes) and recordKind. - writeTeamProject goes through writeRecord (exclusive temp + rename), so a link at project.json is replaced, never written through, and a linked .hyperframes is refused. - readTeamProject refuses a linked or non-plain descriptor (or a linked .hyperframes) instead of reading it as absent, which stops publish before it would write one. - The job log and project voice picks go through appendRecord and fail with a Fix when refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): route every remaining .hyperframes write through link-refusing helpers Writers that still made or wrote into a project's .hyperframes with path-based mkdir/write calls now refuse a linked or non-folder .hyperframes and never write through a link: - project lock: folder via recordFolder (the exclusive lock create stays) - lambda stack state: writeRecord - received-files record: recordFolder + writeRecord, so a link to another project file is replaced instead of overwritten - check reports: folder via recordFolder (the wx create stays) - check and snapshot frame folders: new projectFolder, which holds a folder inside .hyperframes to recordFolder and makes one elsewhere as asked - template pull staging: recordFolder - share render record: writeRecord - studio server state folder: recordFolder - share storage: the atomic JSON temp file is opened with wx Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * chore(cli): drop doc comments the comment ratchet counts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(cli): refuse to append to a project record with more than one hard link A hard link at .hyperframes/heygen-jobs.jsonl names an outside file as a plain file, so the O_NOFOLLOW open and the same-file check let the job log append to it. The append now refuses a file whose link count is above one. Whole-file record writes go through a temp file renamed into place, which replaces the name rather than writing to a linked inode. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
756b2fcae1 |
fix(cli): fixed-name outputs and history turn records replace a link, never write through it (#7911)
* fix(cli): fixed-name outputs and history turn records replace a link, never write through it transcript.json, hyperframes.json patches, the grade-compare sheet, the batch manifest, diff and measure outputs, lambda stack state and the history turn records are written through a temp file renamed into place. A linked hyperframes.json is left alone, and the default .hyperframes/<tool> output folder is used only when every folder on the way is real. * fix(cli): measure and diff pictures and sbs.mp4 replace a link, never write through it writeImage and the diff side-by-side now have ffmpeg write into a new private folder beside the output, then rename the file over its name. measure frames already staged and renamed its PNGs. |
||
|
|
7801e3ff34 | fix(cli): the check cache is written only as a project record, never through a link (#7884) | ||
|
|
0f23f40f8b |
fix(cli): catch-up lists only turns the app added after the hand-off (#7874)
* fix(cli): catch-up lists only history lines appended after the hand-off The seen record now marks the history file (its identity and length) at the hand-off, and catch-up and the end-of-command notice read only whole lines appended past that mark. Lines a project already carried are never shown, whatever dates they claim. After the app trims the history, the place is found again by the digest of the last line shown; a history the app set aside and restarted is read from its start; a history replaced or cut short shows nothing until the next hand-off marks it again. Records written before the mark keep the dated filter once, then switch to it. * fix(cli): catch-up notes the history's lines at hand-off instead of a file position The hand-off now stores short digests of every whole line the history holds, and catch-up and the notice show lines not among them nor shown before, in file order. The person's turns keep showing after the app trims the history or a sync rewrites it, and lines a project came with never show. A hand-off over an older seen record always notes the lines; such a record shows dated turns only when all are dated after it. * fix(cli): catch-up shows nothing for another project now at the same path The hand-off also notes the project folder's identity (device, inode and birth time). When a different folder sits at the path, the seen record counts as no hand-off: catch-up and the notice say nothing, and the next hand-off notes that project's lines afresh. |
||
|
|
318724f5f4 |
feat(studio): show the agent's storyboard in a Storyboard tab beside the preview (#7284)
* feat(studio): show the agent's storyboard in a Storyboard tab beside the preview The board an agent writes per the storyboard recipe (boards/storyboard.html, or a root storyboard.html) now shows in Studio the way HyperFrames Desktop shows it: a Preview | Storyboard strip over the preview panel, only while the project has a board. Studio reads the page's class="frame" boxes into a board of stills, with acts, titles, times and words, and one frame at a time with arrow keys. A page with no frames shows as written in a script-less iframe. A board written while Studio is open brings its tab to the front, as Desktop does at the agent's stop. A rewrite of the page, a still beside it or STORYBOARD.md reloads it in place, and a dot marks a rewrite seen from the preview. "Show in preview" goes back to the film at the frame's start. Notes, drawings and the go belong to Desktop's agent, so the board's bar carries the desktop-app button. Its funnel events now say which button was pressed (placement: header or storyboard). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy * refactor(studio): split the storyboard view and its frame reader into smaller parts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy * docs(skills): the agent's storyboard stop points at the Storyboard tab, not the file With the board shown beside the preview in Studio as in Desktop, the recipe's stop and style-sampling's stop 1 tell the person to look in the Storyboard tab, and to start a preview and give its link when none is running, instead of handing over boards/storyboard.html to open from disk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy * fix(studio): the storyboard listens on Studio's own file-change channel, and its notes are trimmed The board opened its own /api/events stream, which the Vite dev server behind the runtime smoke does not serve. It now subscribes through subscribeFileChanges, the one channel picker the external-change coordinator already uses (test adapter, Vite HMR, then SSE), so dev and built Studio deliver the same changes to both. The new files' comments are cut to the package's share, and the recipe's Storyboard-tab line moves to the paragraph that names the board, leaving the stop step as it was. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy * fix(studio): the board hears file changes through the coordinator, not a second subscription The external-change coordinator stays the one subscriber to the file-change transport (HMR in dev, SSE when built), as externalFileChangeOwnership asserts. It announces each decoded change through fileChangeFanout, and the storyboard listens there. Mounting EditorShell alone, as its tests do, no longer opens an EventSource, and the coordinator file stays under the line cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy * feat(studio): the storyboard's Open in desktop app asks the app to open on the board, and its card says why - The storyboard bar's button posts `doc: "storyboard"` with its page id. The preview server passes only that value on, and `openInDesktop` writes it into `.hyperframes/desktop-cta.json` beside the page id, so the app can open the project on its Storyboard tab with Build in sight (hyperframes-internal reads it). - The guide card opened from the storyboard says "Approve this storyboard in the desktop app" and "Comment on a frame, draw on it, then press Build", and its last step says the app opens on this storyboard. The header's card is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy * feat(studio): approve the storyboard in Studio; comments on frames stay in the desktop app A Studio user without the desktop app had no way to approve the board from the tab, and the bar said approval was in the desktop app, so the tab read as a dead end. Studio talks to the person's own agent through their chat, so the bar's Approve copies "The storyboard is approved. Build the video from it." for them to paste to it, and says so in a toast (or spells the words out when the clipboard refuses). Commenting and drawing on frames stay in the desktop app. The storyboard recipe tells the agent those pasted words are the person's go. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy * fix(studio): the storyboard's desktop card offers commenting, since approving now happens in Studio Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy * fix(studio): hand-off intent before dispatch, steady film under the board, stills outside the board folder - openInDesktop writes desktop-cta.json before sending the folder, so a running app reads the storyboard ask on arrival; a plain or header open drops an earlier storyboard ask; a failed open puts the earlier record back. - PreviewStage keeps the film at one place in the tree with or without a board, so a board appearing never remounts it; the automatic switch goes through the same pause as a click, and a play while the board is up is paused. - The board reloads when a still it draws changes, including a root board's stills/ and a boards/ page's ../assets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy * chore(cli): fit the Storyboard tab in the CLI's size budget; reword a record helper's doc The CLI tarball carries Studio's build, which now holds the Storyboard tab; merged with main it measures 7,982,002 bytes packed, 7 bytes past the 1% tolerance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy * fix(studio): hold the player while the storyboard covers the film A pause after the fact let J's reverse loop schedule its next frame, so the hidden film kept seeking. The stage now takes the player's own hold while the board is up (and only when no one else holds it), so J, Space and playback requests are refused before they start; Preview releases it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HebQXPiLcYKQfvPWB3Fgxy --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
6fe3c2ce94 |
feat(cli): catch up on what the desktop app did since a project was handed over (#5114)
* feat(cli): catch up on what the desktop app did since a project was handed over The desktop app records each chat turn in .hyperframes/app-history.jsonl. `hyperframes catch-up [dir]` prints the turns since the hand-off or the last catch-up (what the person asked, what Framey did, which files changed) plus the project files changed since, by the app or by hand, then marks them seen. `hyperframes open` and Studio's Edit with Framey mark the hand-off moment. Any command run on a project with unseen turns ends with a line naming catch-up, so an agent back in the terminal hears about it even when it forgets. /hyperframes and /hyperframes-cli tell the agent to catch up as soon as the person writes again. * feat(cli): hand a Grok terminal session over to the desktop app Grok gives every tool command its session as GROK_SESSION_ID (grok 1.0.4), so `hyperframes open` and Edit with Framey now name a Grok session in .hyperframes/agent-handoff.json, after Claude Code and Codex. The desktop app reads its turns from Grok's own session files. * feat(cli): tell a new project's agent to catch up after the desktop app Scaffolded projects' CLAUDE.md and AGENTS.md now say to run `npx hyperframes catch-up` before the next change once the project was opened in the desktop app. Claude Code, Codex and Grok read these files on their own, so a resumed session catches up even when it never loaded a HyperFrames skill: a resumed Claude Code session that had not, asked to change the title, ran catch-up first. catch-up also prints each reply on one line. * fix(cli): read and write .hyperframes records without following links, mark seen after showing Review (Jerrai, Rames): - One helper (projectRecords.ts) now reads and writes every record in .hyperframes/. A linked folder is refused. A read opens once with O_NOFOLLOW and checks the open file is a plain file, which clears the CodeQL race. A write goes to a temp file renamed over the record, so a link is replaced, never written through. agent-handoff.json, the seen record and the history all go through it. - catch-up marks a turn seen only after showing it, and only up to the newest turn shown, so a turn written just after the read shows next time. Changed files have their own "checked" time. - Turns show only once the project was handed over from this machine, so a history file shipped in a cloned repo is never shown as the person's words. The end-of-command check skips reading when the history is older than the seen record. - The skills mention catch-up only when the CLI printed a line naming it, so an older CLI never meets an unknown command. - The notice test uses basename, which fixes Windows. * feat(cli): add the catch-up line to an older project's instructions on hand-off A project scaffolded before catch-up existed has no line telling its agent to catch up, and a resumed session that never loaded a HyperFrames skill then edits without knowing what happened in the app. When `hyperframes open` or Edit with Framey hands such a project over, its scaffolded CLAUDE.md and AGENTS.md (they start "# HyperFrames Composition Project") gain the template's line, in the template's place. A file of the person's own, a link, a missing file, or one that has the line is left alone. The file is rewritten through a temp file with its mode kept. A test keeps the line the same as the template's. * fix(cli): keep catch-up's cursor in the person's home, never reset it, read without links on Windows Review (Rames, Jerrai): - The seen record moved from the project to ~/.hyperframes/catch-up/, keyed by the project's real path. A seen file a cloned repo commits can no longer make its history read as the person's words. - A second hand-off (`open` again, or another Edit with Framey click) keeps the cursor, so turns the app recorded meanwhile still show. - Reads lstat the path, open it once, and refuse a file whose dev/ino differs from what lstat saw. That holds where O_NOFOLLOW doesn't exist, fixing the Windows test. The note writer reads the same way, which clears the new CodeQL alert. - Writes use core's replaceFileAtomically, which retries a rename that Windows briefly refuses. - catch-up names every changed file, and the cursor is the newest `at` shown, not the last line's. - `open --json` carries `catchUp` after a hand-off. - The bin scripts are back to mode 644. * fix(cli): open before checking for CodeQL, never show a turn dated ahead Review (Rames, Jerrai): - readPlainFile opens the file first, then requires lstat to find the same plain file (dev/ino) at the path, and reads only through the fd. That is just as safe, and it clears CodeQL's check-then-use alert. - catch-up skips turns dated after the moment it reads. So a cloned history can't show a far-future turn as the person's words or park the cursor past real ones. - The seen key uses core's realpath (realpathSync.native), so letter case can't split a project in two. ~/.hyperframes/catch-up is made 0700, and a hand-off that can't note itself says so. - Tests stub HOME with vi.stubEnv and restore it. |