全部插件

DSH / BUNDLE / CLIENT-UI

@yokira404/dsh-git-guard

v1.0.1Yokira404 / dsh-git-guard0286799657

可安装组合包UI 与客户端插件社区 · Topic 自动分析Web UI

概览

@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.展开完整技术说明收起技术说明
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 / ZH

插件文档

目录摘要

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 核对固定版本的组合包契约、运行时事实与分发语义;完整 README 请查看源仓库。

在 GitHub 阅读完整 README

LIMITATIONS

已知限制

- **不改动你的仓库**:不写 `.git/hooks`,不碰 `git config`,只做拦截。 - **会误伤「正文里写着命令名」的调用**:判定看的是工具调用里命令类字段(`command` / `script` / `code` 等)的整串文本,所以用 `write` 写一份含 `git push` 字样的文档时,那次写入本身可能被拦。这是有意的偏向 —— 宁可多拦一次写入,也不放过一次上传;换个写法即可正常写入。 - **拦不住不走 shell 的路径**:它针对的是 agent 通过命令上传仓库这条真实路径。 - **不做事后撤销**:拦在事前,不存在已经推上去再回滚的窗口。 - **状态不持久化**:DSH 重启后回到「两个都开启」。