@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,134 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Tool: git-reset
|
|
4
|
+
*
|
|
5
|
+
* DESCRIÇÃO:
|
|
6
|
+
* Gerenciamento de reset Git (GitHub + Gitea) com múltiplas ações
|
|
7
|
+
*
|
|
8
|
+
* FUNCIONALIDADES:
|
|
9
|
+
* - Reset soft (mantém mudanças no staging)
|
|
10
|
+
* - Reset mixed (padrão, remove do staging)
|
|
11
|
+
* - Reset hard (remove todas as mudanças)
|
|
12
|
+
* - Reset para commit específico
|
|
13
|
+
* - Reset de branch
|
|
14
|
+
*
|
|
15
|
+
* USO:
|
|
16
|
+
* - Para desfazer commits
|
|
17
|
+
* - Para limpar staging area
|
|
18
|
+
* - Para voltar a estado anterior
|
|
19
|
+
* - Para remover mudanças não commitadas
|
|
20
|
+
*
|
|
21
|
+
* RECOMENDAÇÕES:
|
|
22
|
+
* - Use com cuidado, especialmente reset hard
|
|
23
|
+
* - Faça backup antes de resets destrutivos
|
|
24
|
+
* - Teste em branches locais primeiro
|
|
25
|
+
*/
|
|
26
|
+
declare const GitResetInputSchema: z.ZodObject<{
|
|
27
|
+
action: z.ZodEnum<["soft", "mixed", "hard", "reset-to-commit", "reset-branch"]>;
|
|
28
|
+
owner: z.ZodString;
|
|
29
|
+
repo: z.ZodString;
|
|
30
|
+
provider: z.ZodEnum<["gitea", "github"]>;
|
|
31
|
+
projectPath: z.ZodString;
|
|
32
|
+
commit_hash: z.ZodOptional<z.ZodString>;
|
|
33
|
+
branch_name: z.ZodOptional<z.ZodString>;
|
|
34
|
+
reset_type: z.ZodOptional<z.ZodEnum<["soft", "mixed", "hard"]>>;
|
|
35
|
+
target_branch: z.ZodOptional<z.ZodString>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
provider: "gitea" | "github";
|
|
38
|
+
owner: string;
|
|
39
|
+
repo: string;
|
|
40
|
+
action: "soft" | "mixed" | "hard" | "reset-to-commit" | "reset-branch";
|
|
41
|
+
projectPath: string;
|
|
42
|
+
branch_name?: string | undefined;
|
|
43
|
+
target_branch?: string | undefined;
|
|
44
|
+
commit_hash?: string | undefined;
|
|
45
|
+
reset_type?: "soft" | "mixed" | "hard" | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
provider: "gitea" | "github";
|
|
48
|
+
owner: string;
|
|
49
|
+
repo: string;
|
|
50
|
+
action: "soft" | "mixed" | "hard" | "reset-to-commit" | "reset-branch";
|
|
51
|
+
projectPath: string;
|
|
52
|
+
branch_name?: string | undefined;
|
|
53
|
+
target_branch?: string | undefined;
|
|
54
|
+
commit_hash?: string | undefined;
|
|
55
|
+
reset_type?: "soft" | "mixed" | "hard" | undefined;
|
|
56
|
+
}>;
|
|
57
|
+
export type GitResetInput = z.infer<typeof GitResetInputSchema>;
|
|
58
|
+
declare const GitResetResultSchema: z.ZodObject<{
|
|
59
|
+
success: z.ZodBoolean;
|
|
60
|
+
action: z.ZodString;
|
|
61
|
+
message: z.ZodString;
|
|
62
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
63
|
+
error: z.ZodOptional<z.ZodString>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
message: string;
|
|
66
|
+
action: string;
|
|
67
|
+
success: boolean;
|
|
68
|
+
error?: string | undefined;
|
|
69
|
+
data?: any;
|
|
70
|
+
}, {
|
|
71
|
+
message: string;
|
|
72
|
+
action: string;
|
|
73
|
+
success: boolean;
|
|
74
|
+
error?: string | undefined;
|
|
75
|
+
data?: any;
|
|
76
|
+
}>;
|
|
77
|
+
export type GitResetResult = z.infer<typeof GitResetResultSchema>;
|
|
78
|
+
export declare const gitResetTool: {
|
|
79
|
+
name: string;
|
|
80
|
+
description: string;
|
|
81
|
+
inputSchema: {
|
|
82
|
+
type: string;
|
|
83
|
+
properties: {
|
|
84
|
+
action: {
|
|
85
|
+
type: string;
|
|
86
|
+
enum: string[];
|
|
87
|
+
description: string;
|
|
88
|
+
};
|
|
89
|
+
owner: {
|
|
90
|
+
type: string;
|
|
91
|
+
description: string;
|
|
92
|
+
};
|
|
93
|
+
repo: {
|
|
94
|
+
type: string;
|
|
95
|
+
description: string;
|
|
96
|
+
};
|
|
97
|
+
provider: {
|
|
98
|
+
type: string;
|
|
99
|
+
enum: string[];
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
projectPath: {
|
|
103
|
+
type: string;
|
|
104
|
+
description: string;
|
|
105
|
+
};
|
|
106
|
+
commit_hash: {
|
|
107
|
+
type: string;
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
110
|
+
branch_name: {
|
|
111
|
+
type: string;
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
114
|
+
reset_type: {
|
|
115
|
+
type: string;
|
|
116
|
+
enum: string[];
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
target_branch: {
|
|
120
|
+
type: string;
|
|
121
|
+
description: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
required: string[];
|
|
125
|
+
};
|
|
126
|
+
handler(input: GitResetInput): Promise<GitResetResult>;
|
|
127
|
+
softReset(params: GitResetInput): Promise<GitResetResult>;
|
|
128
|
+
mixedReset(params: GitResetInput): Promise<GitResetResult>;
|
|
129
|
+
hardReset(params: GitResetInput): Promise<GitResetResult>;
|
|
130
|
+
resetToCommit(params: GitResetInput): Promise<GitResetResult>;
|
|
131
|
+
resetBranch(params: GitResetInput): Promise<GitResetResult>;
|
|
132
|
+
};
|
|
133
|
+
export {};
|
|
134
|
+
//# sourceMappingURL=git-reset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-reset.d.ts","sourceRoot":"","sources":["../../src/tools/git-reset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcvB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAMxB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAuBF,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;sBA4BpC,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;uBA6BtC,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;sBA6BxC,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;0BA6BnC,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;wBAiCzC,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC;CAgClE,CAAC"}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.gitResetTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const terminal_controller_js_1 = require("../utils/terminal-controller.js");
|
|
6
|
+
/**
|
|
7
|
+
* Tool: git-reset
|
|
8
|
+
*
|
|
9
|
+
* DESCRIÇÃO:
|
|
10
|
+
* Gerenciamento de reset Git (GitHub + Gitea) com múltiplas ações
|
|
11
|
+
*
|
|
12
|
+
* FUNCIONALIDADES:
|
|
13
|
+
* - Reset soft (mantém mudanças no staging)
|
|
14
|
+
* - Reset mixed (padrão, remove do staging)
|
|
15
|
+
* - Reset hard (remove todas as mudanças)
|
|
16
|
+
* - Reset para commit específico
|
|
17
|
+
* - Reset de branch
|
|
18
|
+
*
|
|
19
|
+
* USO:
|
|
20
|
+
* - Para desfazer commits
|
|
21
|
+
* - Para limpar staging area
|
|
22
|
+
* - Para voltar a estado anterior
|
|
23
|
+
* - Para remover mudanças não commitadas
|
|
24
|
+
*
|
|
25
|
+
* RECOMENDAÇÕES:
|
|
26
|
+
* - Use com cuidado, especialmente reset hard
|
|
27
|
+
* - Faça backup antes de resets destrutivos
|
|
28
|
+
* - Teste em branches locais primeiro
|
|
29
|
+
*/
|
|
30
|
+
const GitResetInputSchema = zod_1.z.object({
|
|
31
|
+
action: zod_1.z.enum(['soft', 'mixed', 'hard', 'reset-to-commit', 'reset-branch']),
|
|
32
|
+
owner: zod_1.z.string(),
|
|
33
|
+
repo: zod_1.z.string(),
|
|
34
|
+
provider: zod_1.z.enum(['gitea', 'github']).describe('Provider to use (gitea or github)'),
|
|
35
|
+
projectPath: zod_1.z.string().describe('Local project path for git operations'),
|
|
36
|
+
// Para reset
|
|
37
|
+
commit_hash: zod_1.z.string().optional(),
|
|
38
|
+
branch_name: zod_1.z.string().optional(),
|
|
39
|
+
reset_type: zod_1.z.enum(['soft', 'mixed', 'hard']).optional(),
|
|
40
|
+
// Para reset-branch
|
|
41
|
+
target_branch: zod_1.z.string().optional(),
|
|
42
|
+
});
|
|
43
|
+
const GitResetResultSchema = zod_1.z.object({
|
|
44
|
+
success: zod_1.z.boolean(),
|
|
45
|
+
action: zod_1.z.string(),
|
|
46
|
+
message: zod_1.z.string(),
|
|
47
|
+
data: zod_1.z.any().optional(),
|
|
48
|
+
error: zod_1.z.string().optional()
|
|
49
|
+
});
|
|
50
|
+
exports.gitResetTool = {
|
|
51
|
+
name: 'git-reset',
|
|
52
|
+
description: 'Manage Git reset operations (GitHub + Gitea) with multiple actions: soft, mixed, hard, reset-to-commit, reset-branch. Suporte completo a GitHub e Gitea simultaneamente. Boas práticas (solo): use para desfazer commits, limpar staging area, voltar a estado anterior; use com cuidado especialmente reset hard, faça backup antes de resets destrutivos.',
|
|
53
|
+
inputSchema: {
|
|
54
|
+
type: 'object',
|
|
55
|
+
properties: {
|
|
56
|
+
action: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
enum: ['soft', 'mixed', 'hard', 'reset-to-commit', 'reset-branch'],
|
|
59
|
+
description: 'Action to perform on reset'
|
|
60
|
+
},
|
|
61
|
+
owner: { type: 'string', description: 'Repository owner' },
|
|
62
|
+
repo: { type: 'string', description: 'Repository name' },
|
|
63
|
+
provider: { type: 'string', enum: ['gitea', 'github'], description: 'Provider to use (gitea or github)' },
|
|
64
|
+
projectPath: { type: 'string', description: 'Local project path for git operations' },
|
|
65
|
+
commit_hash: { type: 'string', description: 'Commit hash to reset to' },
|
|
66
|
+
branch_name: { type: 'string', description: 'Branch name for reset' },
|
|
67
|
+
reset_type: { type: 'string', enum: ['soft', 'mixed', 'hard'], description: 'Type of reset' },
|
|
68
|
+
target_branch: { type: 'string', description: 'Target branch for reset' }
|
|
69
|
+
},
|
|
70
|
+
required: ['action', 'owner', 'repo', 'provider', 'projectPath']
|
|
71
|
+
},
|
|
72
|
+
async handler(input) {
|
|
73
|
+
try {
|
|
74
|
+
const validatedInput = GitResetInputSchema.parse(input);
|
|
75
|
+
switch (validatedInput.action) {
|
|
76
|
+
case 'soft':
|
|
77
|
+
return await this.softReset(validatedInput);
|
|
78
|
+
case 'mixed':
|
|
79
|
+
return await this.mixedReset(validatedInput);
|
|
80
|
+
case 'hard':
|
|
81
|
+
return await this.hardReset(validatedInput);
|
|
82
|
+
case 'reset-to-commit':
|
|
83
|
+
return await this.resetToCommit(validatedInput);
|
|
84
|
+
case 'reset-branch':
|
|
85
|
+
return await this.resetBranch(validatedInput);
|
|
86
|
+
default:
|
|
87
|
+
throw new Error(`Ação não suportada: ${validatedInput.action}`);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
catch (error) {
|
|
91
|
+
return {
|
|
92
|
+
success: false,
|
|
93
|
+
action: input.action,
|
|
94
|
+
message: 'Erro na operação de reset',
|
|
95
|
+
error: error instanceof Error ? error.message : String(error)
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
async softReset(params) {
|
|
100
|
+
try {
|
|
101
|
+
const target = params.commit_hash || params.branch_name || 'HEAD~1';
|
|
102
|
+
const result = await (0, terminal_controller_js_1.runTerminalCmd)({
|
|
103
|
+
command: `cd "${params.projectPath}" && git reset --soft ${target}`,
|
|
104
|
+
is_background: false,
|
|
105
|
+
explanation: 'Executando reset soft'
|
|
106
|
+
});
|
|
107
|
+
if (result.exitCode !== 0) {
|
|
108
|
+
throw new Error(`Falha no reset soft: ${result.output}`);
|
|
109
|
+
}
|
|
110
|
+
return {
|
|
111
|
+
success: true,
|
|
112
|
+
action: 'soft',
|
|
113
|
+
message: `Reset soft executado com sucesso para ${target}`,
|
|
114
|
+
data: {
|
|
115
|
+
target,
|
|
116
|
+
type: 'soft',
|
|
117
|
+
output: result.output
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
catch (error) {
|
|
122
|
+
throw new Error(`Falha ao executar reset soft: ${error instanceof Error ? error.message : String(error)}`);
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
async mixedReset(params) {
|
|
126
|
+
try {
|
|
127
|
+
const target = params.commit_hash || params.branch_name || 'HEAD~1';
|
|
128
|
+
const result = await (0, terminal_controller_js_1.runTerminalCmd)({
|
|
129
|
+
command: `cd "${params.projectPath}" && git reset --mixed ${target}`,
|
|
130
|
+
is_background: false,
|
|
131
|
+
explanation: 'Executando reset mixed'
|
|
132
|
+
});
|
|
133
|
+
if (result.exitCode !== 0) {
|
|
134
|
+
throw new Error(`Falha no reset mixed: ${result.output}`);
|
|
135
|
+
}
|
|
136
|
+
return {
|
|
137
|
+
success: true,
|
|
138
|
+
action: 'mixed',
|
|
139
|
+
message: `Reset mixed executado com sucesso para ${target}`,
|
|
140
|
+
data: {
|
|
141
|
+
target,
|
|
142
|
+
type: 'mixed',
|
|
143
|
+
output: result.output
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
throw new Error(`Falha ao executar reset mixed: ${error instanceof Error ? error.message : String(error)}`);
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
async hardReset(params) {
|
|
152
|
+
try {
|
|
153
|
+
const target = params.commit_hash || params.branch_name || 'HEAD~1';
|
|
154
|
+
const result = await (0, terminal_controller_js_1.runTerminalCmd)({
|
|
155
|
+
command: `cd "${params.projectPath}" && git reset --hard ${target}`,
|
|
156
|
+
is_background: false,
|
|
157
|
+
explanation: 'Executando reset hard'
|
|
158
|
+
});
|
|
159
|
+
if (result.exitCode !== 0) {
|
|
160
|
+
throw new Error(`Falha no reset hard: ${result.output}`);
|
|
161
|
+
}
|
|
162
|
+
return {
|
|
163
|
+
success: true,
|
|
164
|
+
action: 'hard',
|
|
165
|
+
message: `Reset hard executado com sucesso para ${target}`,
|
|
166
|
+
data: {
|
|
167
|
+
target,
|
|
168
|
+
type: 'hard',
|
|
169
|
+
output: result.output
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
catch (error) {
|
|
174
|
+
throw new Error(`Falha ao executar reset hard: ${error instanceof Error ? error.message : String(error)}`);
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
async resetToCommit(params) {
|
|
178
|
+
try {
|
|
179
|
+
if (!params.commit_hash) {
|
|
180
|
+
throw new Error('commit_hash é obrigatório para reset-to-commit');
|
|
181
|
+
}
|
|
182
|
+
const resetType = params.reset_type || 'mixed';
|
|
183
|
+
const result = await (0, terminal_controller_js_1.runTerminalCmd)({
|
|
184
|
+
command: `cd "${params.projectPath}" && git reset --${resetType} ${params.commit_hash}`,
|
|
185
|
+
is_background: false,
|
|
186
|
+
explanation: `Executando reset ${resetType} para commit`
|
|
187
|
+
});
|
|
188
|
+
if (result.exitCode !== 0) {
|
|
189
|
+
throw new Error(`Falha no reset para commit: ${result.output}`);
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
success: true,
|
|
193
|
+
action: 'reset-to-commit',
|
|
194
|
+
message: `Reset ${resetType} executado com sucesso para commit ${params.commit_hash}`,
|
|
195
|
+
data: {
|
|
196
|
+
commit_hash: params.commit_hash,
|
|
197
|
+
type: resetType,
|
|
198
|
+
output: result.output
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
throw new Error(`Falha ao executar reset para commit: ${error instanceof Error ? error.message : String(error)}`);
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
async resetBranch(params) {
|
|
207
|
+
try {
|
|
208
|
+
if (!params.target_branch) {
|
|
209
|
+
throw new Error('target_branch é obrigatório para reset-branch');
|
|
210
|
+
}
|
|
211
|
+
const resetType = params.reset_type || 'mixed';
|
|
212
|
+
const result = await (0, terminal_controller_js_1.runTerminalCmd)({
|
|
213
|
+
command: `cd "${params.projectPath}" && git reset --${resetType} ${params.target_branch}`,
|
|
214
|
+
is_background: false,
|
|
215
|
+
explanation: `Executando reset ${resetType} para branch`
|
|
216
|
+
});
|
|
217
|
+
if (result.exitCode !== 0) {
|
|
218
|
+
throw new Error(`Falha no reset para branch: ${result.output}`);
|
|
219
|
+
}
|
|
220
|
+
return {
|
|
221
|
+
success: true,
|
|
222
|
+
action: 'reset-branch',
|
|
223
|
+
message: `Reset ${resetType} executado com sucesso para branch ${params.target_branch}`,
|
|
224
|
+
data: {
|
|
225
|
+
target_branch: params.target_branch,
|
|
226
|
+
type: resetType,
|
|
227
|
+
output: result.output
|
|
228
|
+
}
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
catch (error) {
|
|
232
|
+
throw new Error(`Falha ao executar reset para branch: ${error instanceof Error ? error.message : String(error)}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
};
|
|
236
|
+
//# sourceMappingURL=git-reset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-reset.js","sourceRoot":"","sources":["../../src/tools/git-reset.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4EAAiE;AAEjE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IACnC,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAA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C;YAED,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE,cAAc;gBACtB,OAAO,EAAE,SAAS,SAAS,sCAAsC,MAAM,CAAC,aAAa,EAAE;gBACvF,IAAI,EAAE;oBACJ,aAAa,EAAE,MAAM,CAAC,aAAa;oBACnC,IAAI,EAAE,SAAS;oBACf,MAAM,EAAE,MAAM,CAAC,MAAM;iBACtB;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,wCAAwC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACpH,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Tool: git-revert
|
|
4
|
+
*
|
|
5
|
+
* DESCRIÇÃO:
|
|
6
|
+
* Gerenciamento de revert Git (GitHub + Gitea) com múltiplas ações
|
|
7
|
+
*
|
|
8
|
+
* FUNCIONALIDADES:
|
|
9
|
+
* - Reverter commit específico
|
|
10
|
+
* - Reverter merge commit
|
|
11
|
+
* - Reverter range de commits
|
|
12
|
+
* - Reverter com mensagem customizada
|
|
13
|
+
* - Reverter sem commit automático
|
|
14
|
+
*
|
|
15
|
+
* USO:
|
|
16
|
+
* - Para desfazer commits de forma segura
|
|
17
|
+
* - Para reverter mudanças em branches compartilhadas
|
|
18
|
+
* - Para criar commits de reversão
|
|
19
|
+
* - Para manter histórico limpo
|
|
20
|
+
*
|
|
21
|
+
* RECOMENDAÇÕES:
|
|
22
|
+
* - Use revert em vez de reset para branches compartilhadas
|
|
23
|
+
* - Teste reversões em branches locais primeiro
|
|
24
|
+
* - Documente motivos da reversão
|
|
25
|
+
*/
|
|
26
|
+
declare const GitRevertInputSchema: z.ZodObject<{
|
|
27
|
+
action: z.ZodEnum<["revert-commit", "revert-merge", "revert-range"]>;
|
|
28
|
+
owner: z.ZodString;
|
|
29
|
+
repo: z.ZodString;
|
|
30
|
+
provider: z.ZodEnum<["gitea", "github"]>;
|
|
31
|
+
projectPath: z.ZodString;
|
|
32
|
+
commit_hash: z.ZodOptional<z.ZodString>;
|
|
33
|
+
message: z.ZodOptional<z.ZodString>;
|
|
34
|
+
no_commit: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
merge_commit_hash: z.ZodOptional<z.ZodString>;
|
|
36
|
+
mainline: z.ZodOptional<z.ZodNumber>;
|
|
37
|
+
commit_range: z.ZodOptional<z.ZodString>;
|
|
38
|
+
strategy: z.ZodOptional<z.ZodEnum<["ours", "theirs"]>>;
|
|
39
|
+
}, "strip", z.ZodTypeAny, {
|
|
40
|
+
provider: "gitea" | "github";
|
|
41
|
+
owner: string;
|
|
42
|
+
repo: string;
|
|
43
|
+
action: "revert-commit" | "revert-merge" | "revert-range";
|
|
44
|
+
projectPath: string;
|
|
45
|
+
message?: string | undefined;
|
|
46
|
+
commit_range?: string | undefined;
|
|
47
|
+
commit_hash?: string | undefined;
|
|
48
|
+
no_commit?: boolean | undefined;
|
|
49
|
+
merge_commit_hash?: string | undefined;
|
|
50
|
+
mainline?: number | undefined;
|
|
51
|
+
strategy?: "ours" | "theirs" | undefined;
|
|
52
|
+
}, {
|
|
53
|
+
provider: "gitea" | "github";
|
|
54
|
+
owner: string;
|
|
55
|
+
repo: string;
|
|
56
|
+
action: "revert-commit" | "revert-merge" | "revert-range";
|
|
57
|
+
projectPath: string;
|
|
58
|
+
message?: string | undefined;
|
|
59
|
+
commit_range?: string | undefined;
|
|
60
|
+
commit_hash?: string | undefined;
|
|
61
|
+
no_commit?: boolean | undefined;
|
|
62
|
+
merge_commit_hash?: string | undefined;
|
|
63
|
+
mainline?: number | undefined;
|
|
64
|
+
strategy?: "ours" | "theirs" | undefined;
|
|
65
|
+
}>;
|
|
66
|
+
export type GitRevertInput = z.infer<typeof GitRevertInputSchema>;
|
|
67
|
+
declare const GitRevertResultSchema: z.ZodObject<{
|
|
68
|
+
success: z.ZodBoolean;
|
|
69
|
+
action: z.ZodString;
|
|
70
|
+
message: z.ZodString;
|
|
71
|
+
data: z.ZodOptional<z.ZodAny>;
|
|
72
|
+
error: z.ZodOptional<z.ZodString>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
message: string;
|
|
75
|
+
action: string;
|
|
76
|
+
success: boolean;
|
|
77
|
+
error?: string | undefined;
|
|
78
|
+
data?: any;
|
|
79
|
+
}, {
|
|
80
|
+
message: string;
|
|
81
|
+
action: string;
|
|
82
|
+
success: boolean;
|
|
83
|
+
error?: string | undefined;
|
|
84
|
+
data?: any;
|
|
85
|
+
}>;
|
|
86
|
+
export type GitRevertResult = z.infer<typeof GitRevertResultSchema>;
|
|
87
|
+
export declare const gitRevertTool: {
|
|
88
|
+
name: string;
|
|
89
|
+
description: string;
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: string;
|
|
92
|
+
properties: {
|
|
93
|
+
action: {
|
|
94
|
+
type: string;
|
|
95
|
+
enum: string[];
|
|
96
|
+
description: string;
|
|
97
|
+
};
|
|
98
|
+
owner: {
|
|
99
|
+
type: string;
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
repo: {
|
|
103
|
+
type: string;
|
|
104
|
+
description: string;
|
|
105
|
+
};
|
|
106
|
+
provider: {
|
|
107
|
+
type: string;
|
|
108
|
+
enum: string[];
|
|
109
|
+
description: string;
|
|
110
|
+
};
|
|
111
|
+
projectPath: {
|
|
112
|
+
type: string;
|
|
113
|
+
description: string;
|
|
114
|
+
};
|
|
115
|
+
commit_hash: {
|
|
116
|
+
type: string;
|
|
117
|
+
description: string;
|
|
118
|
+
};
|
|
119
|
+
message: {
|
|
120
|
+
type: string;
|
|
121
|
+
description: string;
|
|
122
|
+
};
|
|
123
|
+
no_commit: {
|
|
124
|
+
type: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
127
|
+
merge_commit_hash: {
|
|
128
|
+
type: string;
|
|
129
|
+
description: string;
|
|
130
|
+
};
|
|
131
|
+
mainline: {
|
|
132
|
+
type: string;
|
|
133
|
+
description: string;
|
|
134
|
+
};
|
|
135
|
+
commit_range: {
|
|
136
|
+
type: string;
|
|
137
|
+
description: string;
|
|
138
|
+
};
|
|
139
|
+
strategy: {
|
|
140
|
+
type: string;
|
|
141
|
+
enum: string[];
|
|
142
|
+
description: string;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
required: string[];
|
|
146
|
+
};
|
|
147
|
+
handler(input: GitRevertInput): Promise<GitRevertResult>;
|
|
148
|
+
revertCommit(params: GitRevertInput): Promise<GitRevertResult>;
|
|
149
|
+
revertMerge(params: GitRevertInput): Promise<GitRevertResult>;
|
|
150
|
+
revertRange(params: GitRevertInput): Promise<GitRevertResult>;
|
|
151
|
+
};
|
|
152
|
+
export {};
|
|
153
|
+
//# sourceMappingURL=git-revert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-revert.d.ts","sourceRoot":"","sources":["../../src/tools/git-revert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBxB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE,QAAA,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAMzB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBA0BH,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;yBAwBnC,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;wBA0C1C,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;wBA0CzC,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC;CAyCpE,CAAC"}
|