Skip to content

feat(editor,editormcp): persistent per-turn checkpoints under .nsgo/checkpoints and History panel - #1224

Merged
houko merged 1 commit into
mainfrom
feat/editor-turn-checkpoints-1018
Nov 26, 2026
Merged

houko merged 1 commit into
mainfrom
feat/editor-turn-checkpoints-1018

Conversation

@houko

@houko houko commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Closes #1018

Summary

  • Persistent per-turn checkpoints under .nsgo/checkpoints/:
    • Records every project file's pre-turn bytes before an agent turn first writes it (BeginAgentTurn / RunAgentTurn, RecordCheckpointFile, WriteAgentFile, DeleteAgentFile, History.beforeExecute, and automatic wrapping of editormcp ActionEdit calls)—covering scenes, prefabs, data tables, game.yaml, Go code, and verbatim binary media alike.
    • Stores a strict versioned YAML manifest (manifest.yaml, editor.CheckpointVersion = 1, JSON Schema checkpoint.v1.json) per checkpoint alongside raw saved files under files/<path>, writes .gitignore files automatically, and enforces a configurable byte cap (Editor.CheckpointMaxBytes, defaulting to 128 MiB) that drops the oldest completed checkpoints.
    • Autonomous tasks (TakeCheckpointBeforeTask, RunTaskWithCheckpoint) and automations (TakeCheckpointBeforeAutomation, RunAutomationWithCheckpoint, game_playtest, and automation-registered MCP edit tools) always persist a checkpoint before they start.
  • Project History panel (⌘Y) with read-only preview and one-step undoable Restore:
    • HistoryPanelView (Spec Dark & Light tokens matching Checkpoints.dc.html and Spec.dc.html) lists persisted checkpoints reloaded on OpenProject alongside current-session edits and Git milestones, grouped by day with All / You / Agent filters.
    • Clicking an entry previews its scene read-only in the viewport (Previewing … · editing is off; Esc or Now exits preview) without mutating Doc or History.
    • Clicking Restore (RestoreCheckpoint) atomically restores all touched files on disk, reloads open tabs and game.yaml, and records the restore as one undoable fallibleCommand so Undo (⌘Z) puts the entire turn back byte-for-byte.
  • MCP tools & docs:
    • Added checkpoint_list (ActionRead) and checkpoint_restore (ActionEdit) in editormcp.
    • Updated docs/en/{editor,formats}.md, docs/zh/{editor,formats}.md, apps/website/public/schemas/checkpoint.v1.json, changelog.d/editor-turn-checkpoints-1018.md, and .agents/notes/implemented/feature/2026-11-26-editor-turn-checkpoints.md.

Verification

  • env -u GOROOT go run ./cmd/gameschema -check
  • env -u GOROOT go tool nsgo check ./editor, ./editor/editormcp, ./editor/editorcmd (desktop & -target ios)
  • env -u GOROOT TMPDIR=/tmp go tool nsgo test ./editor/editormcp (39/39 passed)
  • env -u GOROOT TMPDIR=/tmp go tool nsgo test ./cmd/gameschema (24/24 passed)
  • env -u GOROOT TMPDIR=/tmp go tool nsgo test -run TestFormatsPage . (passed)
  • env -u GOROOT TMPDIR=/tmp go tool nsgo test on ./editor checkpoint, history, format conformance, locale, shortcut, command, save/revert, disk watch, and regression suites (all passed)
  • env -u GOROOT TMPDIR=/tmp go tool nsgo test -target macos -run TestHistoryCheckpointsMacOSScreenshots ./editor/editorcmd (real macOS screenshots captured and visually verified for Dark preview, Dark restored, and Light preview)
  • bun run verify-notes & env -u GOROOT go run ./tools/changelog check

@github-actions github-actions Bot added enhancement New feature or request size/XL documentation Improvements or additions to documentation pkg/cmd pkg/editor area/website pkg/game area/agents conflict Conflicts with the target branch; resolve before merging labels Nov 26, 2026
@houko
houko force-pushed the feat/editor-turn-checkpoints-1018 branch 3 times, most recently from 6bb8596 to 863a23c Compare November 26, 2026 11:37
@github-actions github-actions Bot added conflict Conflicts with the target branch; resolve before merging and removed conflict Conflicts with the target branch; resolve before merging labels Nov 26, 2026
@houko
houko force-pushed the feat/editor-turn-checkpoints-1018 branch from 863a23c to 138e5fb Compare November 26, 2026 12:00
@github-actions github-actions Bot added conflict Conflicts with the target branch; resolve before merging and removed conflict Conflicts with the target branch; resolve before merging labels Nov 26, 2026
@houko
houko force-pushed the feat/editor-turn-checkpoints-1018 branch 2 times, most recently from 170a128 to 43dd6ff Compare November 26, 2026 12:36
@github-actions github-actions Bot added conflict Conflicts with the target branch; resolve before merging and removed conflict Conflicts with the target branch; resolve before merging labels Nov 26, 2026
@houko
houko force-pushed the feat/editor-turn-checkpoints-1018 branch from 43dd6ff to b2e4f01 Compare November 26, 2026 12:48
@github-actions github-actions Bot added conflict Conflicts with the target branch; resolve before merging and removed conflict Conflicts with the target branch; resolve before merging labels Nov 26, 2026
@houko
houko force-pushed the feat/editor-turn-checkpoints-1018 branch 2 times, most recently from c89d202 to bbe9867 Compare November 26, 2026 17:43
@github-actions github-actions Bot added conflict Conflicts with the target branch; resolve before merging and removed conflict Conflicts with the target branch; resolve before merging labels Nov 26, 2026
@houko
houko force-pushed the feat/editor-turn-checkpoints-1018 branch from bbe9867 to 90a40a7 Compare November 26, 2026 18:01
@github-actions github-actions Bot removed the conflict Conflicts with the target branch; resolve before merging label Nov 26, 2026
@houko
houko force-pushed the feat/editor-turn-checkpoints-1018 branch from 90a40a7 to f3ddede Compare November 26, 2026 18:07
@github-actions github-actions Bot added the conflict Conflicts with the target branch; resolve before merging label Nov 26, 2026
@houko
houko force-pushed the feat/editor-turn-checkpoints-1018 branch from f3ddede to 7b4298c Compare November 26, 2026 18:16
@github-actions github-actions Bot removed the conflict Conflicts with the target branch; resolve before merging label Nov 26, 2026
@houko
houko merged commit af6824f into main Nov 26, 2026
48 of 51 checks passed
@houko
houko deleted the feat/editor-turn-checkpoints-1018 branch November 26, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Editor: a checkpoint of every file an agent turn touches, kept across sessions and restorable from History

1 participant