civaapple-alt/pi-cordis--packages-plugins-git-guard ↗★ 0
@pi-cordis/plugin-git-guard
为 Pi-Cordis 提供 Git 工作区保护与回合自动检查点快照。 适合需在改动前留存可恢复快照的用户;快照不含未跟踪文件且不跨进程。
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗@pi-cordis/plugin-git-guard
English | 中文
Registers git_checkpoint, which uses git stash create to create a snapshot of tracked working-tree changes and keeps its commit reference in process memory.
create: creates a reference when tracked changes exist;list: lists references created by this plugin instance;restore: shows the selected SHA and conflict warning, requires an explicit interactive confirmation, then applies it with structured Git arguments.
Checkpoint references do not survive process exit, do not include untracked files, and applying one may conflict with current changes. The plugin does not reset or delete the current working tree.
Restore declares a workspace side effect, so active Plan state blocks it before any prompt or Git operation. Headless restore and cancelled confirmation fail without changing the worktree; create and list remain non-mutating from the worktree-policy perspective.
autoCheckpoint is opt-in and defaults to false, avoiding hidden Git object writes in the default Profile. When enabled, it attempts a checkpoint before each agent turn. Git errors are ignored by that background hook; explicit tool actions return failures to the caller.