Overview
@yokira404/dsh-git-guard
Two switches at the right of the Session header. The left one stops writes to your local git repository (git add, git commit); the right one stops uploads to a remote (git push, git remote, gh). Both start on, and switching a guard on never releases the other. The block happens before a command runs.
README / EN
Package documentation
Registry summary
Two switches at the right of the Session header. The left one stops writes to your local git repository (git add, git commit); the right one stops uploads to a remote (git push, git remote, gh). Both start on, and switching a guard on never releases the other. The block happens before a command runs.
dsh.pub verifies the pinned bundle contract, runtime facts, and distribution semantics. The complete README remains in the source repository.
Read the full README on GitHubLIMITATIONS
Known limitations
- **不改动你的仓库**:不写 `.git/hooks`,不碰 `git config`,只做拦截。 - **会误伤「正文里写着命令名」的调用**:判定看的是工具调用里命令类字段(`command` / `script` / `code` 等)的整串文本,所以用 `write` 写一份含 `git push` 字样的文档时,那次写入本身可能被拦。这是有意的偏向 —— 宁可多拦一次写入,也不放过一次上传;换个写法即可正常写入。 - **拦不住不走 shell 的路径**:它针对的是 agent 通过命令上传仓库这条真实路径。 - **不做事后撤销**:拦在事前,不存在已经推上去再回滚的窗口。 - **状态不持久化**:DSH 重启后回到「两个都开启」。
