Skip to content

Commit d636fd1

Browse files
committed
chore(release): 2.3.0
Five new tools (git_push, git_worktree_list/add/remove, git_reset_soft), git_log v3 JSON contract (sha7/ageRelative removed, workspace_root → workspaceRoot, email optional, not_a_git_repo → not_a_git_repository), token-efficiency sweep (readOnlyHint, description cleanup, schema descriptions), shared helper extraction, and test coverage lifted from 70% → 89% lines.
1 parent f3d278a commit d636fd1

2 files changed

Lines changed: 48 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,52 @@
22

33
All notable changes to `@rethunk/mcp-multi-root-git` are documented here. Format loosely follows [Keep a Changelog](https://keepachangelog.com); the project uses [Semantic Versioning](https://semver.org).
44

5+
## [2.3.0] — 2026-04-21
6+
7+
Five new tools, a token-efficiency sweep, a targeted breaking change to the `git_log` JSON contract, and test coverage raised from 70% to 89%.
8+
9+
### Added
10+
11+
- **`git_push`** — push the current branch to its configured upstream. Accepts explicit `remote` / `branch` overrides and a `setUpstream: true` flag for first-push (`git push -u`). Refuses on detached HEAD; does not force-push.
12+
- **`git_worktree_list`** — list all git worktrees (`git worktree list --porcelain`); annotated `readOnlyHint: true`.
13+
- **`git_worktree_add`** — create a new linked worktree, creating the branch from `baseRef` if it does not yet exist. Refuses on protected branch names (`main`, `master`, `dev`, `release*`, `hotfix*`, …).
14+
- **`git_worktree_remove`** — remove a registered worktree; refuses to remove the main worktree. Optional `force: true` for dirty trees.
15+
- **`git_reset_soft`** — soft-reset the current branch to a ref (`HEAD~1`, `HEAD~N`, SHA, branch name). Preserves rewound changes in the staging index — the canonical way to re-split an already-committed chunk. Requires a clean working tree.
16+
17+
### Changed — breaking (`git_log` JSON, `MCP_JSON_FORMAT_VERSION``"3"`)
18+
19+
Consumers using `format: "json"` with `git_log` must update field names. All other tools are unaffected.
20+
21+
- `sha7` removed — was always derivable as `sha.slice(0, 7)`.
22+
- `ageRelative` removed — was human-readable noise in machine output.
23+
- `workspace_root` renamed to `workspaceRoot` — consistent camelCase with all other fields.
24+
- `email` is now omitted when empty rather than always present.
25+
- Error code `not_a_git_repo` corrected to `not_a_git_repository` — consistent with all other tools.
26+
27+
### Changed — non-breaking
28+
29+
- **Token efficiency:** `readOnlyHint: true` added to `git_status`, `git_inventory`, `git_parity`, and `list_presets`. "See docs/mcp-tools.md" suffix dropped from all 9 tool descriptions; descriptions are now self-contained.
30+
- **`WorkspacePickSchema`**`rootIndex` and `allWorkspaceRoots` parameters carry inline descriptions so LLMs can pick them without consulting external docs.
31+
- **`git_merge`** — protected-branch list in the description collapsed to a single canonical reference (was duplicated inline).
32+
33+
### Internal
34+
35+
- `requireSingleRepo` helper extracted to `roots.ts`; replaces copy-paste preludes across `batch_commit`, `git_diff_summary`, `git_merge`, `git_cherry_pick`, `git_push`, `git_reset_soft`, and all `git_worktree_*`.
36+
- `conflictPaths` extracted from `git-merge-tool.ts` to `git-refs.ts`; shared by `git_merge` and `git_cherry_pick`.
37+
- `inferRemoteFromUpstream` extracted to `git-refs.ts`; shared by `runPushAfter` (`batch_commit`) and `git_push`.
38+
- `isWorkingTreeClean` used consistently everywhere (was inlined in `git_reset_soft`).
39+
40+
### Tests
41+
42+
- Coverage: **88.6% lines / 92.8% functions** (up from 69.9% / 71.4%).
43+
- 262 tests across 15 files (up from 134 across 7 files).
44+
- New test files: `presets.test.ts`, `inventory.test.ts`, `git-utils.test.ts`, `json.test.ts`, `git-reset-soft-tool.test.ts`, `git-push-tool.test.ts`, `git-worktree-tool.test.ts`, `roots.test.ts`. `git-refs.test.ts` extended with `isSafeGitAncestorRef` cases.
45+
46+
### Documentation
47+
48+
- `docs/mcp-tools.md` — all new tools documented with parameter tables, JSON shapes, and error-code tables.
49+
- `AGENTS.md` — implementation map updated with all new and refactored modules.
50+
551
## [2.2.0] — 2026-04-17
652

753
Mutating git operations: merge, cherry-pick, and optional push-after for `batch_commit`.
@@ -41,6 +87,7 @@ Mutating git operations: merge, cherry-pick, and optional push-after for `batch_
4187

4288
- Initial release: `git_status`, `git_inventory`, `git_parity`, `list_presets`.
4389

90+
[2.3.0]: https://github.com/Rethunk-AI/mcp-multi-root-git/releases/tag/v2.3.0
4491
[2.2.0]: https://github.com/Rethunk-AI/mcp-multi-root-git/releases/tag/v2.2.0
4592
[2.1.0]: https://github.com/Rethunk-AI/mcp-multi-root-git/releases/tag/v2.1.0
4693
[2.0.1]: https://github.com/Rethunk-AI/mcp-multi-root-git/releases/tag/v2.0.1

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rethunk/mcp-multi-root-git",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"description": "MCP stdio server: multi-root git status, inventory, and HEAD parity checks. Generic tools usable by any workspace.",
55
"type": "module",
66
"private": false,

0 commit comments

Comments
 (0)