@andrebuzeli/git-mcp 3.4.0 → 4.0.2
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 +63 -283
- package/dist/providers/base-provider.d.ts.map +1 -1
- package/dist/providers/base-provider.js +3 -26
- package/dist/providers/base-provider.js.map +1 -1
- package/dist/providers/gitea-provider.d.ts +0 -2
- package/dist/providers/gitea-provider.d.ts.map +1 -1
- package/dist/providers/gitea-provider.js +0 -62
- package/dist/providers/gitea-provider.js.map +1 -1
- package/dist/providers/github-provider.d.ts +0 -2
- package/dist/providers/github-provider.d.ts.map +1 -1
- package/dist/providers/github-provider.js +48 -105
- package/dist/providers/github-provider.js.map +1 -1
- package/dist/server.d.ts +0 -27
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +130 -1215
- package/dist/server.js.map +1 -1
- package/dist/tools/{git-commits.d.ts → git-analytics.d.ts} +4 -10
- package/dist/tools/git-analytics.d.ts.map +1 -0
- package/dist/tools/git-analytics.js +18 -0
- package/dist/tools/git-analytics.js.map +1 -0
- package/dist/tools/git-archive.d.ts +3 -0
- package/dist/tools/git-archive.d.ts.map +1 -1
- package/dist/tools/git-archive.js +2 -2
- package/dist/tools/git-archive.js.map +1 -1
- package/dist/tools/git-backup.d.ts +216 -0
- package/dist/tools/git-backup.d.ts.map +1 -0
- package/dist/tools/git-backup.js +813 -0
- package/dist/tools/git-backup.js.map +1 -0
- package/dist/tools/git-branches.d.ts +159 -8
- package/dist/tools/git-branches.d.ts.map +1 -1
- package/dist/tools/git-branches.js +554 -2
- package/dist/tools/git-branches.js.map +1 -1
- package/dist/tools/git-config.d.ts +3 -0
- package/dist/tools/git-config.d.ts.map +1 -1
- package/dist/tools/git-config.js +2 -2
- package/dist/tools/git-config.js.map +1 -1
- package/dist/tools/git-files.d.ts +130 -8
- package/dist/tools/git-files.d.ts.map +1 -1
- package/dist/tools/git-files.js +426 -2
- package/dist/tools/git-files.js.map +1 -1
- package/dist/tools/git-issues.d.ts +137 -471
- package/dist/tools/git-issues.d.ts.map +1 -1
- package/dist/tools/git-issues.js +605 -613
- package/dist/tools/git-issues.js.map +1 -1
- package/dist/tools/git-monitor.d.ts +161 -0
- package/dist/tools/git-monitor.d.ts.map +1 -0
- package/dist/tools/git-monitor.js +746 -0
- package/dist/tools/git-monitor.js.map +1 -0
- package/dist/tools/git-packages.d.ts +5 -2
- package/dist/tools/git-packages.d.ts.map +1 -1
- package/dist/tools/git-packages.js +3 -3
- package/dist/tools/git-packages.js.map +1 -1
- package/dist/tools/git-pulls.d.ts +38 -646
- package/dist/tools/git-pulls.d.ts.map +1 -1
- package/dist/tools/git-pulls.js +64 -716
- package/dist/tools/git-pulls.js.map +1 -1
- package/dist/tools/git-release.d.ts +187 -0
- package/dist/tools/git-release.d.ts.map +1 -0
- package/dist/tools/git-release.js +619 -0
- package/dist/tools/git-release.js.map +1 -0
- package/dist/tools/git-remote.d.ts +112 -77
- package/dist/tools/git-remote.d.ts.map +1 -1
- package/dist/tools/git-remote.js +481 -183
- package/dist/tools/git-remote.js.map +1 -1
- package/dist/tools/git-repos.d.ts +19 -0
- package/dist/tools/git-repos.d.ts.map +1 -0
- package/dist/tools/git-repos.js +18 -0
- package/dist/tools/git-repos.js.map +1 -0
- package/dist/tools/git-reset.d.ts +121 -74
- package/dist/tools/git-reset.d.ts.map +1 -1
- package/dist/tools/git-reset.js +540 -159
- package/dist/tools/git-reset.js.map +1 -1
- package/dist/tools/git-stash.d.ts +119 -78
- package/dist/tools/git-stash.d.ts.map +1 -1
- package/dist/tools/git-stash.js +560 -209
- package/dist/tools/git-stash.js.map +1 -1
- package/dist/tools/git-sync.d.ts +3 -163
- package/dist/tools/git-sync.d.ts.map +1 -1
- package/dist/tools/git-sync.js +9 -326
- package/dist/tools/git-sync.js.map +1 -1
- package/dist/tools/git-tags.d.ts +105 -331
- package/dist/tools/git-tags.d.ts.map +1 -1
- package/dist/tools/git-tags.js +545 -416
- package/dist/tools/git-tags.js.map +1 -1
- package/dist/tools/git-workflow.d.ts +127 -0
- package/dist/tools/git-workflow.d.ts.map +1 -0
- package/dist/tools/git-workflow.js +359 -0
- package/dist/tools/git-workflow.js.map +1 -0
- package/dist/utils/auto-detection.d.ts +113 -0
- package/dist/utils/auto-detection.d.ts.map +1 -0
- package/dist/utils/auto-detection.js +235 -0
- package/dist/utils/auto-detection.js.map +1 -0
- package/dist/utils/error-handler.d.ts +107 -0
- package/dist/utils/error-handler.d.ts.map +1 -0
- package/dist/utils/error-handler.js +331 -0
- package/dist/utils/error-handler.js.map +1 -0
- package/dist/utils/git-operations.d.ts.map +1 -1
- package/dist/utils/git-operations.js +6 -51
- package/dist/utils/git-operations.js.map +1 -1
- package/dist/utils/user-detection.d.ts +1 -13
- package/dist/utils/user-detection.d.ts.map +1 -1
- package/dist/utils/user-detection.js +1 -26
- package/dist/utils/user-detection.js.map +1 -1
- package/package.json +60 -60
- package/dist/client.d.ts +0 -307
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -299
- package/dist/client.js.map +0 -1
- package/dist/tools/git-branch-protection.d.ts +0 -97
- package/dist/tools/git-branch-protection.d.ts.map +0 -1
- package/dist/tools/git-branch-protection.js +0 -182
- package/dist/tools/git-branch-protection.js.map +0 -1
- package/dist/tools/git-commits.d.ts.map +0 -1
- package/dist/tools/git-commits.js +0 -5
- package/dist/tools/git-commits.js.map +0 -1
- package/dist/tools/git-initialize.d.ts +0 -208
- package/dist/tools/git-initialize.d.ts.map +0 -1
- package/dist/tools/git-initialize.js +0 -470
- package/dist/tools/git-initialize.js.map +0 -1
- package/dist/tools/git-projects.d.ts +0 -112
- package/dist/tools/git-projects.d.ts.map +0 -1
- package/dist/tools/git-projects.js +0 -319
- package/dist/tools/git-projects.js.map +0 -1
- package/dist/tools/git-releases.d.ts +0 -486
- package/dist/tools/git-releases.d.ts.map +0 -1
- package/dist/tools/git-releases.js +0 -561
- package/dist/tools/git-releases.js.map +0 -1
- package/dist/tools/git-repositories.d.ts +0 -469
- package/dist/tools/git-repositories.d.ts.map +0 -1
- package/dist/tools/git-repositories.js +0 -637
- package/dist/tools/git-repositories.js.map +0 -1
- package/dist/tools/git-revert.d.ts +0 -147
- package/dist/tools/git-revert.d.ts.map +0 -1
- package/dist/tools/git-revert.js +0 -199
- package/dist/tools/git-revert.js.map +0 -1
- package/dist/tools/git-update-project.d.ts +0 -309
- package/dist/tools/git-update-project.d.ts.map +0 -1
- package/dist/tools/git-update-project.js +0 -878
- package/dist/tools/git-update-project.js.map +0 -1
|
@@ -1,147 +0,0 @@
|
|
|
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
|
-
provider: z.ZodEnum<["gitea", "github"]>;
|
|
29
|
-
projectPath: z.ZodString;
|
|
30
|
-
commit_hash: z.ZodOptional<z.ZodString>;
|
|
31
|
-
message: z.ZodOptional<z.ZodString>;
|
|
32
|
-
no_commit: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
-
merge_commit_hash: z.ZodOptional<z.ZodString>;
|
|
34
|
-
mainline: z.ZodOptional<z.ZodNumber>;
|
|
35
|
-
commit_range: z.ZodOptional<z.ZodString>;
|
|
36
|
-
strategy: z.ZodOptional<z.ZodEnum<["ours", "theirs"]>>;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
provider: "gitea" | "github";
|
|
39
|
-
action: "revert-commit" | "revert-merge" | "revert-range";
|
|
40
|
-
projectPath: string;
|
|
41
|
-
message?: string | undefined;
|
|
42
|
-
commit_hash?: string | undefined;
|
|
43
|
-
no_commit?: boolean | undefined;
|
|
44
|
-
merge_commit_hash?: string | undefined;
|
|
45
|
-
mainline?: number | undefined;
|
|
46
|
-
commit_range?: string | undefined;
|
|
47
|
-
strategy?: "ours" | "theirs" | undefined;
|
|
48
|
-
}, {
|
|
49
|
-
provider: "gitea" | "github";
|
|
50
|
-
action: "revert-commit" | "revert-merge" | "revert-range";
|
|
51
|
-
projectPath: string;
|
|
52
|
-
message?: string | undefined;
|
|
53
|
-
commit_hash?: string | undefined;
|
|
54
|
-
no_commit?: boolean | undefined;
|
|
55
|
-
merge_commit_hash?: string | undefined;
|
|
56
|
-
mainline?: number | undefined;
|
|
57
|
-
commit_range?: string | undefined;
|
|
58
|
-
strategy?: "ours" | "theirs" | undefined;
|
|
59
|
-
}>;
|
|
60
|
-
export type GitRevertInput = z.infer<typeof GitRevertInputSchema>;
|
|
61
|
-
declare const GitRevertResultSchema: z.ZodObject<{
|
|
62
|
-
success: z.ZodBoolean;
|
|
63
|
-
action: z.ZodString;
|
|
64
|
-
message: z.ZodString;
|
|
65
|
-
data: z.ZodOptional<z.ZodAny>;
|
|
66
|
-
error: z.ZodOptional<z.ZodString>;
|
|
67
|
-
}, "strip", z.ZodTypeAny, {
|
|
68
|
-
message: string;
|
|
69
|
-
action: string;
|
|
70
|
-
success: boolean;
|
|
71
|
-
error?: string | undefined;
|
|
72
|
-
data?: any;
|
|
73
|
-
}, {
|
|
74
|
-
message: string;
|
|
75
|
-
action: string;
|
|
76
|
-
success: boolean;
|
|
77
|
-
error?: string | undefined;
|
|
78
|
-
data?: any;
|
|
79
|
-
}>;
|
|
80
|
-
export type GitRevertResult = z.infer<typeof GitRevertResultSchema>;
|
|
81
|
-
export declare const gitRevertTool: {
|
|
82
|
-
name: string;
|
|
83
|
-
description: string;
|
|
84
|
-
inputSchema: {
|
|
85
|
-
type: string;
|
|
86
|
-
properties: {
|
|
87
|
-
action: {
|
|
88
|
-
type: string;
|
|
89
|
-
enum: string[];
|
|
90
|
-
description: string;
|
|
91
|
-
};
|
|
92
|
-
owner: {
|
|
93
|
-
type: string;
|
|
94
|
-
description: string;
|
|
95
|
-
};
|
|
96
|
-
repo: {
|
|
97
|
-
type: string;
|
|
98
|
-
description: string;
|
|
99
|
-
};
|
|
100
|
-
provider: {
|
|
101
|
-
type: string;
|
|
102
|
-
enum: string[];
|
|
103
|
-
description: string;
|
|
104
|
-
};
|
|
105
|
-
projectPath: {
|
|
106
|
-
type: string;
|
|
107
|
-
description: string;
|
|
108
|
-
};
|
|
109
|
-
commit_hash: {
|
|
110
|
-
type: string;
|
|
111
|
-
description: string;
|
|
112
|
-
};
|
|
113
|
-
message: {
|
|
114
|
-
type: string;
|
|
115
|
-
description: string;
|
|
116
|
-
};
|
|
117
|
-
no_commit: {
|
|
118
|
-
type: string;
|
|
119
|
-
description: string;
|
|
120
|
-
};
|
|
121
|
-
merge_commit_hash: {
|
|
122
|
-
type: string;
|
|
123
|
-
description: string;
|
|
124
|
-
};
|
|
125
|
-
mainline: {
|
|
126
|
-
type: string;
|
|
127
|
-
description: string;
|
|
128
|
-
};
|
|
129
|
-
commit_range: {
|
|
130
|
-
type: string;
|
|
131
|
-
description: string;
|
|
132
|
-
};
|
|
133
|
-
strategy: {
|
|
134
|
-
type: string;
|
|
135
|
-
enum: string[];
|
|
136
|
-
description: string;
|
|
137
|
-
};
|
|
138
|
-
};
|
|
139
|
-
required: string[];
|
|
140
|
-
};
|
|
141
|
-
handler(input: GitRevertInput): Promise<GitRevertResult>;
|
|
142
|
-
revertCommit(params: GitRevertInput): Promise<GitRevertResult>;
|
|
143
|
-
revertMerge(params: GitRevertInput): Promise<GitRevertResult>;
|
|
144
|
-
revertRange(params: GitRevertInput): Promise<GitRevertResult>;
|
|
145
|
-
};
|
|
146
|
-
export {};
|
|
147
|
-
//# sourceMappingURL=git-revert.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;CA0CpE,CAAC"}
|
package/dist/tools/git-revert.js
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.gitRevertTool = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const terminal_controller_js_1 = require("../utils/terminal-controller.js");
|
|
6
|
-
/**
|
|
7
|
-
* Tool: git-revert
|
|
8
|
-
*
|
|
9
|
-
* DESCRIÇÃO:
|
|
10
|
-
* Gerenciamento de revert Git (GitHub + Gitea) com múltiplas ações
|
|
11
|
-
*
|
|
12
|
-
* FUNCIONALIDADES:
|
|
13
|
-
* - Reverter commit específico
|
|
14
|
-
* - Reverter merge commit
|
|
15
|
-
* - Reverter range de commits
|
|
16
|
-
* - Reverter com mensagem customizada
|
|
17
|
-
* - Reverter sem commit automático
|
|
18
|
-
*
|
|
19
|
-
* USO:
|
|
20
|
-
* - Para desfazer commits de forma segura
|
|
21
|
-
* - Para reverter mudanças em branches compartilhadas
|
|
22
|
-
* - Para criar commits de reversão
|
|
23
|
-
* - Para manter histórico limpo
|
|
24
|
-
*
|
|
25
|
-
* RECOMENDAÇÕES:
|
|
26
|
-
* - Use revert em vez de reset para branches compartilhadas
|
|
27
|
-
* - Teste reversões em branches locais primeiro
|
|
28
|
-
* - Documente motivos da reversão
|
|
29
|
-
*/
|
|
30
|
-
const GitRevertInputSchema = zod_1.z.object({
|
|
31
|
-
action: zod_1.z.enum(['revert-commit', 'revert-merge', 'revert-range']),
|
|
32
|
-
// owner: obtido automaticamente do provider,
|
|
33
|
-
// repo: extraído automaticamente do projectPath
|
|
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 revert-commit
|
|
37
|
-
commit_hash: zod_1.z.string().optional(),
|
|
38
|
-
message: zod_1.z.string().optional(),
|
|
39
|
-
no_commit: zod_1.z.boolean().optional(),
|
|
40
|
-
// Para revert-merge
|
|
41
|
-
merge_commit_hash: zod_1.z.string().optional(),
|
|
42
|
-
mainline: zod_1.z.number().optional(),
|
|
43
|
-
// Para revert-range
|
|
44
|
-
commit_range: zod_1.z.string().optional(),
|
|
45
|
-
strategy: zod_1.z.enum(['ours', 'theirs']).optional(),
|
|
46
|
-
});
|
|
47
|
-
const GitRevertResultSchema = zod_1.z.object({
|
|
48
|
-
success: zod_1.z.boolean(),
|
|
49
|
-
action: zod_1.z.string(),
|
|
50
|
-
message: zod_1.z.string(),
|
|
51
|
-
data: zod_1.z.any().optional(),
|
|
52
|
-
error: zod_1.z.string().optional()
|
|
53
|
-
});
|
|
54
|
-
exports.gitRevertTool = {
|
|
55
|
-
name: 'git-revert',
|
|
56
|
-
description: 'tool: Gerencia operações Git revert para desfazer mudanças de forma segura\n──────────────\naction revert-commit: reverte commit específico\naction revert-commit requires: commit_hash, message, no_commit, provider, projectPath\n───────────────\naction revert-merge: reverte merge commit\naction revert-merge requires: merge_commit_hash, mainline, message, provider, projectPath\n───────────────\naction revert-range: reverte range de commits\naction revert-range requires: commit_range, strategy, message, provider, projectPath',
|
|
57
|
-
inputSchema: {
|
|
58
|
-
type: 'object',
|
|
59
|
-
properties: {
|
|
60
|
-
action: {
|
|
61
|
-
type: 'string',
|
|
62
|
-
enum: ['revert-commit', 'revert-merge', 'revert-range'],
|
|
63
|
-
description: 'Action to perform on revert'
|
|
64
|
-
},
|
|
65
|
-
owner: { type: 'string', description: 'Repository owner' },
|
|
66
|
-
repo: { type: 'string', description: 'Repository name' },
|
|
67
|
-
provider: { type: 'string', enum: ['gitea', 'github'], description: 'Provider to use (gitea or github)' },
|
|
68
|
-
projectPath: { type: 'string', description: 'Local project path for git operations' },
|
|
69
|
-
commit_hash: { type: 'string', description: 'Commit hash to revert' },
|
|
70
|
-
message: { type: 'string', description: 'Custom revert message' },
|
|
71
|
-
no_commit: { type: 'boolean', description: 'Do not commit automatically' },
|
|
72
|
-
merge_commit_hash: { type: 'string', description: 'Merge commit hash to revert' },
|
|
73
|
-
mainline: { type: 'number', description: 'Mainline for merge revert' },
|
|
74
|
-
commit_range: { type: 'string', description: 'Commit range to revert' },
|
|
75
|
-
strategy: { type: 'string', enum: ['ours', 'theirs'], description: 'Revert strategy' }
|
|
76
|
-
},
|
|
77
|
-
required: ['action', 'repo', 'provider', 'projectPath']
|
|
78
|
-
},
|
|
79
|
-
async handler(input) {
|
|
80
|
-
try {
|
|
81
|
-
const validatedInput = GitRevertInputSchema.parse(input);
|
|
82
|
-
switch (validatedInput.action) {
|
|
83
|
-
case 'revert-commit':
|
|
84
|
-
return await this.revertCommit(validatedInput);
|
|
85
|
-
case 'revert-merge':
|
|
86
|
-
return await this.revertMerge(validatedInput);
|
|
87
|
-
case 'revert-range':
|
|
88
|
-
return await this.revertRange(validatedInput);
|
|
89
|
-
default:
|
|
90
|
-
throw new Error(`Ação não suportada: ${validatedInput.action}`);
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
catch (error) {
|
|
94
|
-
return {
|
|
95
|
-
success: false,
|
|
96
|
-
action: input.action,
|
|
97
|
-
message: 'Erro na operação de revert',
|
|
98
|
-
error: error instanceof Error ? error.message : String(error)
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
async revertCommit(params) {
|
|
103
|
-
try {
|
|
104
|
-
if (!params.commit_hash) {
|
|
105
|
-
throw new Error('commit_hash é obrigatório para revert-commit');
|
|
106
|
-
}
|
|
107
|
-
let gitCommand = `revert ${params.commit_hash}`;
|
|
108
|
-
if (params.no_commit) {
|
|
109
|
-
gitCommand += ' --no-commit';
|
|
110
|
-
}
|
|
111
|
-
if (params.message) {
|
|
112
|
-
gitCommand += ` -m "${params.message}"`;
|
|
113
|
-
}
|
|
114
|
-
const result = await (0, terminal_controller_js_1.runGitCommand)(gitCommand, params.projectPath, 'Executando revert de commit');
|
|
115
|
-
if (result.exitCode !== 0) {
|
|
116
|
-
throw new Error(`Falha no revert de commit: ${result.output}`);
|
|
117
|
-
}
|
|
118
|
-
return {
|
|
119
|
-
success: true,
|
|
120
|
-
action: 'revert-commit',
|
|
121
|
-
message: `Commit ${params.commit_hash} revertido com sucesso`,
|
|
122
|
-
data: {
|
|
123
|
-
commit_hash: params.commit_hash,
|
|
124
|
-
message: params.message,
|
|
125
|
-
no_commit: params.no_commit,
|
|
126
|
-
output: result.output
|
|
127
|
-
}
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
catch (error) {
|
|
131
|
-
throw new Error(`Falha ao executar revert de commit: ${error instanceof Error ? error.message : String(error)}`);
|
|
132
|
-
}
|
|
133
|
-
},
|
|
134
|
-
async revertMerge(params) {
|
|
135
|
-
try {
|
|
136
|
-
if (!params.merge_commit_hash) {
|
|
137
|
-
throw new Error('merge_commit_hash é obrigatório para revert-merge');
|
|
138
|
-
}
|
|
139
|
-
if (!params.mainline) {
|
|
140
|
-
throw new Error('mainline é obrigatório para revert de merge');
|
|
141
|
-
}
|
|
142
|
-
let gitCommand = `revert -m ${params.mainline} ${params.merge_commit_hash}`;
|
|
143
|
-
if (params.message) {
|
|
144
|
-
gitCommand += ` -m "${params.message}"`;
|
|
145
|
-
}
|
|
146
|
-
const result = await (0, terminal_controller_js_1.runGitCommand)(gitCommand, params.projectPath, 'Executando revert de merge');
|
|
147
|
-
if (result.exitCode !== 0) {
|
|
148
|
-
throw new Error(`Falha no revert de merge: ${result.output}`);
|
|
149
|
-
}
|
|
150
|
-
return {
|
|
151
|
-
success: true,
|
|
152
|
-
action: 'revert-merge',
|
|
153
|
-
message: `Merge commit ${params.merge_commit_hash} revertido com sucesso`,
|
|
154
|
-
data: {
|
|
155
|
-
merge_commit_hash: params.merge_commit_hash,
|
|
156
|
-
mainline: params.mainline,
|
|
157
|
-
message: params.message,
|
|
158
|
-
output: result.output
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
catch (error) {
|
|
163
|
-
throw new Error(`Falha ao executar revert de merge: ${error instanceof Error ? error.message : String(error)}`);
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
async revertRange(params) {
|
|
167
|
-
try {
|
|
168
|
-
if (!params.commit_range) {
|
|
169
|
-
throw new Error('commit_range é obrigatório para revert-range');
|
|
170
|
-
}
|
|
171
|
-
let gitCommand = `revert ${params.commit_range}`;
|
|
172
|
-
if (params.strategy) {
|
|
173
|
-
gitCommand += ` -X ${params.strategy}`;
|
|
174
|
-
}
|
|
175
|
-
if (params.message) {
|
|
176
|
-
gitCommand += ` -m "${params.message}"`;
|
|
177
|
-
}
|
|
178
|
-
const result = await (0, terminal_controller_js_1.runGitCommand)(gitCommand, params.projectPath, 'Executando revert de range');
|
|
179
|
-
if (result.exitCode !== 0) {
|
|
180
|
-
throw new Error(`Falha no revert de range: ${result.output}`);
|
|
181
|
-
}
|
|
182
|
-
return {
|
|
183
|
-
success: true,
|
|
184
|
-
action: 'revert-range',
|
|
185
|
-
message: `Range ${params.commit_range} revertido com sucesso`,
|
|
186
|
-
data: {
|
|
187
|
-
commit_range: params.commit_range,
|
|
188
|
-
strategy: params.strategy,
|
|
189
|
-
message: params.message,
|
|
190
|
-
output: result.output
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
}
|
|
194
|
-
catch (error) {
|
|
195
|
-
throw new Error(`Falha ao executar revert de range: ${error instanceof Error ? error.message : String(error)}`);
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
//# sourceMappingURL=git-revert.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git-revert.js","sourceRoot":"","sources":["../../src/tools/git-revert.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4EAAgE;AAEhE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,oBAAoB,GAAG,OAAC,CAAC,MAAM,CAAC;IACpC,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,cAAc,EAAE,cAAc,CAAC,CAAC;IACjE,6CAA6C;IAC7C,gDAAgD;IAClD,QAAQ,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,OA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,KAAK,CAAC,6BAA6B,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;YAChE,CAAC;YAED,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE,cAAc;gBACtB,OAAO,EAAE,SAAS,MAAM,CAAC,YAAY,wBAAwB;gBAC7D,IAAI,EAAE;oBACJ,YAAY,EAAE,MAAM,CAAC,YAAY;oBACjC,QAAQ,EAAE,MAAM,CAAC,QAAQ;oBACzB,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,MAAM,EAAE,MAAM,CAAC,MAAM;iBACtB;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,sCAAsC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAClH,CAAC;IAEH,CAAC;CACF,CAAC"}
|
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
declare const GitUpdateProjectInputSchema: z.ZodDiscriminatedUnion<"action", [z.ZodObject<{
|
|
3
|
-
action: z.ZodLiteral<"init">;
|
|
4
|
-
projectPath: z.ZodString;
|
|
5
|
-
provider: z.ZodEnum<["gitea", "github"]>;
|
|
6
|
-
message: z.ZodString;
|
|
7
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
8
|
-
createRepo: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
-
forcePush: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
-
granular: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
provider: "gitea" | "github";
|
|
13
|
-
message: string;
|
|
14
|
-
action: "init";
|
|
15
|
-
projectPath: string;
|
|
16
|
-
branch?: string | undefined;
|
|
17
|
-
createRepo?: boolean | undefined;
|
|
18
|
-
forcePush?: boolean | undefined;
|
|
19
|
-
granular?: boolean | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
provider: "gitea" | "github";
|
|
22
|
-
message: string;
|
|
23
|
-
action: "init";
|
|
24
|
-
projectPath: string;
|
|
25
|
-
branch?: string | undefined;
|
|
26
|
-
createRepo?: boolean | undefined;
|
|
27
|
-
forcePush?: boolean | undefined;
|
|
28
|
-
granular?: boolean | undefined;
|
|
29
|
-
}>, z.ZodObject<{
|
|
30
|
-
action: z.ZodLiteral<"update">;
|
|
31
|
-
projectPath: z.ZodString;
|
|
32
|
-
provider: z.ZodEnum<["gitea", "github"]>;
|
|
33
|
-
message: z.ZodString;
|
|
34
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
35
|
-
forcePush: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
-
}, "strip", z.ZodTypeAny, {
|
|
37
|
-
provider: "gitea" | "github";
|
|
38
|
-
message: string;
|
|
39
|
-
action: "update";
|
|
40
|
-
projectPath: string;
|
|
41
|
-
branch?: string | undefined;
|
|
42
|
-
forcePush?: boolean | undefined;
|
|
43
|
-
}, {
|
|
44
|
-
provider: "gitea" | "github";
|
|
45
|
-
message: string;
|
|
46
|
-
action: "update";
|
|
47
|
-
projectPath: string;
|
|
48
|
-
branch?: string | undefined;
|
|
49
|
-
forcePush?: boolean | undefined;
|
|
50
|
-
}>, z.ZodObject<{
|
|
51
|
-
action: z.ZodLiteral<"status">;
|
|
52
|
-
projectPath: z.ZodString;
|
|
53
|
-
detailed: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
-
}, "strip", z.ZodTypeAny, {
|
|
55
|
-
action: "status";
|
|
56
|
-
projectPath: string;
|
|
57
|
-
detailed?: boolean | undefined;
|
|
58
|
-
}, {
|
|
59
|
-
action: "status";
|
|
60
|
-
projectPath: string;
|
|
61
|
-
detailed?: boolean | undefined;
|
|
62
|
-
}>, z.ZodObject<{
|
|
63
|
-
action: z.ZodLiteral<"diff">;
|
|
64
|
-
projectPath: z.ZodString;
|
|
65
|
-
staged: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
-
nameOnly: z.ZodOptional<z.ZodBoolean>;
|
|
67
|
-
commit: z.ZodOptional<z.ZodString>;
|
|
68
|
-
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
action: "diff";
|
|
70
|
-
projectPath: string;
|
|
71
|
-
commit?: string | undefined;
|
|
72
|
-
staged?: boolean | undefined;
|
|
73
|
-
nameOnly?: boolean | undefined;
|
|
74
|
-
}, {
|
|
75
|
-
action: "diff";
|
|
76
|
-
projectPath: string;
|
|
77
|
-
commit?: string | undefined;
|
|
78
|
-
staged?: boolean | undefined;
|
|
79
|
-
nameOnly?: boolean | undefined;
|
|
80
|
-
}>, z.ZodObject<{
|
|
81
|
-
action: z.ZodLiteral<"log">;
|
|
82
|
-
projectPath: z.ZodString;
|
|
83
|
-
maxCount: z.ZodOptional<z.ZodNumber>;
|
|
84
|
-
oneline: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
86
|
-
}, "strip", z.ZodTypeAny, {
|
|
87
|
-
action: "log";
|
|
88
|
-
projectPath: string;
|
|
89
|
-
branch?: string | undefined;
|
|
90
|
-
maxCount?: number | undefined;
|
|
91
|
-
oneline?: boolean | undefined;
|
|
92
|
-
}, {
|
|
93
|
-
action: "log";
|
|
94
|
-
projectPath: string;
|
|
95
|
-
branch?: string | undefined;
|
|
96
|
-
maxCount?: number | undefined;
|
|
97
|
-
oneline?: boolean | undefined;
|
|
98
|
-
}>, z.ZodObject<{
|
|
99
|
-
action: z.ZodLiteral<"reset">;
|
|
100
|
-
projectPath: z.ZodString;
|
|
101
|
-
mode: z.ZodOptional<z.ZodEnum<["soft", "mixed", "hard"]>>;
|
|
102
|
-
commit: z.ZodOptional<z.ZodString>;
|
|
103
|
-
}, "strip", z.ZodTypeAny, {
|
|
104
|
-
action: "reset";
|
|
105
|
-
projectPath: string;
|
|
106
|
-
commit?: string | undefined;
|
|
107
|
-
mode?: "soft" | "hard" | "mixed" | undefined;
|
|
108
|
-
}, {
|
|
109
|
-
action: "reset";
|
|
110
|
-
projectPath: string;
|
|
111
|
-
commit?: string | undefined;
|
|
112
|
-
mode?: "soft" | "hard" | "mixed" | undefined;
|
|
113
|
-
}>, z.ZodObject<{
|
|
114
|
-
action: z.ZodLiteral<"stash">;
|
|
115
|
-
projectPath: z.ZodString;
|
|
116
|
-
operation: z.ZodOptional<z.ZodEnum<["save", "pop", "apply", "list", "drop", "clear"]>>;
|
|
117
|
-
message: z.ZodOptional<z.ZodString>;
|
|
118
|
-
}, "strip", z.ZodTypeAny, {
|
|
119
|
-
action: "stash";
|
|
120
|
-
projectPath: string;
|
|
121
|
-
message?: string | undefined;
|
|
122
|
-
operation?: "pop" | "apply" | "list" | "drop" | "clear" | "save" | undefined;
|
|
123
|
-
}, {
|
|
124
|
-
action: "stash";
|
|
125
|
-
projectPath: string;
|
|
126
|
-
message?: string | undefined;
|
|
127
|
-
operation?: "pop" | "apply" | "list" | "drop" | "clear" | "save" | undefined;
|
|
128
|
-
}>, z.ZodObject<{
|
|
129
|
-
action: z.ZodLiteral<"pull">;
|
|
130
|
-
projectPath: z.ZodString;
|
|
131
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
132
|
-
}, "strip", z.ZodTypeAny, {
|
|
133
|
-
action: "pull";
|
|
134
|
-
projectPath: string;
|
|
135
|
-
branch?: string | undefined;
|
|
136
|
-
}, {
|
|
137
|
-
action: "pull";
|
|
138
|
-
projectPath: string;
|
|
139
|
-
branch?: string | undefined;
|
|
140
|
-
}>, z.ZodObject<{
|
|
141
|
-
action: z.ZodLiteral<"sync">;
|
|
142
|
-
projectPath: z.ZodString;
|
|
143
|
-
provider: z.ZodEnum<["gitea", "github"]>;
|
|
144
|
-
message: z.ZodString;
|
|
145
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
146
|
-
forcePush: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
-
}, "strip", z.ZodTypeAny, {
|
|
148
|
-
provider: "gitea" | "github";
|
|
149
|
-
message: string;
|
|
150
|
-
action: "sync";
|
|
151
|
-
projectPath: string;
|
|
152
|
-
branch?: string | undefined;
|
|
153
|
-
forcePush?: boolean | undefined;
|
|
154
|
-
}, {
|
|
155
|
-
provider: "gitea" | "github";
|
|
156
|
-
message: string;
|
|
157
|
-
action: "sync";
|
|
158
|
-
projectPath: string;
|
|
159
|
-
branch?: string | undefined;
|
|
160
|
-
forcePush?: boolean | undefined;
|
|
161
|
-
}>]>;
|
|
162
|
-
export type GitUpdateProjectInput = z.infer<typeof GitUpdateProjectInputSchema>;
|
|
163
|
-
declare const GitUpdateProjectResultSchema: z.ZodObject<{
|
|
164
|
-
success: z.ZodBoolean;
|
|
165
|
-
action: z.ZodString;
|
|
166
|
-
message: z.ZodString;
|
|
167
|
-
data: z.ZodOptional<z.ZodAny>;
|
|
168
|
-
error: z.ZodOptional<z.ZodString>;
|
|
169
|
-
}, "strip", z.ZodTypeAny, {
|
|
170
|
-
message: string;
|
|
171
|
-
action: string;
|
|
172
|
-
success: boolean;
|
|
173
|
-
error?: string | undefined;
|
|
174
|
-
data?: any;
|
|
175
|
-
}, {
|
|
176
|
-
message: string;
|
|
177
|
-
action: string;
|
|
178
|
-
success: boolean;
|
|
179
|
-
error?: string | undefined;
|
|
180
|
-
data?: any;
|
|
181
|
-
}>;
|
|
182
|
-
export type GitUpdateProjectResult = z.infer<typeof GitUpdateProjectResultSchema>;
|
|
183
|
-
export declare const gitUpdateProjectTool: {
|
|
184
|
-
name: string;
|
|
185
|
-
description: string;
|
|
186
|
-
inputSchema: {
|
|
187
|
-
type: string;
|
|
188
|
-
properties: {
|
|
189
|
-
action: {
|
|
190
|
-
type: string;
|
|
191
|
-
enum: string[];
|
|
192
|
-
description: string;
|
|
193
|
-
};
|
|
194
|
-
repo: {
|
|
195
|
-
type: string;
|
|
196
|
-
description: string;
|
|
197
|
-
};
|
|
198
|
-
projectPath: {
|
|
199
|
-
type: string;
|
|
200
|
-
description: string;
|
|
201
|
-
};
|
|
202
|
-
provider: {
|
|
203
|
-
type: string;
|
|
204
|
-
enum: string[];
|
|
205
|
-
description: string;
|
|
206
|
-
};
|
|
207
|
-
message: {
|
|
208
|
-
type: string;
|
|
209
|
-
description: string;
|
|
210
|
-
};
|
|
211
|
-
branch: {
|
|
212
|
-
type: string;
|
|
213
|
-
description: string;
|
|
214
|
-
default: string;
|
|
215
|
-
};
|
|
216
|
-
forcePush: {
|
|
217
|
-
type: string;
|
|
218
|
-
description: string;
|
|
219
|
-
default: boolean;
|
|
220
|
-
};
|
|
221
|
-
createRepo: {
|
|
222
|
-
type: string;
|
|
223
|
-
description: string;
|
|
224
|
-
default: boolean;
|
|
225
|
-
};
|
|
226
|
-
granular: {
|
|
227
|
-
type: string;
|
|
228
|
-
description: string;
|
|
229
|
-
default: boolean;
|
|
230
|
-
};
|
|
231
|
-
detailed: {
|
|
232
|
-
type: string;
|
|
233
|
-
description: string;
|
|
234
|
-
default: boolean;
|
|
235
|
-
};
|
|
236
|
-
staged: {
|
|
237
|
-
type: string;
|
|
238
|
-
description: string;
|
|
239
|
-
default: boolean;
|
|
240
|
-
};
|
|
241
|
-
nameOnly: {
|
|
242
|
-
type: string;
|
|
243
|
-
description: string;
|
|
244
|
-
default: boolean;
|
|
245
|
-
};
|
|
246
|
-
commit: {
|
|
247
|
-
type: string;
|
|
248
|
-
description: string;
|
|
249
|
-
};
|
|
250
|
-
maxCount: {
|
|
251
|
-
type: string;
|
|
252
|
-
description: string;
|
|
253
|
-
default: number;
|
|
254
|
-
};
|
|
255
|
-
oneline: {
|
|
256
|
-
type: string;
|
|
257
|
-
description: string;
|
|
258
|
-
default: boolean;
|
|
259
|
-
};
|
|
260
|
-
mode: {
|
|
261
|
-
type: string;
|
|
262
|
-
enum: string[];
|
|
263
|
-
description: string;
|
|
264
|
-
default: string;
|
|
265
|
-
};
|
|
266
|
-
operation: {
|
|
267
|
-
type: string;
|
|
268
|
-
enum: string[];
|
|
269
|
-
description: string;
|
|
270
|
-
default: string;
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
required: string[];
|
|
274
|
-
};
|
|
275
|
-
handler(input: GitUpdateProjectInput): Promise<GitUpdateProjectResult>;
|
|
276
|
-
handleUpdate(params: GitUpdateProjectInput & {
|
|
277
|
-
action: "update";
|
|
278
|
-
repo?: string;
|
|
279
|
-
}): Promise<GitUpdateProjectResult>;
|
|
280
|
-
handleInit(params: GitUpdateProjectInput & {
|
|
281
|
-
action: "init";
|
|
282
|
-
repo?: string;
|
|
283
|
-
}): Promise<GitUpdateProjectResult>;
|
|
284
|
-
handleStatus(params: GitUpdateProjectInput & {
|
|
285
|
-
action: "status";
|
|
286
|
-
}): Promise<GitUpdateProjectResult>;
|
|
287
|
-
handleDiff(params: GitUpdateProjectInput & {
|
|
288
|
-
action: "diff";
|
|
289
|
-
}): Promise<GitUpdateProjectResult>;
|
|
290
|
-
handleLog(params: GitUpdateProjectInput & {
|
|
291
|
-
action: "log";
|
|
292
|
-
}): Promise<GitUpdateProjectResult>;
|
|
293
|
-
handleReset(params: GitUpdateProjectInput & {
|
|
294
|
-
action: "reset";
|
|
295
|
-
}): Promise<GitUpdateProjectResult>;
|
|
296
|
-
handleStash(params: GitUpdateProjectInput & {
|
|
297
|
-
action: "stash";
|
|
298
|
-
}): Promise<GitUpdateProjectResult>;
|
|
299
|
-
handlePull(params: GitUpdateProjectInput & {
|
|
300
|
-
action: "pull";
|
|
301
|
-
}): Promise<GitUpdateProjectResult>;
|
|
302
|
-
handleSync(params: GitUpdateProjectInput & {
|
|
303
|
-
action: "sync";
|
|
304
|
-
repo?: string;
|
|
305
|
-
}): Promise<GitUpdateProjectResult>;
|
|
306
|
-
groupFilesByType(projectPath: string): Promise<Record<string, string[]>>;
|
|
307
|
-
};
|
|
308
|
-
export {};
|
|
309
|
-
//# sourceMappingURL=git-update-project.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git-update-project.d.ts","sourceRoot":"","sources":["../../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