civaapple-alt/pi-cordis--packages-plugins-git-guard ↗★ 0

@pi-cordis/plugin-git-guard

Git workspace protection and automatic turn checkpoints plugin for Pi-Cordis 适合需在改动前留存可恢复快照的用户;快照不含未跟踪文件且不跨进程。

パッケージ
@pi-cordis/plugin-git-guard
互換性
未検証
Cordis ピア範囲
^4.0.1
バージョン
0.1.0
最終更新
2026/08/21

インストール

検証済み 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.