@andrebuzeli/git-mcp 3.0.1 → 3.1.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.
Files changed (61) hide show
  1. package/README.md +329 -356
  2. package/dist/server.d.ts.map +1 -1
  3. package/dist/server.js +83 -82
  4. package/dist/server.js.map +1 -1
  5. package/dist/tools/git-branches.d.ts +359 -125
  6. package/dist/tools/git-branches.d.ts.map +1 -1
  7. package/dist/tools/git-branches.js +530 -179
  8. package/dist/tools/git-branches.js.map +1 -1
  9. package/dist/tools/git-commits.d.ts +2 -2
  10. package/dist/tools/git-config.d.ts +2 -2
  11. package/dist/tools/git-files.d.ts +406 -246
  12. package/dist/tools/git-files.d.ts.map +1 -1
  13. package/dist/tools/git-files.js +499 -556
  14. package/dist/tools/git-files.js.map +1 -1
  15. package/dist/tools/git-issues.d.ts +10 -10
  16. package/dist/tools/git-packages.d.ts +2 -2
  17. package/dist/tools/git-projects.d.ts +57 -142
  18. package/dist/tools/git-projects.d.ts.map +1 -1
  19. package/dist/tools/git-projects.js +283 -281
  20. package/dist/tools/git-projects.js.map +1 -1
  21. package/dist/tools/git-publish.d.ts +327 -0
  22. package/dist/tools/git-publish.d.ts.map +1 -0
  23. package/dist/tools/git-publish.js +632 -0
  24. package/dist/tools/git-publish.js.map +1 -0
  25. package/dist/tools/git-pulls.d.ts +16 -16
  26. package/dist/tools/git-releases.d.ts +401 -131
  27. package/dist/tools/git-releases.d.ts.map +1 -1
  28. package/dist/tools/git-releases.js +469 -374
  29. package/dist/tools/git-releases.js.map +1 -1
  30. package/dist/tools/git-remote.d.ts +4 -4
  31. package/dist/tools/git-repositories.d.ts +8 -8
  32. package/dist/tools/git-reset.d.ts +65 -106
  33. package/dist/tools/git-reset.d.ts.map +1 -1
  34. package/dist/tools/git-reset.js +149 -265
  35. package/dist/tools/git-reset.js.map +1 -1
  36. package/dist/tools/git-stash.d.ts +68 -110
  37. package/dist/tools/git-stash.d.ts.map +1 -1
  38. package/dist/tools/git-stash.js +186 -311
  39. package/dist/tools/git-stash.js.map +1 -1
  40. package/dist/tools/git-sync.d.ts +80 -149
  41. package/dist/tools/git-sync.d.ts.map +1 -1
  42. package/dist/tools/git-sync.js +246 -346
  43. package/dist/tools/git-sync.js.map +1 -1
  44. package/dist/tools/git-tags.d.ts +2 -2
  45. package/dist/tools/git-update-project.d.ts +159 -4
  46. package/dist/tools/git-update-project.d.ts.map +1 -1
  47. package/dist/tools/git-update-project.js +349 -7
  48. package/dist/tools/git-update-project.js.map +1 -1
  49. package/dist/tools/git-workflow.d.ts +259 -200
  50. package/dist/tools/git-workflow.d.ts.map +1 -1
  51. package/dist/tools/git-workflow.js +498 -424
  52. package/dist/tools/git-workflow.js.map +1 -1
  53. package/package.json +14 -5
  54. package/dist/tools/git-undo.d.ts +0 -268
  55. package/dist/tools/git-undo.d.ts.map +0 -1
  56. package/dist/tools/git-undo.js +0 -516
  57. package/dist/tools/git-undo.js.map +0 -1
  58. package/dist/tools/git-versioning.d.ts +0 -286
  59. package/dist/tools/git-versioning.d.ts.map +0 -1
  60. package/dist/tools/git-versioning.js +0 -483
  61. package/dist/tools/git-versioning.js.map +0 -1
@@ -2,338 +2,222 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.gitResetTool = void 0;
4
4
  const zod_1 = require("zod");
5
- const git_operations_js_1 = require("../utils/git-operations.js");
5
+ const terminal_controller_js_1 = require("../utils/terminal-controller.js");
6
6
  /**
7
7
  * Tool: git-reset
8
8
  *
9
- * RESET DE COMMITS - Com safe preview
10
- * Funcionalidades seguras de reset com preview e confirmação
9
+ * DESCRIÇÃO:
10
+ * Gerenciamento de reset Git (GitHub + Gitea) com múltiplas ações
11
11
  *
12
- * DESIGNED FOR: Programador individual autônomo
13
- * PHILOSOPHY: Reset seguro com visualização prévia de perdas
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
14
29
  */
15
- const GitResetInputSchema = zod_1.z.discriminatedUnion('action', [
16
- zod_1.z.object({
17
- action: zod_1.z.literal('soft'),
18
- projectPath: zod_1.z.string(),
19
- to: zod_1.z.string().optional().default('HEAD~1'),
20
- confirm: zod_1.z.boolean().optional().default(false),
21
- preview: zod_1.z.boolean().optional().default(true)
22
- }),
23
- zod_1.z.object({
24
- action: zod_1.z.literal('mixed'),
25
- projectPath: zod_1.z.string(),
26
- to: zod_1.z.string().optional().default('HEAD~1'),
27
- confirm: zod_1.z.boolean().optional().default(false),
28
- preview: zod_1.z.boolean().optional().default(true)
29
- }),
30
- zod_1.z.object({
31
- action: zod_1.z.literal('hard'),
32
- projectPath: zod_1.z.string(),
33
- to: zod_1.z.string().optional().default('HEAD~1'),
34
- confirm: zod_1.z.boolean().optional().default(false),
35
- preview: zod_1.z.boolean().optional().default(true)
36
- }),
37
- zod_1.z.object({
38
- action: zod_1.z.literal('preview'),
39
- projectPath: zod_1.z.string(),
40
- to: zod_1.z.string().optional().default('HEAD~1'),
41
- mode: zod_1.z.enum(['soft', 'mixed', 'hard']).optional().default('mixed')
42
- }),
43
- zod_1.z.object({
44
- action: zod_1.z.literal('undo-last-reset'),
45
- projectPath: zod_1.z.string(),
46
- confirm: zod_1.z.boolean().optional().default(false)
47
- })
48
- ]);
30
+ const GitResetInputSchema = zod_1.z.object({
31
+ action: zod_1.z.enum(['soft', 'mixed', 'hard', 'reset-to-commit', 'reset-branch']),
32
+ // owner: obtido automaticamente do provider,
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
+ });
49
43
  const GitResetResultSchema = zod_1.z.object({
50
44
  success: zod_1.z.boolean(),
51
45
  action: zod_1.z.string(),
52
46
  message: zod_1.z.string(),
53
47
  data: zod_1.z.any().optional(),
54
- error: zod_1.z.string().optional(),
55
- recoverable: zod_1.z.boolean().optional(),
56
- suggestion: zod_1.z.string().optional(),
57
- warning: zod_1.z.string().optional()
48
+ error: zod_1.z.string().optional()
58
49
  });
59
- /**
60
- * Safe Reset Manager - Preview e segurança para operações de reset
61
- */
62
- class SafeResetManager {
63
- static async getResetPreview(projectPath, to, mode) {
64
- const gitOps = new git_operations_js_1.GitOperations(projectPath);
65
- try {
66
- // Get commits that will be affected
67
- const logResult = await gitOps.log({ maxCount: 10, oneline: true });
68
- const commits = logResult.output.trim().split('\n').filter(line => line.trim());
69
- // Get status of working directory
70
- const statusResult = await gitOps.status();
71
- const status = statusResult.output;
72
- // Simulate what would be lost based on mode
73
- const losses = {
74
- soft: 'No files will be lost (changes stay in staging)',
75
- mixed: 'Staged changes will be unstaged',
76
- hard: 'ALL uncommitted changes will be permanently lost'
77
- };
78
- return {
79
- target: to,
80
- mode,
81
- affectedCommits: commits.length,
82
- currentStatus: status,
83
- whatWillBeLost: losses[mode],
84
- risk: mode === 'hard' ? 'HIGH' : mode === 'mixed' ? 'MEDIUM' : 'LOW'
85
- };
86
- }
87
- catch (error) {
88
- return {
89
- target: to,
90
- mode,
91
- error: 'Could not generate preview',
92
- risk: 'UNKNOWN'
93
- };
94
- }
95
- }
96
- static async canUndoReset(projectPath) {
97
- // Check if there are stashed changes from before the reset
98
- const gitOps = new git_operations_js_1.GitOperations(projectPath);
99
- try {
100
- const stashResult = await gitOps.stash('list');
101
- return stashResult.success && stashResult.output.trim().length > 0;
102
- }
103
- catch (error) {
104
- return false;
105
- }
106
- }
107
- static async validateResetTarget(projectPath, to) {
108
- const gitOps = new git_operations_js_1.GitOperations(projectPath);
109
- try {
110
- // Try to resolve the target
111
- const showResult = await gitOps.runCommand('git', ['rev-parse', '--verify', to]);
112
- return { valid: showResult.success };
113
- }
114
- catch (error) {
115
- return {
116
- valid: false,
117
- message: `${to} is not a valid reset target`
118
- };
119
- }
120
- }
121
- }
122
- /**
123
- * Enhanced Error Handler for Reset
124
- */
125
- class ResetErrorHandler {
126
- static handleError(error, context) {
127
- const errorMessage = error instanceof Error ? error.message : String(error);
128
- const errorPatterns = [
129
- {
130
- pattern: /unknown revision/i,
131
- suggestion: "Check the commit hash or reference",
132
- recoverable: true
133
- },
134
- {
135
- pattern: /cannot reset/i,
136
- suggestion: "Check repository state and target commit",
137
- recoverable: true
138
- },
139
- {
140
- pattern: /uncommitted changes/i,
141
- suggestion: "Stash changes before reset or use --hard",
142
- recoverable: true
143
- }
144
- ];
145
- const matchedPattern = errorPatterns.find(p => p.pattern.test(errorMessage));
146
- return {
147
- success: false,
148
- action: context,
149
- message: `Error in ${context}: ${errorMessage}`,
150
- error: errorMessage,
151
- recoverable: matchedPattern?.recoverable || false,
152
- suggestion: matchedPattern?.suggestion
153
- };
154
- }
155
- }
156
50
  exports.gitResetTool = {
157
51
  name: 'git-reset',
158
- description: `🔄 RESET DE COMMITS - Com safe preview
159
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
160
- 🔄 RESET OPERATIONS:
161
- • soft: Desfazer commit mantendo mudanças staged
162
- • mixed: Desfazer commit removendo do stage
163
- • hard: Desfazer commit perdendo mudanças (PERIGOSO)
164
-
165
- 👁️ SAFETY FEATURES:
166
- • preview: Visualizar o que será perdido antes
167
- • confirm: Confirmação obrigatória para operações perigosas
168
- • validate: Validação do target antes da operação
169
-
170
- 🔧 ADVANCED OPERATIONS:
171
- • undo-last-reset: Tentar desfazer último reset (se stash existir)
172
-
173
- ⚠️ RISK LEVELS:
174
- • LOW: soft reset (nada perdido)
175
- • MEDIUM: mixed reset (changes unstaged)
176
- • HIGH: hard reset (changes lost forever)
177
-
178
- 🛡️ SAFE BY DEFAULT:
179
- • Preview automático antes de operações destrutivas
180
- • Confirmação obrigatória para hard reset
181
- • Sugestões de recovery para erros`,
52
+ description: 'tool: Gerencia operações Git reset para desfazer mudanças\n──────────────\naction soft: reset soft mantém mudanças no staging\naction soft requires: repo, commit_hash, provider, projectPath\n───────────────\naction mixed: reset mixed limpa staging area\naction mixed requires: repo, commit_hash, provider, projectPath\n───────────────\naction hard: reset hard remove todas as mudanças\naction hard requires: repo, commit_hash, provider, projectPath\n───────────────\naction reset-to-commit: reseta para commit específico\naction reset-to-commit requires: repo, commit_hash, reset_type, provider, projectPath\n───────────────\naction reset-branch: reseta branch específica\naction reset-branch requires: repo, branch_name, target_branch, provider, projectPath',
182
53
  inputSchema: {
183
54
  type: 'object',
184
55
  properties: {
185
56
  action: {
186
57
  type: 'string',
187
- enum: ['soft', 'mixed', 'hard', 'preview', 'undo-last-reset'],
188
- description: 'Reset action to perform'
58
+ enum: ['soft', 'mixed', 'hard', 'reset-to-commit', 'reset-branch'],
59
+ description: 'Action to perform on reset'
189
60
  },
190
- projectPath: { type: 'string', description: 'Local project path' },
191
- to: { type: 'string', description: 'Reset target (commit hash, HEAD~1, etc.)', default: 'HEAD~1' },
192
- confirm: { type: 'boolean', description: 'Confirm destructive operation', default: false },
193
- preview: { type: 'boolean', description: 'Show preview before reset', default: true },
194
- mode: { type: 'string', enum: ['soft', 'mixed', 'hard'], description: 'Reset mode for preview', default: 'mixed' }
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' }
195
69
  },
196
- required: ['action', 'projectPath']
70
+ required: ['action', 'repo', 'provider', 'projectPath']
197
71
  },
198
72
  async handler(input) {
199
73
  try {
200
74
  const validatedInput = GitResetInputSchema.parse(input);
201
75
  switch (validatedInput.action) {
202
76
  case 'soft':
203
- return await this.handleReset(validatedInput, 'soft');
77
+ return await this.softReset(validatedInput);
204
78
  case 'mixed':
205
- return await this.handleReset(validatedInput, 'mixed');
79
+ return await this.mixedReset(validatedInput);
206
80
  case 'hard':
207
- return await this.handleReset(validatedInput, 'hard');
208
- case 'preview':
209
- return await this.handlePreview(validatedInput);
210
- case 'undo-last-reset':
211
- return await this.handleUndoLastReset(validatedInput);
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);
212
86
  default:
213
- throw new Error(`Action '${validatedInput.action}' not supported`);
87
+ throw new Error(`Ação não suportada: ${validatedInput.action}`);
214
88
  }
215
89
  }
216
90
  catch (error) {
217
- return ResetErrorHandler.handleError(error, `reset.${input.action}`);
218
- }
219
- },
220
- async handleReset(params, mode) {
221
- const { projectPath, to, confirm, preview } = params;
222
- // Validate target
223
- const targetValidation = await SafeResetManager.validateResetTarget(projectPath, to);
224
- if (!targetValidation.valid) {
225
91
  return {
226
92
  success: false,
227
- action: mode,
228
- message: `Invalid reset target: ${to}`,
229
- suggestion: targetValidation.message || 'Use a valid commit hash or reference',
230
- recoverable: true
93
+ action: input.action,
94
+ message: 'Erro na operação de reset',
95
+ error: error instanceof Error ? error.message : String(error)
231
96
  };
232
97
  }
233
- // Show preview if requested
234
- if (preview) {
235
- const previewData = await SafeResetManager.getResetPreview(projectPath, to, mode);
236
- if (!confirm && (mode === 'hard' || previewData.risk === 'HIGH')) {
237
- return {
238
- success: false,
239
- action: mode,
240
- message: `Reset ${mode} requires confirmation - HIGH RISK`,
241
- data: previewData,
242
- suggestion: 'Review preview and set confirm=true to proceed',
243
- recoverable: true
244
- };
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.runGitCommand)(`reset --soft ${target}`, params.projectPath, 'Executando reset soft');
103
+ if (result.exitCode !== 0) {
104
+ throw new Error(`Falha no reset soft: ${result.output}`);
245
105
  }
246
- }
247
- // Additional confirmation for hard reset
248
- if (mode === 'hard' && !confirm) {
249
- const previewData = await SafeResetManager.getResetPreview(projectPath, to, mode);
250
106
  return {
251
- success: false,
252
- action: 'hard',
253
- message: 'HARD RESET REQUIRES EXPLICIT CONFIRMATION',
254
- data: previewData,
255
- suggestion: 'Set confirm=true only if you understand ALL changes will be permanently lost',
256
- recoverable: true,
257
- warning: 'This operation cannot be undone!'
107
+ success: true,
108
+ action: 'soft',
109
+ message: `Reset soft executado com sucesso para ${target}`,
110
+ data: {
111
+ target,
112
+ type: 'soft',
113
+ output: result.output
114
+ }
258
115
  };
259
116
  }
260
- const gitOps = new git_operations_js_1.GitOperations(projectPath);
117
+ catch (error) {
118
+ throw new Error(`Falha ao executar reset soft: ${error instanceof Error ? error.message : String(error)}`);
119
+ }
120
+ },
121
+ async mixedReset(params) {
261
122
  try {
262
- const resetResult = await gitOps.reset(to, { mode });
263
- if (!resetResult.success) {
264
- throw new Error(`Reset ${mode} failed: ${resetResult.error}`);
123
+ const target = params.commit_hash || params.branch_name || 'HEAD~1';
124
+ const result = await (0, terminal_controller_js_1.runGitCommand)(`reset --mixed ${target}`, params.projectPath, 'Executando reset mixed');
125
+ if (result.exitCode !== 0) {
126
+ throw new Error(`Falha no reset mixed: ${result.output}`);
265
127
  }
266
- const riskLevel = mode === 'hard' ? 'HIGH' : mode === 'mixed' ? 'MEDIUM' : 'LOW';
267
- const warnings = {
268
- hard: 'All uncommitted changes permanently lost',
269
- mixed: 'Changes unstaged but recoverable',
270
- soft: 'Changes kept in staging area'
271
- };
272
128
  return {
273
129
  success: true,
274
- action: mode,
275
- message: `Reset ${mode} completed successfully`,
276
- data: { target: to, mode, riskLevel },
277
- warning: warnings[mode]
130
+ action: 'mixed',
131
+ message: `Reset mixed executado com sucesso para ${target}`,
132
+ data: {
133
+ target,
134
+ type: 'mixed',
135
+ output: result.output
136
+ }
278
137
  };
279
138
  }
280
139
  catch (error) {
281
- return ResetErrorHandler.handleError(error, mode);
140
+ throw new Error(`Falha ao executar reset mixed: ${error instanceof Error ? error.message : String(error)}`);
282
141
  }
283
142
  },
284
- async handlePreview(params) {
285
- const { projectPath, to, mode } = params;
143
+ async hardReset(params) {
286
144
  try {
287
- const previewData = await SafeResetManager.getResetPreview(projectPath, to, mode);
145
+ const target = params.commit_hash || params.branch_name || 'HEAD~1';
146
+ const result = await (0, terminal_controller_js_1.runGitCommand)(`reset --hard ${target}`, params.projectPath, 'Executando reset hard');
147
+ if (result.exitCode !== 0) {
148
+ throw new Error(`Falha no reset hard: ${result.output}`);
149
+ }
288
150
  return {
289
151
  success: true,
290
- action: 'preview',
291
- message: `Reset preview for ${mode} to ${to}`,
292
- data: previewData
152
+ action: 'hard',
153
+ message: `Reset hard executado com sucesso para ${target}`,
154
+ data: {
155
+ target,
156
+ type: 'hard',
157
+ output: result.output
158
+ }
293
159
  };
294
160
  }
295
161
  catch (error) {
296
- return ResetErrorHandler.handleError(error, 'preview');
162
+ throw new Error(`Falha ao executar reset hard: ${error instanceof Error ? error.message : String(error)}`);
297
163
  }
298
164
  },
299
- async handleUndoLastReset(params) {
300
- const { projectPath, confirm } = params;
301
- if (!confirm) {
302
- const canUndo = await SafeResetManager.canUndoReset(projectPath);
165
+ async resetToCommit(params) {
166
+ try {
167
+ if (!params.commit_hash) {
168
+ throw new Error('commit_hash é obrigatório para reset-to-commit');
169
+ }
170
+ const resetType = params.reset_type || 'mixed';
171
+ const result = await (0, terminal_controller_js_1.runTerminalCmd)({
172
+ command: `cd "${params.projectPath}" && git reset --${resetType} ${params.commit_hash}`,
173
+ is_background: false,
174
+ explanation: `Executando reset ${resetType} para commit`
175
+ });
176
+ if (result.exitCode !== 0) {
177
+ throw new Error(`Falha no reset para commit: ${result.output}`);
178
+ }
303
179
  return {
304
- success: false,
305
- action: 'undo-last-reset',
306
- message: 'Undo reset requires confirmation',
307
- data: { canUndo },
308
- suggestion: canUndo ?
309
- 'Set confirm=true to attempt undoing the last reset' :
310
- 'No stashed changes available to undo reset',
311
- recoverable: canUndo
180
+ success: true,
181
+ action: 'reset-to-commit',
182
+ message: `Reset ${resetType} executado com sucesso para commit ${params.commit_hash}`,
183
+ data: {
184
+ commit_hash: params.commit_hash,
185
+ type: resetType,
186
+ output: result.output
187
+ }
312
188
  };
313
189
  }
314
- const gitOps = new git_operations_js_1.GitOperations(projectPath);
190
+ catch (error) {
191
+ throw new Error(`Falha ao executar reset para commit: ${error instanceof Error ? error.message : String(error)}`);
192
+ }
193
+ },
194
+ async resetBranch(params) {
315
195
  try {
316
- // Try to apply the most recent stash (assuming it was created before reset)
317
- const stashResult = await gitOps.stash('apply', { index: 0 });
318
- if (!stashResult.success) {
319
- return {
320
- success: false,
321
- action: 'undo-last-reset',
322
- message: 'Could not undo last reset',
323
- suggestion: 'No suitable stash found or stash apply failed',
324
- recoverable: false
325
- };
196
+ if (!params.target_branch) {
197
+ throw new Error('target_branch é obrigatório para reset-branch');
198
+ }
199
+ const resetType = params.reset_type || 'mixed';
200
+ const result = await (0, terminal_controller_js_1.runTerminalCmd)({
201
+ command: `cd "${params.projectPath}" && git reset --${resetType} ${params.target_branch}`,
202
+ is_background: false,
203
+ explanation: `Executando reset ${resetType} para branch`
204
+ });
205
+ if (result.exitCode !== 0) {
206
+ throw new Error(`Falha no reset para branch: ${result.output}`);
326
207
  }
327
208
  return {
328
209
  success: true,
329
- action: 'undo-last-reset',
330
- message: 'Last reset undone successfully',
331
- data: { stashApplied: 0 },
332
- warning: 'Changes from before reset have been restored'
210
+ action: 'reset-branch',
211
+ message: `Reset ${resetType} executado com sucesso para branch ${params.target_branch}`,
212
+ data: {
213
+ target_branch: params.target_branch,
214
+ type: resetType,
215
+ output: result.output
216
+ }
333
217
  };
334
218
  }
335
219
  catch (error) {
336
- return ResetErrorHandler.handleError(error, 'undo-last-reset');
220
+ throw new Error(`Falha ao executar reset para branch: ${error instanceof Error ? error.message : String(error)}`);
337
221
  }
338
222
  }
339
223
  };
@@ -1 +1 @@
1
- {"version":3,"file":"git-reset.js","sourceRoot":"","sources":["../../src/tools/git-reset.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,kEAA2D;AAE3D;;;;;;;;GAQG;AAEH,MAAM,mBAAmB,GAAG,OAAC,CAAC,kBAAkB,CAAC,QAAQ,EAAE;IACzD,OAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,MAAM,CAAC;QACzB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;QACvB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;QAC3C,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;QAC9C,OAAO,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;KAC9C,CAAC;IAEF,OAAC,CAAC,MAAM,CAAC;QACP,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,OAAO,CAAC;QAC1B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;QACvB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,Q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