@andrebuzeli/git-mcp 2.12.8 → 2.13.0
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/dist/server.d.ts.map +1 -1
- package/dist/server.js +86 -28
- package/dist/server.js.map +1 -1
- package/dist/tools/branches.d.ts +2 -2
- package/dist/tools/code-review.d.ts +4 -4
- package/dist/tools/commits.d.ts +2 -2
- package/dist/tools/deployments.d.ts +4 -4
- package/dist/tools/gh-codespaces.d.ts +154 -0
- package/dist/tools/gh-codespaces.d.ts.map +1 -0
- package/dist/tools/gh-codespaces.js +286 -0
- package/dist/tools/gh-codespaces.js.map +1 -0
- package/dist/tools/gh-gists.d.ts +194 -0
- package/dist/tools/gh-gists.d.ts.map +1 -0
- package/dist/tools/gh-gists.js +328 -0
- package/dist/tools/gh-gists.js.map +1 -0
- package/dist/tools/gh-projects.d.ts +225 -0
- package/dist/tools/gh-projects.d.ts.map +1 -0
- package/dist/tools/gh-projects.js +365 -0
- package/dist/tools/gh-projects.js.map +1 -0
- package/dist/tools/gh-sync.d.ts +229 -0
- package/dist/tools/gh-sync.d.ts.map +1 -0
- package/dist/tools/gh-sync.js +384 -0
- package/dist/tools/gh-sync.js.map +1 -0
- package/dist/tools/git-archive.d.ts +169 -0
- package/dist/tools/git-archive.d.ts.map +1 -0
- package/dist/tools/git-archive.js +235 -0
- package/dist/tools/git-archive.js.map +1 -0
- package/dist/tools/git-bundle.d.ts +175 -0
- package/dist/tools/git-bundle.d.ts.map +1 -0
- package/dist/tools/git-bundle.js +258 -0
- package/dist/tools/git-bundle.js.map +1 -0
- package/dist/tools/git-cherry-pick.d.ts +162 -0
- package/dist/tools/git-cherry-pick.d.ts.map +1 -0
- package/dist/tools/git-cherry-pick.js +241 -0
- package/dist/tools/git-cherry-pick.js.map +1 -0
- package/dist/tools/git-config.d.ts +144 -0
- package/dist/tools/git-config.d.ts.map +1 -0
- package/dist/tools/git-config.js +293 -0
- package/dist/tools/git-config.js.map +1 -0
- package/dist/tools/git-rebase.d.ts +141 -0
- package/dist/tools/git-rebase.d.ts.map +1 -0
- package/dist/tools/git-rebase.js +234 -0
- package/dist/tools/git-rebase.js.map +1 -0
- package/dist/tools/git-remote.d.ts +142 -0
- package/dist/tools/git-remote.d.ts.map +1 -0
- package/dist/tools/git-remote.js +303 -0
- package/dist/tools/git-remote.js.map +1 -0
- package/dist/tools/git-repositories.d.ts +422 -0
- package/dist/tools/git-repositories.d.ts.map +1 -0
- package/dist/tools/git-repositories.js +557 -0
- package/dist/tools/git-repositories.js.map +1 -0
- package/dist/tools/git-reset.d.ts +134 -0
- package/dist/tools/git-reset.d.ts.map +1 -0
- package/dist/tools/git-reset.js +236 -0
- package/dist/tools/git-reset.js.map +1 -0
- package/dist/tools/git-revert.d.ts +153 -0
- package/dist/tools/git-revert.d.ts.map +1 -0
- package/dist/tools/git-revert.js +211 -0
- package/dist/tools/git-revert.js.map +1 -0
- package/dist/tools/git-stash.d.ts +144 -0
- package/dist/tools/git-stash.d.ts.map +1 -0
- package/dist/tools/git-stash.js +298 -0
- package/dist/tools/git-stash.js.map +1 -0
- package/dist/tools/git-submodule.d.ts +156 -0
- package/dist/tools/git-submodule.d.ts.map +1 -0
- package/dist/tools/git-submodule.js +314 -0
- package/dist/tools/git-submodule.js.map +1 -0
- package/dist/tools/git-sync.d.ts +4 -4
- package/dist/tools/git-worktree.d.ts +163 -0
- package/dist/tools/git-worktree.d.ts.map +1 -0
- package/dist/tools/git-worktree.js +294 -0
- package/dist/tools/git-worktree.js.map +1 -0
- package/dist/tools/pulls.d.ts +2 -2
- package/dist/tools/users.d.ts +2 -2
- package/dist/tools/version-control.d.ts +4 -4
- package/package.json +2 -2
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Tool: git-worktree
|
|
4
|
+
*
|
|
5
|
+
* DESCRIÇÃO:
|
|
6
|
+
* Gerenciamento de worktrees Git (GitHub + Gitea) com múltiplas ações
|
|
7
|
+
*
|
|
8
|
+
* FUNCIONALIDADES:
|
|
9
|
+
* - Adicionar worktree
|
|
10
|
+
* - Remover worktree
|
|
11
|
+
* - Listar worktrees
|
|
12
|
+
* - Prune worktrees
|
|
13
|
+
* - Mover worktree
|
|
14
|
+
* - Reparar worktree
|
|
15
|
+
*
|
|
16
|
+
* USO:
|
|
17
|
+
* - Para trabalhar em múltiplas branches simultaneamente
|
|
18
|
+
* - Para testes em branches diferentes
|
|
19
|
+
* - Para desenvolvimento paralelo
|
|
20
|
+
* - Para builds em branches específicas
|
|
21
|
+
*
|
|
22
|
+
* RECOMENDAÇÕES:
|
|
23
|
+
* - Use para branches de longa duração
|
|
24
|
+
* - Mantenha worktrees organizados
|
|
25
|
+
* - Limpe worktrees antigos
|
|
26
|
+
*/
|
|
27
|
+
declare const GitWorktreeInputSchema: z.ZodObject<{
|
|
28
|
+
action: z.ZodEnum<["add", "remove", "list", "prune", "move", "repair"]>;
|
|
29
|
+
owner: z.ZodString;
|
|
30
|
+
repo: z.ZodString;
|
|
31
|
+
provider: z.ZodEnum<["gitea", "github"]>;
|
|
32
|
+
projectPath: z.ZodString;
|
|
33
|
+
worktree_path: z.ZodOptional<z.ZodString>;
|
|
34
|
+
branch_name: z.ZodOptional<z.ZodString>;
|
|
35
|
+
commit_hash: z.ZodOptional<z.ZodString>;
|
|
36
|
+
worktree_to_remove: z.ZodOptional<z.ZodString>;
|
|
37
|
+
force: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
+
old_path: z.ZodOptional<z.ZodString>;
|
|
39
|
+
new_path: z.ZodOptional<z.ZodString>;
|
|
40
|
+
worktree_to_repair: z.ZodOptional<z.ZodString>;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
provider: "gitea" | "github";
|
|
43
|
+
owner: string;
|
|
44
|
+
repo: string;
|
|
45
|
+
action: "list" | "add" | "remove" | "prune" | "move" | "repair";
|
|
46
|
+
projectPath: string;
|
|
47
|
+
branch_name?: string | undefined;
|
|
48
|
+
commit_hash?: string | undefined;
|
|
49
|
+
worktree_path?: string | undefined;
|
|
50
|
+
worktree_to_remove?: string | undefined;
|
|
51
|
+
force?: boolean | undefined;
|
|
52
|
+
old_path?: string | undefined;
|
|
53
|
+
new_path?: string | undefined;
|
|
54
|
+
worktree_to_repair?: string | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
provider: "gitea" | "github";
|
|
57
|
+
owner: string;
|
|
58
|
+
repo: string;
|
|
59
|
+
action: "list" | "add" | "remove" | "prune" | "move" | "repair";
|
|
60
|
+
projectPath: string;
|
|
61
|
+
branch_name?: string | undefined;
|
|
62
|
+
commit_hash?: string | undefined;
|
|
63
|
+
worktree_path?: string | undefined;
|
|
64
|
+
worktree_to_remove?: string | undefined;
|
|
65
|
+
force?: boolean | undefined;
|
|
66
|
+
old_path?: string | undefined;
|
|
67
|
+
new_path?: string | undefined;
|
|
68
|
+
worktree_to_repair?: string | undefined;
|
|
69
|
+
}>;
|
|
70
|
+
export type GitWorktreeInput = z.infer<typeof GitWorktreeInputSchema>;
|
|
71
|
+
declare const GitWorktreeResultSchema: z.ZodObject<{
|
|
72
|
+
success: z.ZodBoolean;
|
|
73
|
+
action: z.ZodString;
|
|
74
|
+
message: z.ZodString;
|
|
75
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
76
|
+
error: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, "strip", z.ZodTypeAny, {
|
|
78
|
+
message: string;
|
|
79
|
+
action: string;
|
|
80
|
+
success: boolean;
|
|
81
|
+
error?: string | undefined;
|
|
82
|
+
data?: any;
|
|
83
|
+
}, {
|
|
84
|
+
message: string;
|
|
85
|
+
action: string;
|
|
86
|
+
success: boolean;
|
|
87
|
+
error?: string | undefined;
|
|
88
|
+
data?: any;
|
|
89
|
+
}>;
|
|
90
|
+
export type GitWorktreeResult = z.infer<typeof GitWorktreeResultSchema>;
|
|
91
|
+
export declare const gitWorktreeTool: {
|
|
92
|
+
name: string;
|
|
93
|
+
description: string;
|
|
94
|
+
inputSchema: {
|
|
95
|
+
type: string;
|
|
96
|
+
properties: {
|
|
97
|
+
action: {
|
|
98
|
+
type: string;
|
|
99
|
+
enum: string[];
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
owner: {
|
|
103
|
+
type: string;
|
|
104
|
+
description: string;
|
|
105
|
+
};
|
|
106
|
+
repo: {
|
|
107
|
+
type: string;
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
110
|
+
provider: {
|
|
111
|
+
type: string;
|
|
112
|
+
enum: string[];
|
|
113
|
+
description: string;
|
|
114
|
+
};
|
|
115
|
+
projectPath: {
|
|
116
|
+
type: string;
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
worktree_path: {
|
|
120
|
+
type: string;
|
|
121
|
+
description: string;
|
|
122
|
+
};
|
|
123
|
+
branch_name: {
|
|
124
|
+
type: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
127
|
+
commit_hash: {
|
|
128
|
+
type: string;
|
|
129
|
+
description: string;
|
|
130
|
+
};
|
|
131
|
+
worktree_to_remove: {
|
|
132
|
+
type: string;
|
|
133
|
+
description: string;
|
|
134
|
+
};
|
|
135
|
+
force: {
|
|
136
|
+
type: string;
|
|
137
|
+
description: string;
|
|
138
|
+
};
|
|
139
|
+
old_path: {
|
|
140
|
+
type: string;
|
|
141
|
+
description: string;
|
|
142
|
+
};
|
|
143
|
+
new_path: {
|
|
144
|
+
type: string;
|
|
145
|
+
description: string;
|
|
146
|
+
};
|
|
147
|
+
worktree_to_repair: {
|
|
148
|
+
type: string;
|
|
149
|
+
description: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
required: string[];
|
|
153
|
+
};
|
|
154
|
+
handler(input: GitWorktreeInput): Promise<GitWorktreeResult>;
|
|
155
|
+
add(params: GitWorktreeInput): Promise<GitWorktreeResult>;
|
|
156
|
+
remove(params: GitWorktreeInput): Promise<GitWorktreeResult>;
|
|
157
|
+
list(params: GitWorktreeInput): Promise<GitWorktreeResult>;
|
|
158
|
+
prune(params: GitWorktreeInput): Promise<GitWorktreeResult>;
|
|
159
|
+
move(params: GitWorktreeInput): Promise<GitWorktreeResult>;
|
|
160
|
+
repair(params: GitWorktreeInput): Promise<GitWorktreeResult>;
|
|
161
|
+
};
|
|
162
|
+
export {};
|
|
163
|
+
//# sourceMappingURL=git-worktree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-worktree.d.ts","sourceRoot":"","sources":["../../src/tools/git-worktree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,QAAA,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsB1B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,QAAA,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;EAM3B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA2BL,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;gBA8BhD,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;mBAwC1C,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;iBAqC/C,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;kBAqC5C,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;iBA0B9C,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;mBA+B3C,gBAAgB,GAAG,OAAO,CAAC,iBAAiB,CAAC;CA6BnE,CAAC"}
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gitWorktreeTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const terminal_controller_js_1 = require("../utils/terminal-controller.js");
|
|
6
|
+
/**
|
|
7
|
+
* Tool: git-worktree
|
|
8
|
+
*
|
|
9
|
+
* DESCRIÇÃO:
|
|
10
|
+
* Gerenciamento de worktrees Git (GitHub + Gitea) com múltiplas ações
|
|
11
|
+
*
|
|
12
|
+
* FUNCIONALIDADES:
|
|
13
|
+
* - Adicionar worktree
|
|
14
|
+
* - Remover worktree
|
|
15
|
+
* - Listar worktrees
|
|
16
|
+
* - Prune worktrees
|
|
17
|
+
* - Mover worktree
|
|
18
|
+
* - Reparar worktree
|
|
19
|
+
*
|
|
20
|
+
* USO:
|
|
21
|
+
* - Para trabalhar em múltiplas branches simultaneamente
|
|
22
|
+
* - Para testes em branches diferentes
|
|
23
|
+
* - Para desenvolvimento paralelo
|
|
24
|
+
* - Para builds em branches específicas
|
|
25
|
+
*
|
|
26
|
+
* RECOMENDAÇÕES:
|
|
27
|
+
* - Use para branches de longa duração
|
|
28
|
+
* - Mantenha worktrees organizados
|
|
29
|
+
* - Limpe worktrees antigos
|
|
30
|
+
*/
|
|
31
|
+
const GitWorktreeInputSchema = zod_1.z.object({
|
|
32
|
+
action: zod_1.z.enum(['add', 'remove', 'list', 'prune', 'move', 'repair']),
|
|
33
|
+
owner: zod_1.z.string(),
|
|
34
|
+
repo: zod_1.z.string(),
|
|
35
|
+
provider: zod_1.z.enum(['gitea', 'github']).describe('Provider to use (gitea or github)'),
|
|
36
|
+
projectPath: zod_1.z.string().describe('Local project path for git operations'),
|
|
37
|
+
// Para add
|
|
38
|
+
worktree_path: zod_1.z.string().optional(),
|
|
39
|
+
branch_name: zod_1.z.string().optional(),
|
|
40
|
+
commit_hash: zod_1.z.string().optional(),
|
|
41
|
+
// Para remove
|
|
42
|
+
worktree_to_remove: zod_1.z.string().optional(),
|
|
43
|
+
force: zod_1.z.boolean().optional(),
|
|
44
|
+
// Para move
|
|
45
|
+
old_path: zod_1.z.string().optional(),
|
|
46
|
+
new_path: zod_1.z.string().optional(),
|
|
47
|
+
// Para repair
|
|
48
|
+
worktree_to_repair: zod_1.z.string().optional(),
|
|
49
|
+
});
|
|
50
|
+
const GitWorktreeResultSchema = zod_1.z.object({
|
|
51
|
+
success: zod_1.z.boolean(),
|
|
52
|
+
action: zod_1.z.string(),
|
|
53
|
+
message: zod_1.z.string(),
|
|
54
|
+
data: zod_1.z.any().optional(),
|
|
55
|
+
error: zod_1.z.string().optional()
|
|
56
|
+
});
|
|
57
|
+
exports.gitWorktreeTool = {
|
|
58
|
+
name: 'git-worktree',
|
|
59
|
+
description: 'Manage Git worktrees (GitHub + Gitea) with multiple actions: add, remove, list, prune, move, repair. Suporte completo a GitHub e Gitea simultaneamente. Boas práticas (solo): use para trabalhar em múltiplas branches simultaneamente, testes em branches diferentes, desenvolvimento paralelo; use para branches de longa duração, mantenha worktrees organizados.',
|
|
60
|
+
inputSchema: {
|
|
61
|
+
type: 'object',
|
|
62
|
+
properties: {
|
|
63
|
+
action: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
enum: ['add', 'remove', 'list', 'prune', 'move', 'repair'],
|
|
66
|
+
description: 'Action to perform on worktrees'
|
|
67
|
+
},
|
|
68
|
+
owner: { type: 'string', description: 'Repository owner' },
|
|
69
|
+
repo: { type: 'string', description: 'Repository name' },
|
|
70
|
+
provider: { type: 'string', enum: ['gitea', 'github'], description: 'Provider to use (gitea or github)' },
|
|
71
|
+
projectPath: { type: 'string', description: 'Local project path for git operations' },
|
|
72
|
+
worktree_path: { type: 'string', description: 'Worktree path' },
|
|
73
|
+
branch_name: { type: 'string', description: 'Branch name' },
|
|
74
|
+
commit_hash: { type: 'string', description: 'Commit hash' },
|
|
75
|
+
worktree_to_remove: { type: 'string', description: 'Worktree to remove' },
|
|
76
|
+
force: { type: 'boolean', description: 'Force operation' },
|
|
77
|
+
old_path: { type: 'string', description: 'Old worktree path' },
|
|
78
|
+
new_path: { type: 'string', description: 'New worktree path' },
|
|
79
|
+
worktree_to_repair: { type: 'string', description: 'Worktree to repair' }
|
|
80
|
+
},
|
|
81
|
+
required: ['action', 'owner', 'repo', 'provider', 'projectPath']
|
|
82
|
+
},
|
|
83
|
+
async handler(input) {
|
|
84
|
+
try {
|
|
85
|
+
const validatedInput = GitWorktreeInputSchema.parse(input);
|
|
86
|
+
switch (validatedInput.action) {
|
|
87
|
+
case 'add':
|
|
88
|
+
return await this.add(validatedInput);
|
|
89
|
+
case 'remove':
|
|
90
|
+
return await this.remove(validatedInput);
|
|
91
|
+
case 'list':
|
|
92
|
+
return await this.list(validatedInput);
|
|
93
|
+
case 'prune':
|
|
94
|
+
return await this.prune(validatedInput);
|
|
95
|
+
case 'move':
|
|
96
|
+
return await this.move(validatedInput);
|
|
97
|
+
case 'repair':
|
|
98
|
+
return await this.repair(validatedInput);
|
|
99
|
+
default:
|
|
100
|
+
throw new Error(`Ação não suportada: ${validatedInput.action}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
catch (error) {
|
|
104
|
+
return {
|
|
105
|
+
success: false,
|
|
106
|
+
action: input.action,
|
|
107
|
+
message: 'Erro na operação de worktree',
|
|
108
|
+
error: error instanceof Error ? error.message : String(error)
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
async add(params) {
|
|
113
|
+
try {
|
|
114
|
+
if (!params.worktree_path) {
|
|
115
|
+
throw new Error('worktree_path é obrigatório para add');
|
|
116
|
+
}
|
|
117
|
+
let command = `cd "${params.projectPath}" && git worktree add ${params.worktree_path}`;
|
|
118
|
+
if (params.branch_name) {
|
|
119
|
+
command += ` -b ${params.branch_name}`;
|
|
120
|
+
}
|
|
121
|
+
else if (params.commit_hash) {
|
|
122
|
+
command += ` ${params.commit_hash}`;
|
|
123
|
+
}
|
|
124
|
+
const result = await (0, terminal_controller_js_1.runTerminalCmd)({
|
|
125
|
+
command,
|
|
126
|
+
is_background: false,
|
|
127
|
+
explanation: 'Adicionando worktree'
|
|
128
|
+
});
|
|
129
|
+
if (result.exitCode !== 0) {
|
|
130
|
+
throw new Error(`Falha ao adicionar worktree: ${result.output}`);
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
success: true,
|
|
134
|
+
action: 'add',
|
|
135
|
+
message: `Worktree adicionado com sucesso em ${params.worktree_path}`,
|
|
136
|
+
data: {
|
|
137
|
+
worktree_path: params.worktree_path,
|
|
138
|
+
branch_name: params.branch_name,
|
|
139
|
+
commit_hash: params.commit_hash,
|
|
140
|
+
output: result.output
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
catch (error) {
|
|
145
|
+
throw new Error(`Falha ao adicionar worktree: ${error instanceof Error ? error.message : String(error)}`);
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
async remove(params) {
|
|
149
|
+
try {
|
|
150
|
+
if (!params.worktree_to_remove) {
|
|
151
|
+
throw new Error('worktree_to_remove é obrigatório para remove');
|
|
152
|
+
}
|
|
153
|
+
let command = `cd "${params.projectPath}" && git worktree remove ${params.worktree_to_remove}`;
|
|
154
|
+
if (params.force) {
|
|
155
|
+
command += ' --force';
|
|
156
|
+
}
|
|
157
|
+
const result = await (0, terminal_controller_js_1.runTerminalCmd)({
|
|
158
|
+
command,
|
|
159
|
+
is_background: false,
|
|
160
|
+
explanation: 'Removendo worktree'
|
|
161
|
+
});
|
|
162
|
+
if (result.exitCode !== 0) {
|
|
163
|
+
throw new Error(`Falha ao remover worktree: ${result.output}`);
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
success: true,
|
|
167
|
+
action: 'remove',
|
|
168
|
+
message: `Worktree removido com sucesso: ${params.worktree_to_remove}`,
|
|
169
|
+
data: {
|
|
170
|
+
worktree_to_remove: params.worktree_to_remove,
|
|
171
|
+
force: params.force,
|
|
172
|
+
output: result.output
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
throw new Error(`Falha ao remover worktree: ${error instanceof Error ? error.message : String(error)}`);
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
async list(params) {
|
|
181
|
+
try {
|
|
182
|
+
const result = await (0, terminal_controller_js_1.runTerminalCmd)({
|
|
183
|
+
command: `cd "${params.projectPath}" && git worktree list`,
|
|
184
|
+
is_background: false,
|
|
185
|
+
explanation: 'Listando worktrees'
|
|
186
|
+
});
|
|
187
|
+
if (result.exitCode !== 0) {
|
|
188
|
+
throw new Error(`Falha ao listar worktrees: ${result.output}`);
|
|
189
|
+
}
|
|
190
|
+
const worktrees = result.output.split('\n')
|
|
191
|
+
.filter(line => line.trim())
|
|
192
|
+
.map(line => {
|
|
193
|
+
const parts = line.trim().split(' ');
|
|
194
|
+
return {
|
|
195
|
+
path: parts[0],
|
|
196
|
+
commit: parts[1],
|
|
197
|
+
branch: parts[2] || 'detached'
|
|
198
|
+
};
|
|
199
|
+
});
|
|
200
|
+
return {
|
|
201
|
+
success: true,
|
|
202
|
+
action: 'list',
|
|
203
|
+
message: 'Worktrees listados com sucesso',
|
|
204
|
+
data: {
|
|
205
|
+
worktrees,
|
|
206
|
+
output: result.output
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
catch (error) {
|
|
211
|
+
throw new Error(`Falha ao listar worktrees: ${error instanceof Error ? error.message : String(error)}`);
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
async prune(params) {
|
|
215
|
+
try {
|
|
216
|
+
const result = await (0, terminal_controller_js_1.runTerminalCmd)({
|
|
217
|
+
command: `cd "${params.projectPath}" && git worktree prune`,
|
|
218
|
+
is_background: false,
|
|
219
|
+
explanation: 'Prunando worktrees'
|
|
220
|
+
});
|
|
221
|
+
if (result.exitCode !== 0) {
|
|
222
|
+
throw new Error(`Falha ao prunar worktrees: ${result.output}`);
|
|
223
|
+
}
|
|
224
|
+
return {
|
|
225
|
+
success: true,
|
|
226
|
+
action: 'prune',
|
|
227
|
+
message: 'Worktrees prunados com sucesso',
|
|
228
|
+
data: {
|
|
229
|
+
pruned: true,
|
|
230
|
+
output: result.output
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
catch (error) {
|
|
235
|
+
throw new Error(`Falha ao prunar worktrees: ${error instanceof Error ? error.message : String(error)}`);
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
async move(params) {
|
|
239
|
+
try {
|
|
240
|
+
if (!params.old_path || !params.new_path) {
|
|
241
|
+
throw new Error('old_path e new_path são obrigatórios para move');
|
|
242
|
+
}
|
|
243
|
+
const result = await (0, terminal_controller_js_1.runTerminalCmd)({
|
|
244
|
+
command: `cd "${params.projectPath}" && git worktree move ${params.old_path} ${params.new_path}`,
|
|
245
|
+
is_background: false,
|
|
246
|
+
explanation: 'Movendo worktree'
|
|
247
|
+
});
|
|
248
|
+
if (result.exitCode !== 0) {
|
|
249
|
+
throw new Error(`Falha ao mover worktree: ${result.output}`);
|
|
250
|
+
}
|
|
251
|
+
return {
|
|
252
|
+
success: true,
|
|
253
|
+
action: 'move',
|
|
254
|
+
message: `Worktree movido de ${params.old_path} para ${params.new_path}`,
|
|
255
|
+
data: {
|
|
256
|
+
old_path: params.old_path,
|
|
257
|
+
new_path: params.new_path,
|
|
258
|
+
output: result.output
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
catch (error) {
|
|
263
|
+
throw new Error(`Falha ao mover worktree: ${error instanceof Error ? error.message : String(error)}`);
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
async repair(params) {
|
|
267
|
+
try {
|
|
268
|
+
if (!params.worktree_to_repair) {
|
|
269
|
+
throw new Error('worktree_to_repair é obrigatório para repair');
|
|
270
|
+
}
|
|
271
|
+
const result = await (0, terminal_controller_js_1.runTerminalCmd)({
|
|
272
|
+
command: `cd "${params.projectPath}" && git worktree repair ${params.worktree_to_repair}`,
|
|
273
|
+
is_background: false,
|
|
274
|
+
explanation: 'Reparando worktree'
|
|
275
|
+
});
|
|
276
|
+
if (result.exitCode !== 0) {
|
|
277
|
+
throw new Error(`Falha ao reparar worktree: ${result.output}`);
|
|
278
|
+
}
|
|
279
|
+
return {
|
|
280
|
+
success: true,
|
|
281
|
+
action: 'repair',
|
|
282
|
+
message: `Worktree reparado com sucesso: ${params.worktree_to_repair}`,
|
|
283
|
+
data: {
|
|
284
|
+
worktree_to_repair: params.worktree_to_repair,
|
|
285
|
+
output: result.output
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
}
|
|
289
|
+
catch (error) {
|
|
290
|
+
throw new Error(`Falha ao reparar worktree: ${error instanceof Error ? error.message : String(error)}`);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
//# sourceMappingURL=git-worktree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-worktree.js","sourceRoot":"","sources":["../../src/tools/git-worktree.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4EAAiE;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IACpE,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,mCAAmC,CAAC;IACnF,WAAW,EAAE,OAAC,CAAC,MAAM,EA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92
|
limit?: number | undefined;
|
|
93
93
|
query?: string | undefined;
|
|
94
|
-
merge_method?: "merge" | "rebase" | "squash" | undefined;
|
|
95
94
|
author?: string | undefined;
|
|
95
|
+
merge_method?: "merge" | "rebase" | "squash" | undefined;
|
|
96
96
|
milestone?: number | undefined;
|
|
97
97
|
new_title?: string | undefined;
|
|
98
98
|
new_body?: string | undefined;
|
|
@@ -125,8 +125,8 @@ declare const PullsInputSchema: z.ZodObject<{
|
|
|
125
125
|
page?: number | undefined;
|
|
126
126
|
limit?: number | undefined;
|
|
127
127
|
query?: string | undefined;
|
|
128
|
-
merge_method?: "merge" | "rebase" | "squash" | undefined;
|
|
129
128
|
author?: string | undefined;
|
|
129
|
+
merge_method?: "merge" | "rebase" | "squash" | undefined;
|
|
130
130
|
milestone?: number | undefined;
|
|
131
131
|
new_title?: string | undefined;
|
|
132
132
|
new_body?: string | undefined;
|
package/dist/tools/users.d.ts
CHANGED
|
@@ -57,8 +57,8 @@ declare const UsersInputSchema: z.ZodObject<{
|
|
|
57
57
|
limit?: number | undefined;
|
|
58
58
|
username?: string | undefined;
|
|
59
59
|
query?: string | undefined;
|
|
60
|
-
repo_type?: "all" | "owner" | "member" | "collaborator" | undefined;
|
|
61
60
|
direction?: "desc" | "asc" | undefined;
|
|
61
|
+
repo_type?: "all" | "owner" | "member" | "collaborator" | undefined;
|
|
62
62
|
}, {
|
|
63
63
|
provider: "gitea" | "github" | "both";
|
|
64
64
|
action: "get" | "list" | "search" | "orgs" | "repos";
|
|
@@ -67,8 +67,8 @@ declare const UsersInputSchema: z.ZodObject<{
|
|
|
67
67
|
limit?: number | undefined;
|
|
68
68
|
username?: string | undefined;
|
|
69
69
|
query?: string | undefined;
|
|
70
|
-
repo_type?: "all" | "owner" | "member" | "collaborator" | undefined;
|
|
71
70
|
direction?: "desc" | "asc" | undefined;
|
|
71
|
+
repo_type?: "all" | "owner" | "member" | "collaborator" | undefined;
|
|
72
72
|
}>;
|
|
73
73
|
export type UsersInput = z.infer<typeof UsersInputSchema>;
|
|
74
74
|
/**
|
|
@@ -37,26 +37,26 @@ declare const VersionControlInputSchema: z.ZodObject<{
|
|
|
37
37
|
provider: z.ZodEnum<["gitea", "github", "both"]>;
|
|
38
38
|
}, "strip", z.ZodTypeAny, {
|
|
39
39
|
provider: "gitea" | "github" | "both";
|
|
40
|
-
action: "
|
|
40
|
+
action: "rollback" | "analyze" | "version" | "backup" | "track" | "history";
|
|
41
41
|
description?: string | undefined;
|
|
42
|
+
exclude_patterns?: string[] | undefined;
|
|
42
43
|
dry_run?: boolean | undefined;
|
|
43
44
|
version?: string | undefined;
|
|
44
45
|
project?: string | undefined;
|
|
45
46
|
auto_backup?: boolean | undefined;
|
|
46
47
|
backup_retention?: number | undefined;
|
|
47
48
|
include_files?: string[] | undefined;
|
|
48
|
-
exclude_patterns?: string[] | undefined;
|
|
49
49
|
}, {
|
|
50
50
|
provider: "gitea" | "github" | "both";
|
|
51
|
-
action: "
|
|
51
|
+
action: "rollback" | "analyze" | "version" | "backup" | "track" | "history";
|
|
52
52
|
description?: string | undefined;
|
|
53
|
+
exclude_patterns?: string[] | undefined;
|
|
53
54
|
dry_run?: boolean | undefined;
|
|
54
55
|
version?: string | undefined;
|
|
55
56
|
project?: string | undefined;
|
|
56
57
|
auto_backup?: boolean | undefined;
|
|
57
58
|
backup_retention?: number | undefined;
|
|
58
59
|
include_files?: string[] | undefined;
|
|
59
|
-
exclude_patterns?: string[] | undefined;
|
|
60
60
|
}>;
|
|
61
61
|
export type VersionControlInput = z.infer<typeof VersionControlInputSchema>;
|
|
62
62
|
declare const VersionControlResultSchema: z.ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrebuzeli/git-mcp",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "MCP server for Gitea and GitHub integration with
|
|
3
|
+
"version": "2.13.0",
|
|
4
|
+
"description": "MCP server for Gitea and GitHub integration with 30 comprehensive DevOps tools - Complete Git/GitHub functionality with mandatory provider parameters for full workflow automation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"git-mcp": "dist/index.js"
|