@moltbankhq/git-mod
v0.1.0
Published
Git activity Capability. Provides cap.git.commits — read-only listing of recent commits + diffs across configured repos via the user's local `gh` CLI auth.
Readme
Git Mod
Provides cap.git.commits — read-only listing of recent commits + diffs across configured GitHub repos.
Auth
This mod does not store any tokens. All GitHub API calls flow through the user's local gh CLI authentication (gh auth login). Run git-mod doctor to verify both the binary and auth status.
Capability surface
useGit().commits({
repos: ['owner/repo', 'org/another'], // required
windowHours: 24, // optional, default 24
includeMerges: false, // optional, default false
authors: ['[email protected]'] // optional, filters by login / email / name
});
// → { commits: GitCommit[], errors: Array<{ repo, sha?, error }> }Each GitCommit carries repo, sha, authorLogin?, authorName, authorEmail, committedAt, message, isMerge, url, diffStat?, diffPatch? (truncated to ~50KB by default so downstream LLM phases stay in budget).
Configuration
Optional config at ~/.moltbank/mods/git/config.json:
{
"defaultWindowHours": 24,
"maxDiffPatchBytes": 51200,
"ghBinary": "gh"
}Defaults apply when the file is absent.
Spec alignment
- §4 (write-only integration tier): read-only by design. No PR creation, no commit pushing. Surfacing only the listing capability.
- §6 (provider-agnostic capability ids): the cap id names the surface (
cap.git.commits), not the implementation. A future GitLab provider, on-disk-repo provider, or REST-direct provider could resolve the same cap and Mods don't change.
