Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/create-prompt/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ export function buildAllowedToolsString(
} else {
// When not using commit signing, add specific Bash git commands
baseTools.push(
"Bash(git add:*)",
"Bash(git commit:*)",
"Bash(git push:*)",
"Bash(git status:*)",
"Bash(git diff:*)",
"Bash(git log:*)",
"Bash(git rm:*)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git push *)",
"Bash(git status *)",
"Bash(git diff *)",
"Bash(git log *)",
"Bash(git rm *)",
);
}

Expand Down
14 changes: 7 additions & 7 deletions src/modes/tag/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ export async function prepareTagMode({
// SSH signing still uses git CLI, just with signing enabled
if (!useApiCommitSigning) {
tagModeTools.push(
"Bash(git add:*)",
"Bash(git commit:*)",
"Bash(git push:*)",
"Bash(git status:*)",
"Bash(git diff:*)",
"Bash(git log:*)",
"Bash(git rm:*)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git push *)",
"Bash(git status *)",
"Bash(git diff *)",
"Bash(git log *)",
"Bash(git rm *)",
);
} else {
// When using API commit signing, use MCP file ops tools
Expand Down
26 changes: 13 additions & 13 deletions test/create-prompt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -894,9 +894,9 @@ describe("buildAllowedToolsString", () => {
expect(result).toContain("Write");

// Default is no commit signing, so should have specific Bash git commands
expect(result).toContain("Bash(git add:*)");
expect(result).toContain("Bash(git commit:*)");
expect(result).toContain("Bash(git push:*)");
expect(result).toContain("Bash(git add *)");
expect(result).toContain("Bash(git commit *)");
expect(result).toContain("Bash(git push *)");
expect(result).toContain("mcp__github_comment__update_claude_comment");

// Should not have commit signing tools
Expand All @@ -916,8 +916,8 @@ describe("buildAllowedToolsString", () => {
expect(result).toContain("Write");

// Should have specific Bash git commands for non-signing mode
expect(result).toContain("Bash(git add:*)");
expect(result).toContain("Bash(git commit:*)");
expect(result).toContain("Bash(git add *)");
expect(result).toContain("Bash(git commit *)");
expect(result).toContain("mcp__github_comment__update_claude_comment");

// Should not have commit signing tools
Expand Down Expand Up @@ -1009,13 +1009,13 @@ describe("buildAllowedToolsString", () => {
expect(result).toContain("Write");

// Specific Bash git commands should be included
expect(result).toContain("Bash(git add:*)");
expect(result).toContain("Bash(git commit:*)");
expect(result).toContain("Bash(git push:*)");
expect(result).toContain("Bash(git status:*)");
expect(result).toContain("Bash(git diff:*)");
expect(result).toContain("Bash(git log:*)");
expect(result).toContain("Bash(git rm:*)");
expect(result).toContain("Bash(git add *)");
expect(result).toContain("Bash(git commit *)");
expect(result).toContain("Bash(git push *)");
expect(result).toContain("Bash(git status *)");
expect(result).toContain("Bash(git diff *)");
expect(result).toContain("Bash(git log *)");
expect(result).toContain("Bash(git rm *)");

// Comment tool from minimal server should be included
expect(result).toContain("mcp__github_comment__update_claude_comment");
Expand All @@ -1031,7 +1031,7 @@ describe("buildAllowedToolsString", () => {

// Base tools should be present
expect(result).toContain("Edit");
expect(result).toContain("Bash(git add:*)");
expect(result).toContain("Bash(git add *)");

// Custom tools should be included
expect(result).toContain("CustomTool1");
Expand Down
Loading