记录智能体改了哪些文件、用了哪个模型和会话
26/100
综合分
0
GitHub 星标
—
npm 周下载
—/5
用户评分
数据截至 2026/10/2 · 周下载取自 npm 全网(含 CI / 镜像),非本站安装数;综合分由星标、活跃度与兼容性检查合成。
安装命令 · 需先装 dsh CLI 引擎
dsh plugin --profile web add NiuZhuang/dsh-git-ai该包不可直接 npm 安装,改从 GitHub 源安装(明细见下方安装检查)
状态速览
判定依据:实装验证 · 静态安装检查 · 自动扫描 · 仓库维护状态信任档位:仅索引
档位由哪些信号合成
本站实装验证(真实安装 L4 覆盖全站;L5 为运行时冒烟或实机截图,覆盖范围小于 L4) · 验证所用 dsh 版本 · 静态安装检查 · 风险分级 · 仓库维护状态。 下方各区块是它的证据明细。
社区实装还没有人打卡 · 装过的第一个就是你
安全扫描自动 · 静态分析源码v2.7.0🟢 扫描:未发现敏感能力尚无人工评估展开查看扫描说明与证据 ↓
安全扫描自动 · 静态分析源码
v2.7.0静态扫描未发现敏感能力:最多只发网络请求、读取自身元数据或只读文件,未发现执行命令、文件写入或敏感信息读取。
扫描于 2026/10/31(1 天前) · 范围 全包扫描(包内未声明入口) · 来源 GitHub 仓库
静态扫描只反映源码中出现的调用,不构成安全背书;人工评估与自动扫描相互独立、互不覆盖。
依赖的 DSH / Cordis 模块
@deepseek-ai/schemastery@deepseek-ai/cordis@deepseek-ai/dsh-agent@deepseek-ai/dsh-agent-loop@deepseek-ai/dsh-agent-loop-testkit@deepseek-ai/dsh-bash-local@deepseek-ai/dsh-invariants@deepseek-ai/dsh-llm@deepseek-ai/dsh-session@deepseek-ai/dsh-shell@deepseek-ai/dsh-subprocess-local@deepseek-ai/dsh-tools给这个插件打分还没有人投票↓
用户评分
还没有人投票,来当第一个
功能亮点
- 记录智能体改动文件
- 记录所用模型
- 记录所属会话
把智能体改过哪些文件、用的哪个模型、在哪个会话里,都记进 git-ai 的 DeepSeek Harness 插件
README
由 DeepSeek 最新模型翻译生成dsh-git-ai
GitHub · npm · Issues
一个 DeepSeek Harness 插件,把 agent(智能体)编辑了哪些文件、用的是哪个模型、属于哪个会话,记录到 git-ai 中。它监听 harness 的 tools/pre-execute / tools/post-execute 拦截点,把每次相关工具调用翻译成 git-ai 的通用 agent-v1 checkpoint payload,并在 stdin 上传入该 JSON 后调用 git-ai checkpoint <preset> --hook-input stdin。git-ai 本身无需修改;agent 提交后,git-ai 会把归属写入 git notes,并按 tool-model 组合报告 ai_additions/ai_accepted。
效果预览
将鼠标悬停在 VS Code 的代码行上,即可看到这段代码是由谁、使用哪个模型、在哪个 DeepSeek Harness 会话中生成的:
Git AI 代码归属 Popover
环境要求
- 通过 npm 安装 DeepSeek Harness(npx @deepseek-ai/dsh@latest)——插件以官方 @deepseek-ai/* 包为 peer 依赖。
展开完整文档(README 剩余 1 节)
dsh-git-ai
GitHub · npm · Issues
一个 DeepSeek Harness 插件,把 agent(智能体)编辑了哪些文件、用的是哪个模型、属于哪个会话,记录到 git-ai 中。它监听 harness 的 tools/pre-execute / tools/post-execute 拦截点,把每次相关工具调用翻译成 git-ai 的通用 agent-v1 checkpoint payload,并在 stdin 上传入该 JSON 后调用 git-ai checkpoint <preset> --hook-input stdin。git-ai 本身无需修改;agent 提交后,git-ai 会把归属写入 git notes,并按 tool-model 组合报告 ai_additions/ai_accepted。
效果预览
将鼠标悬停在 VS Code 的代码行上,即可看到这段代码是由谁、使用哪个模型、在哪个 DeepSeek Harness 会话中生成的:
Git AI 代码归属 Popover
环境要求
- 通过 npm 安装 DeepSeek Harness(npx @deepseek-ai/dsh@latest)——插件以官方 @deepseek-ai/* 包为 peer 依赖。
- 安装 git-ai 并加入 PATH(或通过 gitAiPath 指定)。
安装
本包以 profile bundle 形态发布:安装并激活只需要一条命令。
dsh plugin --profile web add dsh-git-ai
pnpm ≥ 10 提示: dsh plugin add 底层转发给 pnpm,而 pnpm 10+ 会拒绝在 workspace root 上直接添加依赖(ERR_PNPM_ADDING_TO_ROOT)。dsh 的 profile 按设计就是 pnpm workspace root,因此在 pnpm ≥ 10 的机器上请使用 -w(或一次性在 ~/.dsh/profiles/<profile>/pnpm-workspace.yaml 中加入 ignore-workspace-root-check: true):
dsh plugin --profile web add -w dsh-git-ai
dsh plugin 在 profile 目录内转发给 pnpm,并因为包声明了 dsh.bundle 而自动激活该 bundle。不使用 bundle 机制(或在自定义 profile 中加载)时,在 profile 的 cordis.patch.yml 中加入一行:
- dsh-git-ai:
gitAiPath: git-ai
agentName: deepseek-harness
配置
import type { Config } from 'dsh-git-ai'
const config: Config = {
gitAiPath: 'git-ai', // optional: git-ai executable (bare name resolves through PATH)
agentName: 'deepseek-harness', // optional: agent_name stamped on every checkpoint
model: '', // optional: explicit model; empty falls back to agent.options.model
checkpointPreset: 'agent-v1', // optional: the git-ai generic-integration preset
timeoutMs: 10_000, // optional: git-ai invocation timeout
trackBash: true, // optional: emit pre/post shell checkpoints for bash/pwsh
}
Checkpoint 映射
| Harness 点 | 工具 | git-ai payload |
| tools/post-execute(成功) | write、edit | ai_agent,edited_filepaths 取自 file_path |
| tools/post-execute(成功) | str_replace_editor(非 view) | ai_agent,edited_filepaths 取自 path |
| tools/pre-execute | bash、pwsh | pre_shell_command,含 command 与 tool_use_id |
| tools/post-execute | bash、pwsh | post_shell_command,含 command 与 tool_use_id |
Payload 身份字段:repo_working_dir 为会话 cwd(缺失时回退到进程 cwd),agent_name 为 config.agentName,model 为设置了 config.model 时取其值否则取 agent.options.model(再否则为 ''),conversation_id 为会话 id。相对 file_path/path 会基于会话 cwd 解析为绝对路径;绝对路径原样透传。str_replace_editor 的 view 命令是只读的,从不归因。
失败的编辑(result.isError === true)不发任何内容;失败的 bash 命令仍会发出 post_shell_command,从而闭合前后配对。bash 跟踪以工具 callId 为键,因此 pre 与 post checkpoint 共享 tool_use_id。
失败隔离
git-ai 是可选的(optional)外部依赖。二进制缺失、非零退出、超时或执行器拒绝都只会记录警告而不会向上传播:工具调用与 agent 轮次的运行方式与插件不存在时完全一致。
验证流程
1. 启动加载了本插件的 harness
dsh web
2. 让 agent 在 git 仓库里修改文件
3. 检查 git-ai 是否收到 checkpoint git-ai status --json
4. 提交
git add -A && git commit -m "test"
5. 查看归因统计 git-ai stats HEAD --json
开发
pnpm install
pnpm test # vitest,src/ 覆盖率 100%
pnpm typecheck
pnpm build # 生成 lib/ 供发布
发布
pnpm build
pnpm publish --access public
已知局限与后续工作
- 文件编辑工具只发编辑后的 ai_agent checkpoint。 git-ai 以 HEAD 或最后一次 checkpoint 的值为基准来归因文件的改动行,因此 agent 编辑前对同一文件已有的未提交改动(例如用户自己改的)也会被归因给 agent。在每次编辑工具之前补一个 human checkpoint 就能隔离这些改动;bash 的 pre/post 配对已为 shell 命令提供了这种隔离。
- 可能出现未配对的 pre_shell_command。 如果 bash 工具在 pre 与 post 之间被拒绝或取消,pre 快照会保持开放,之后对同一文件的新改动在下一次 checkpoint 之前会被 git-ai 视为 untracked。
- 同步调用延迟。 每个被跟踪的工具调用都会先等待其 git-ai checkpoint(上限为 timeoutMs)再让工具结果落定。
- bash 输出归因基于快照。 git-ai 从文件快照推断改动文件,因此修改仓库树外文件的命令不会被归因。
许可
MIT预览分享卡片长什么样 ↓
分享 · DeepSeek Harness Hub
NiuZhuang/dsh-git-ai
记录智能体改了哪些文件、用了哪个模型和会话
相关插件 · 开发 / 工程
隐私简历生成器reactive-resume/reactive-resume
Reactive Resume 已迁至 GitHub 上的…
★ 45,125已汉化MCP
71.7
AI 架构文档生成器sopaco/deepwiki-rs
🚀 Litho 已进化为 Terrain —— 给你的 AI 智能体一张会呼吸的代码库地图。
★ 3,157已汉化DSH
70.8
长时任务执行闭环AMAP-ML/LongHorizon-Harness
面向 Computer-Use Agent 的 Loop Engineering
★ 1,764已汉化DSH
70.5
AI 编程纪律方法包GanyuanRan/Aegis
让 AI 编程 agent 变得可信:少返工、更安全、说“完成”前先给证据。
★ 1,384已汉化DSH
69.6
多代理编排运行时Enderfga/claw-orchestrator
面向编程智能体的运行时。把 Claude Code、Codex、Antigravity、Grok…
★ 586已汉化MCP
69.4
记忆进化插件csyangwen/dsh-memory-evolve
dsh-memory-evolve 使用场景指南
★ 461已汉化DSH
67.9