Skip to content

Commit 2734ee2

Browse files
feat(cli): hyperframes history lists, undoes and restores a project's recorded changes (#4449)
* feat(cli): hyperframes history lists, undoes and restores a project's recorded changes * fix(cli): an agent's history turn ends after 10 idle minutes on every path A turn left open no longer takes the person's later edits: the engine files a CLI turn's writes by the same idle rule as a preview window. Studio claims take their paths back from an agent's window; refusals, --json shapes, --limit and time parsing follow the review. * refactor(cli): the project-history opener lives in its own module The history command and other commands open a project's history the same way: through a running preview, or directly under the engine's lock. * docs(skills): the history loop lines sit in one marked trial block per skill * fix(cli): a turn marker without its last write time has ended Idle-limit tests set file times instead of racing the clock, and the restore refusal test picks a ref no entry id starts with. * docs(cli): the history entry shape comment names no other app * refactor(cli): history reuses the busy error class and its who helper * fix(cli): undo --who reverts the agent's whole last turn and nothing older When the open turn recorded nothing, undo fell back to the agent's earlier turn; when a mid-turn command split the turn, it reverted only the newest part. The turn now keeps the entries it filed, and undo --who reverts exactly those or refuses. Engine tests pin the write timing rules, and a date that rolls over (Feb 31) is refused. * fix(cli): an undo --who that meets a conflict leaves the whole turn as it was It redoes the parts it already undid, lists the newer entries as they are now, and offers --just-this and --back-to-before for the whole turn. The last turn is recorded atomically before its marker is cleared. * chore(cli): history keeps each file's comment share at or under main's * fix(cli): history keeps log order past a turn's idle limit and undoes a turn's cut parts * fix(cli): history drops unused imports and splits undo and reopen steps
1 parent e266ad5 commit 2734ee2

14 files changed

Lines changed: 1465 additions & 24 deletions

File tree

‎packages/cli/src/cli.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ const commandLoaders = {
160160
info: () => import("./commands/info.js").then((m) => m.default),
161161
compositions: () => import("./commands/compositions.js").then((m) => m.default),
162162
timeline: () => import("./commands/timeline.js").then((m) => m.default),
163+
history: () => import("./commands/history.js").then((m) => m.default),
163164
benchmark: () => import("./commands/benchmark.js").then((m) => m.default),
164165
browser: () => import("./commands/browser.js").then((m) => m.default),
165166
"remove-background": () => import("./commands/remove-background.js").then((m) => m.default),

‎packages/cli/src/commands/history.test.ts‎

Lines changed: 486 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)