@ agent-forge/plugin-git-仓库
Git 仓库能力插件 福吉探员,从
主办单位 src/plugins/git-repository (D-075 S3) (英语). 它注册了一个只读工具, git_repository_inspect,哪个
返回通过主机拥有的工作空间引用的已绑定的 git 状态、 diff 汇总或日志汇总汇总; 无 diff
hunk,原始日志,分支,或命令输出被曝光.
该插件在负载时间没有独立的git绑定. 没有主机输入的解析器/运行器连接工具报告一个
明确 unsupported 结果; 主机拥有每个 git 命令和寄存器路径 .
安装
# from a local checkout
agent-forge plugin install ./plugins/git-repository
# from npm
agent-forge plugin install @ai-agent-forge/plugin-git-repository
货包船有两艘货单: agent-forge.json (确定性插件解析器显示的生态系统)和
plugin.json (主机载重清单 loadCapabilityPluginFromManifest条目 ./dist/entry.js) (中文(简体) ).
图书馆表面
import { createNodeGitRepositoryAdapterV1, createGitRepositoryCapabilityFactoryV1 } from "@agent-forge/plugin-git-repository";
createNodeGitRepositoryAdapterV1(options?)——只读适配器;需要主机注入resolver编号 :runner改为 生成结果,否则返回unsupported。 。 。 .createDeterministicGitRepositoryAdapterV1(fixtures)用于测试的确定性固定适配器.createGitRepositoryCapabilityFactoryV1(adapter)- 登记册git_repository_inspect编号CapabilityAPI。 。 。 .- 默认导出
dist/entry.js——外部插件加载所使用的预编厂.
发展
npm install --ignore-scripts # repo root, creates the workspace symlink
npm run build # plugins/git-repository (tsgo)
npm test # vitest; the entry fidelity test requires `npm run build` first