@cyanheads/git-mcp-server 2.7.0 β†’ 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-2.7.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--11--25-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.26.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Status](https://img.shields.io/badge/Status-Stable-brightgreen.svg?style=flat-square)](https://github.com/cyanheads/git-mcp-server/issues) [![TypeScript](https://img.shields.io/badge/TypeScript-^5.9.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.2.21-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-2.7.1-blue.svg?style=flat-square)](./CHANGELOG.md) [![MCP Spec](https://img.shields.io/badge/MCP%20Spec-2025--11--25-8A2BE2.svg?style=flat-square)](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.26.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Status](https://img.shields.io/badge/Status-Stable-brightgreen.svg?style=flat-square)](https://github.com/cyanheads/git-mcp-server/issues) [![TypeScript](https://img.shields.io/badge/TypeScript-^5.9.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.2.21-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -345,23 +345,24 @@ For strict rules when using this server with an AI agent, refer to the **`AGENTS
345
345
 
346
346
  ## πŸ§ͺ Testing
347
347
 
348
- This server uses [Vitest](https://vitest.dev/) for testing.
348
+ Tests run via [Bun's test runner](https://bun.sh/docs/cli/test) with Vitest compatibility.
349
349
 
350
350
  - **Run all tests:**
351
351
 
352
352
  ```sh
353
- npm test
353
+ bun test
354
354
  ```
355
355
 
356
356
  - **Run tests with coverage:**
357
357
 
358
358
  ```sh
359
- npm run test:coverage
359
+ bun test --coverage
360
360
  ```
361
361
 
362
- - **Run tests in watch mode:**
362
+ - **Run quality checks (lint, format, typecheck, audit):**
363
+
363
364
  ```sh
364
- npm test -- --watch
365
+ bun run devcheck
365
366
  ```
366
367
 
367
368
  ## πŸ—ΊοΈ Roadmap
@@ -371,7 +372,7 @@ This server uses [Vitest](https://vitest.dev/) for testing.
371
372
  The server uses a **provider-based architecture** to support multiple git implementation backends:
372
373
 
373
374
  - **βœ… CLI Provider** (Current): Full-featured git operations via native git CLI
374
- - Complete coverage of all 27 git tools
375
+ - Implementation coverage for all 27 git tools
375
376
  - Executes git commands using Bun.spawn for optimal performance
376
377
  - Streaming I/O handling for large outputs (10MB buffer limit)
377
378
  - Configurable timeouts (60s default) and automatic process cleanup
package/dist/index.js CHANGED
@@ -15387,7 +15387,7 @@ var init_package = __esm(() => {
15387
15387
  format: 'bunx prettier --write "**/*.{ts,js,json,md,html,css}"',
15388
15388
  prepare: "bunx husky",
15389
15389
  inspector: "bunx mcp-inspector --config mcp.json --server git-mcp-server",
15390
- test: "bun test --config vitest.config.ts",
15390
+ test: "bun test",
15391
15391
  "test:coverage": "bun test --coverage",
15392
15392
  audit: "bun audit",
15393
15393
  "audit:fix": "bun audit --fix",
@@ -193838,7 +193838,12 @@ var SuccessResponseSchema = exports_external.object({
193838
193838
  });
193839
193839
  var FilePathSchema = exports_external.string().min(1).regex(/^[^/].*$/, "File path must be relative to repository root").regex(/^(?!.*\.\.).*$/, "File path cannot contain directory traversal").describe("File path relative to repository root.");
193840
193840
  var TagNameSchema = exports_external.string().min(1).max(255).regex(/^[^~^:?*\[\\]+$/, "Invalid tag name format").describe("Tag name (must follow git naming conventions).");
193841
- var CommitMessageSchema = exports_external.string().min(1, "Commit message cannot be empty").max(1e4, "Commit message too long").describe("Commit message.");
193841
+ function normalizeMessage(message) {
193842
+ return message.replace(/\\r\\n/g, `
193843
+ `).replace(/\\n/g, `
193844
+ `).replace(/\\r/g, "\r").replace(/\\t/g, "\t");
193845
+ }
193846
+ var CommitMessageSchema = exports_external.string().min(1, "Commit message cannot be empty").max(1e4, "Commit message too long").transform(normalizeMessage).describe("Commit message.");
193842
193847
  var LimitSchema = exports_external.number().int().min(1).max(1000).optional().describe("Maximum number of items to return (1-1000).");
193843
193848
  var SkipSchema = exports_external.number().int().nonnegative().optional().describe("Number of items to skip for pagination.");
193844
193849
  var VerboseSchema = exports_external.boolean().default(false).describe("Include verbose/detailed information in output.");
@@ -194873,7 +194878,7 @@ function loadInstructions(filePath) {
194873
194878
  return DEFAULT_WRAPUP_INSTRUCTIONS;
194874
194879
  }
194875
194880
  }
194876
- var baseInstructions = loadInstructions(config2.git.wrapupInstructionsPath);
194881
+ var baseInstructions = loadInstructions(config2?.git?.wrapupInstructionsPath);
194877
194882
  async function gitWrapupInstructionsLogic(input, { provider, storage, appContext }) {
194878
194883
  const tenantId = appContext.tenantId || "default-tenant";
194879
194884
  let finalInstructions = baseInstructions;
@@ -195075,7 +195080,7 @@ Pass commit messages as JSON string parameters. Multi-line messages are supporte
195075
195080
  - Single line: { "message": "feat: add user authentication" }
195076
195081
  - Multi-line: { "message": "feat: add user authentication\\n\\nImplemented OAuth2 flow with JWT tokens.\\nAdded tests for login and logout." }
195077
195082
 
195078
- Note: Do not use bash heredoc syntax.`;
195083
+ Note: Do not use bash heredoc syntax. Literal escape sequences (\\n, \\t) in the message string are automatically normalized to their actual characters.`;
195079
195084
  var InputSchema11 = exports_external.object({
195080
195085
  path: PathSchema,
195081
195086
  message: CommitMessageSchema,
@@ -196294,7 +196299,7 @@ async function gitStashLogic(input, { provider, targetPath, appContext }) {
196294
196299
  mode: input.mode
196295
196300
  };
196296
196301
  if (input.message !== undefined) {
196297
- stashOptions.message = input.message;
196302
+ stashOptions.message = normalizeMessage(input.message);
196298
196303
  }
196299
196304
  if (input.stashRef !== undefined) {
196300
196305
  stashOptions.stashRef = input.stashRef;
@@ -196382,7 +196387,7 @@ async function gitTagLogic(input, { provider, targetPath, appContext }) {
196382
196387
  tagOptions.commit = input.commit;
196383
196388
  }
196384
196389
  if (input.message !== undefined) {
196385
- tagOptions.message = input.message;
196390
+ tagOptions.message = normalizeMessage(input.message);
196386
196391
  }
196387
196392
  if (input.annotated !== undefined) {
196388
196393
  tagOptions.annotated = input.annotated;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/git-mcp-server",
3
- "version": "2.7.0",
3
+ "version": "2.7.1",
4
4
  "mcpName": "io.github.cyanheads/git-mcp-server",
5
5
  "description": "A secure and scalable Git MCP server enabling AI agents to perform comprehensive Git version control operations via STDIO and Streamable HTTP.",
6
6
  "main": "dist/index.js",
@@ -52,7 +52,7 @@
52
52
  "format": "bunx prettier --write \"**/*.{ts,js,json,md,html,css}\"",
53
53
  "prepare": "bunx husky",
54
54
  "inspector": "bunx mcp-inspector --config mcp.json --server git-mcp-server",
55
- "test": "bun test --config vitest.config.ts",
55
+ "test": "bun test",
56
56
  "test:coverage": "bun test --coverage",
57
57
  "audit": "bun audit",
58
58
  "audit:fix": "bun audit --fix",