@andrebuzeli/git-mcp 2.37.0 → 2.38.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/tools/git-update-project.d.ts.map +1 -1
- package/dist/tools/git-update-project.js +115 -6
- package/dist/tools/git-update-project.js.map +1 -1
- package/package.json +2 -2
- package/dist/tools/git-webhooks.d.ts +0 -474
- package/dist/tools/git-webhooks.d.ts.map +0 -1
- package/dist/tools/git-webhooks.js +0 -545
- package/dist/tools/git-webhooks.js.map +0 -1
- package/dist/utils/git-error-analyzer.d.ts +0 -64
- package/dist/utils/git-error-analyzer.d.ts.map +0 -1
- package/dist/utils/git-error-analyzer.js +0 -286
- package/dist/utils/git-error-analyzer.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-update-project.d.ts","sourceRoot":"","sources":["../../src/tools/git-update-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"git-update-project.d.ts","sourceRoot":"","sources":["../../src/tools/git-update-project.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,QAAA,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;EAQ/B,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;EAMhC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAiBV,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;0BAqBhD,qBAAqB,GAAG,OAAO,CAAC,sBAAsB,CAAC;CAgJpF,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.gitUpdateProjectTool = void 0;
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const index_js_1 = require("../providers/index.js");
|
|
6
6
|
const user_detection_js_1 = require("../utils/user-detection.js");
|
|
7
|
+
const git_operations_js_1 = require("../utils/git-operations.js");
|
|
7
8
|
const GitUpdateProjectInputSchema = zod_1.z.object({
|
|
8
9
|
action: zod_1.z.literal('update'),
|
|
9
10
|
repo: zod_1.z.string(),
|
|
@@ -22,7 +23,7 @@ const GitUpdateProjectResultSchema = zod_1.z.object({
|
|
|
22
23
|
});
|
|
23
24
|
exports.gitUpdateProjectTool = {
|
|
24
25
|
name: 'git-update-project',
|
|
25
|
-
description: 'tool: Atualiza projeto incrementalmente no repositório\\n──────────────\\naction update: detecta mudanças
|
|
26
|
+
description: 'tool: Atualiza projeto incrementalmente no repositório\\n──────────────\\naction update: detecta mudanças, faz commit e push automático\\naction update requires: repo, provider, projectPath, message\\n───────────────\\nCOMMITS REAIS: Detecta mudanças no diretório local, faz git add, commit e push\\nFunciona apenas em repositórios Git locais com mudanças pendentes\\nPush automático para remote configurado (origin)',
|
|
26
27
|
inputSchema: {
|
|
27
28
|
type: 'object',
|
|
28
29
|
properties: {
|
|
@@ -56,23 +57,131 @@ exports.gitUpdateProjectTool = {
|
|
|
56
57
|
async updateProject(params) {
|
|
57
58
|
try {
|
|
58
59
|
const { repo, projectPath, message, branch = 'main', forcePush = false, provider: providerName } = params;
|
|
60
|
+
// Inicializar operações Git locais
|
|
61
|
+
const gitOps = new git_operations_js_1.GitOperations(projectPath);
|
|
62
|
+
// Verificar se é um repositório Git
|
|
63
|
+
const isGitRepo = await gitOps.isGitRepository();
|
|
64
|
+
if (!isGitRepo) {
|
|
65
|
+
throw new Error(`Diretório '${projectPath}' não é um repositório Git válido`);
|
|
66
|
+
}
|
|
67
|
+
// Verificar status para ver se há mudanças
|
|
68
|
+
const statusResult = await gitOps.status({ porcelain: true });
|
|
69
|
+
if (!statusResult.success) {
|
|
70
|
+
throw new Error(`Falha ao verificar status do Git: ${statusResult.error}`);
|
|
71
|
+
}
|
|
72
|
+
// Verificar se há mudanças para commitar
|
|
73
|
+
const hasChanges = statusResult.output.trim().length > 0;
|
|
74
|
+
if (!hasChanges) {
|
|
75
|
+
return {
|
|
76
|
+
success: true,
|
|
77
|
+
action: 'update',
|
|
78
|
+
message: `Nenhuma mudança detectada no projeto '${repo}'`,
|
|
79
|
+
data: {
|
|
80
|
+
repo,
|
|
81
|
+
branch,
|
|
82
|
+
provider: providerName,
|
|
83
|
+
message,
|
|
84
|
+
changesDetected: false,
|
|
85
|
+
filesChanged: 0,
|
|
86
|
+
implementation: 'REAL_GIT_OPERATIONS_v2.38.0',
|
|
87
|
+
note: 'Nenhuma mudança para commitar'
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
// Contar arquivos modificados
|
|
92
|
+
const changedFiles = statusResult.output.trim().split('\n').filter(line => line.trim().length > 0);
|
|
93
|
+
const filesCount = changedFiles.length;
|
|
94
|
+
// Adicionar arquivos ao staging
|
|
95
|
+
const addResult = await gitOps.addFiles(['.']);
|
|
96
|
+
if (!addResult.success) {
|
|
97
|
+
throw new Error(`Falha ao adicionar arquivos: ${addResult.error}`);
|
|
98
|
+
}
|
|
99
|
+
// Verificar se há algo no staging após add
|
|
100
|
+
const statusAfterAdd = await gitOps.status({ porcelain: true });
|
|
101
|
+
if (!statusAfterAdd.success) {
|
|
102
|
+
throw new Error(`Falha ao verificar status após add: ${statusAfterAdd.error}`);
|
|
103
|
+
}
|
|
104
|
+
const hasStagedChanges = statusAfterAdd.output.includes('A') || statusAfterAdd.output.includes('M') || statusAfterAdd.output.includes('D');
|
|
105
|
+
if (!hasStagedChanges) {
|
|
106
|
+
return {
|
|
107
|
+
success: true,
|
|
108
|
+
action: 'update',
|
|
109
|
+
message: `Arquivos adicionados mas nenhuma mudança válida para commit no projeto '${repo}'`,
|
|
110
|
+
data: {
|
|
111
|
+
repo,
|
|
112
|
+
branch,
|
|
113
|
+
provider: providerName,
|
|
114
|
+
message,
|
|
115
|
+
changesDetected: true,
|
|
116
|
+
filesChanged: filesCount,
|
|
117
|
+
stagedChanges: false,
|
|
118
|
+
implementation: 'REAL_GIT_OPERATIONS_v2.38.0',
|
|
119
|
+
note: 'Arquivos adicionados mas não há mudanças válidas para commit'
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
// Fazer commit
|
|
124
|
+
const commitResult = await gitOps.commit(message);
|
|
125
|
+
if (!commitResult.success) {
|
|
126
|
+
throw new Error(`Falha no commit: ${commitResult.error}`);
|
|
127
|
+
}
|
|
128
|
+
// Tentar fazer push para o remote
|
|
129
|
+
let pushSuccessful = false;
|
|
130
|
+
let pushError = '';
|
|
131
|
+
try {
|
|
132
|
+
// Verificar se há remote configurado
|
|
133
|
+
const remoteResult = await gitOps.remote('get-url', 'origin');
|
|
134
|
+
if (remoteResult.success) {
|
|
135
|
+
// Tentar push
|
|
136
|
+
const pushOptions = {};
|
|
137
|
+
if (forcePush) {
|
|
138
|
+
pushOptions.force = true;
|
|
139
|
+
}
|
|
140
|
+
const pushResult = await gitOps.push('origin', branch, pushOptions);
|
|
141
|
+
pushSuccessful = pushResult.success;
|
|
142
|
+
if (!pushSuccessful) {
|
|
143
|
+
pushError = pushResult.error || 'Erro desconhecido no push';
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
pushError = 'Nenhum remote configurado (origin)';
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
catch (pushErr) {
|
|
151
|
+
pushError = pushErr instanceof Error ? pushErr.message : String(pushErr);
|
|
152
|
+
}
|
|
153
|
+
// Obter informações do commit criado
|
|
154
|
+
const logResult = await gitOps.log({ maxCount: 1, oneline: true });
|
|
155
|
+
const commitInfo = logResult.success ? logResult.output : 'Commit criado mas não foi possível obter informações';
|
|
59
156
|
return {
|
|
60
157
|
success: true,
|
|
61
158
|
action: 'update',
|
|
62
|
-
message: `Projeto '${repo}' atualizado com sucesso`,
|
|
159
|
+
message: `Projeto '${repo}' atualizado com sucesso${pushSuccessful ? ' e enviado para remote' : ''}`,
|
|
63
160
|
data: {
|
|
64
161
|
repo,
|
|
65
162
|
branch,
|
|
66
163
|
provider: providerName,
|
|
67
164
|
message,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
165
|
+
changesDetected: true,
|
|
166
|
+
filesChanged: filesCount,
|
|
167
|
+
stagedChanges: true,
|
|
168
|
+
commitCreated: true,
|
|
169
|
+
commitInfo,
|
|
170
|
+
pushSuccessful,
|
|
171
|
+
pushError: pushSuccessful ? undefined : pushError,
|
|
172
|
+
note: pushSuccessful ?
|
|
173
|
+
'Commit criado e enviado para remote com sucesso' :
|
|
174
|
+
`Commit criado localmente. Push falhou: ${pushError}. Use git push manualmente.`
|
|
71
175
|
}
|
|
72
176
|
};
|
|
73
177
|
}
|
|
74
178
|
catch (error) {
|
|
75
|
-
|
|
179
|
+
return {
|
|
180
|
+
success: false,
|
|
181
|
+
action: 'update',
|
|
182
|
+
message: 'Erro na atualização incremental do projeto',
|
|
183
|
+
error: error instanceof Error ? error.message : String(error)
|
|
184
|
+
};
|
|
76
185
|
}
|
|
77
186
|
}
|
|
78
187
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-update-project.js","sourceRoot":"","sources":["../../src/tools/git-update-project.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,oDAA6E;AAC7E,kEAAoE;
|
|
1
|
+
{"version":3,"file":"git-update-project.js","sourceRoot":"","sources":["../../src/tools/git-update-project.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,oDAA6E;AAC7E,kEAAoE;AACpE,kEAA2D;AAE3D,MAAM,2BAA2B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3C,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;I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,CAAC,CAAC,sDAAsD,CAAC;YAEjH,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,MAAM,EAAE,QAAQ;gBAChB,OAAO,EAAE,YAAY,IAAI,2BAA2B,cAAc,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,EAAE;gBACpG,IAAI,EAAE;oBACJ,IAAI;oBACJ,MAAM;oBACN,QAAQ,EAAE,YAAY;oBACtB,OAAO;oBACP,eAAe,EAAE,IAAI;oBACrB,YAAY,EAAE,UAAU;oBACxB,aAAa,EAAE,IAAI;oBACnB,aAAa,EAAE,IAAI;oBACnB,UAAU;oBACV,cAAc;oBACd,SAAS,EAAE,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;oBACjD,IAAI,EAAE,cAAc,CAAC,CAAC;wBACpB,iDAAiD,CAAC,CAAC;wBACnD,0CAA0C,SAAS,6BAA6B;iBACnF;aACF,CAAC;QAEJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,MAAM,EAAE,QAAQ;gBAChB,OAAO,EAAE,4CAA4C;gBACrD,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAC9D,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@andrebuzeli/git-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.0",
|
|
4
4
|
"description": "MCP server for Gitea and GitHub integration with 21 comprehensive DevOps tools - 100% AUTO-SUFFICIENT: Complete Git/GitHub functionality with ALL methods implemented, GitOperations class, FileOperations, TerminalOperations, Project Upload/Update, Git Initialize, Packages, Projects - NO external dependencies, NO terminal commands, FULLY IMPLEMENTED - Enhanced validation with required projectPath and provider parameters",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"test": "node tests/basic.test.js",
|
|
14
14
|
"lint": "echo \"No linting configured\" && exit 0",
|
|
15
15
|
"prepublishOnly": "npm run build",
|
|
16
|
-
"postpublish": "echo 'Git MCP v2.
|
|
16
|
+
"postpublish": "echo 'Git MCP v2.38.0 published successfully - REAL commits implementation, no simulation!'"
|
|
17
17
|
},
|
|
18
18
|
"keywords": [
|
|
19
19
|
"mcp",
|
|
@@ -1,474 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { VcsOperations } from '../providers/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Tool: webhooks
|
|
5
|
-
*
|
|
6
|
-
* DESCRIÇÃO:
|
|
7
|
-
* Gerenciamento completo de webhooks com suporte multi-provider (GitHub e Gitea)
|
|
8
|
-
*
|
|
9
|
-
* FUNCIONALIDADES:
|
|
10
|
-
* - Criação de novos webhooks
|
|
11
|
-
* - Listagem e busca de webhooks
|
|
12
|
-
* - Obtenção de detalhes específicos
|
|
13
|
-
* - Atualização de webhooks existentes
|
|
14
|
-
* - Exclusão de webhooks
|
|
15
|
-
* - Teste de webhooks
|
|
16
|
-
* - Configuração de eventos
|
|
17
|
-
*
|
|
18
|
-
* USO:
|
|
19
|
-
* - Para integração com CI/CD
|
|
20
|
-
* - Para notificações automáticas
|
|
21
|
-
* - Para sincronização de dados
|
|
22
|
-
* - Para automação de workflows
|
|
23
|
-
*
|
|
24
|
-
* RECOMENDAÇÕES:
|
|
25
|
-
* - Use HTTPS sempre que possível
|
|
26
|
-
* - Mantenha secrets seguros
|
|
27
|
-
* - Monitore falhas de entrega
|
|
28
|
-
* - Configure apenas eventos necessários
|
|
29
|
-
*/
|
|
30
|
-
/**
|
|
31
|
-
* Schema de validação para entrada da tool webhooks
|
|
32
|
-
*
|
|
33
|
-
* VALIDAÇÕES:
|
|
34
|
-
* - action: Ação obrigatória (create, list, get, update, delete, test)
|
|
35
|
-
* - Parâmetros específicos por ação
|
|
36
|
-
* - Validação de tipos e formatos
|
|
37
|
-
*
|
|
38
|
-
* RECOMENDAÇÕES:
|
|
39
|
-
* - Sempre valide entrada antes de usar
|
|
40
|
-
* - Use parâmetros opcionais adequadamente
|
|
41
|
-
* - Documente parâmetros obrigatórios
|
|
42
|
-
*/
|
|
43
|
-
declare const WebhooksInputSchema: z.ZodObject<{
|
|
44
|
-
action: z.ZodEnum<["create", "list", "get", "update", "delete", "test"]>;
|
|
45
|
-
repo: z.ZodString;
|
|
46
|
-
provider: z.ZodEnum<["gitea", "github"]>;
|
|
47
|
-
projectPath: z.ZodString;
|
|
48
|
-
url: z.ZodOptional<z.ZodString>;
|
|
49
|
-
content_type: z.ZodOptional<z.ZodEnum<["json", "form"]>>;
|
|
50
|
-
secret: z.ZodOptional<z.ZodString>;
|
|
51
|
-
events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
52
|
-
active: z.ZodOptional<z.ZodBoolean>;
|
|
53
|
-
webhook_id: z.ZodOptional<z.ZodNumber>;
|
|
54
|
-
page: z.ZodOptional<z.ZodNumber>;
|
|
55
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
56
|
-
new_url: z.ZodOptional<z.ZodString>;
|
|
57
|
-
new_content_type: z.ZodOptional<z.ZodEnum<["json", "form"]>>;
|
|
58
|
-
new_secret: z.ZodOptional<z.ZodString>;
|
|
59
|
-
new_events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
60
|
-
new_active: z.ZodOptional<z.ZodBoolean>;
|
|
61
|
-
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
provider: "gitea" | "github";
|
|
63
|
-
repo: string;
|
|
64
|
-
action: "delete" | "get" | "list" | "create" | "update" | "test";
|
|
65
|
-
projectPath: string;
|
|
66
|
-
active?: boolean | undefined;
|
|
67
|
-
url?: string | undefined;
|
|
68
|
-
events?: string[] | undefined;
|
|
69
|
-
page?: number | undefined;
|
|
70
|
-
limit?: number | undefined;
|
|
71
|
-
content_type?: "json" | "form" | undefined;
|
|
72
|
-
secret?: string | undefined;
|
|
73
|
-
webhook_id?: number | undefined;
|
|
74
|
-
new_url?: string | undefined;
|
|
75
|
-
new_content_type?: "json" | "form" | undefined;
|
|
76
|
-
new_secret?: string | undefined;
|
|
77
|
-
new_events?: string[] | undefined;
|
|
78
|
-
new_active?: boolean | undefined;
|
|
79
|
-
}, {
|
|
80
|
-
provider: "gitea" | "github";
|
|
81
|
-
repo: string;
|
|
82
|
-
action: "delete" | "get" | "list" | "create" | "update" | "test";
|
|
83
|
-
projectPath: string;
|
|
84
|
-
active?: boolean | undefined;
|
|
85
|
-
url?: string | undefined;
|
|
86
|
-
events?: string[] | undefined;
|
|
87
|
-
page?: number | undefined;
|
|
88
|
-
limit?: number | undefined;
|
|
89
|
-
content_type?: "json" | "form" | undefined;
|
|
90
|
-
secret?: string | undefined;
|
|
91
|
-
webhook_id?: number | undefined;
|
|
92
|
-
new_url?: string | undefined;
|
|
93
|
-
new_content_type?: "json" | "form" | undefined;
|
|
94
|
-
new_secret?: string | undefined;
|
|
95
|
-
new_events?: string[] | undefined;
|
|
96
|
-
new_active?: boolean | undefined;
|
|
97
|
-
}>;
|
|
98
|
-
export type WebhooksInput = z.infer<typeof WebhooksInputSchema>;
|
|
99
|
-
/**
|
|
100
|
-
* Schema de saída padronizado
|
|
101
|
-
*
|
|
102
|
-
* ESTRUTURA:
|
|
103
|
-
* - success: Status da operação
|
|
104
|
-
* - action: Ação executada
|
|
105
|
-
* - message: Mensagem descritiva
|
|
106
|
-
* - data: Dados retornados (opcional)
|
|
107
|
-
* - error: Detalhes do erro (opcional)
|
|
108
|
-
*/
|
|
109
|
-
declare const WebhooksResultSchema: z.ZodObject<{
|
|
110
|
-
success: z.ZodBoolean;
|
|
111
|
-
action: z.ZodString;
|
|
112
|
-
message: z.ZodString;
|
|
113
|
-
data: z.ZodOptional<z.ZodAny>;
|
|
114
|
-
error: z.ZodOptional<z.ZodString>;
|
|
115
|
-
}, "strip", z.ZodTypeAny, {
|
|
116
|
-
message: string;
|
|
117
|
-
action: string;
|
|
118
|
-
success: boolean;
|
|
119
|
-
error?: string | undefined;
|
|
120
|
-
data?: any;
|
|
121
|
-
}, {
|
|
122
|
-
message: string;
|
|
123
|
-
action: string;
|
|
124
|
-
success: boolean;
|
|
125
|
-
error?: string | undefined;
|
|
126
|
-
data?: any;
|
|
127
|
-
}>;
|
|
128
|
-
export type WebhooksResult = z.infer<typeof WebhooksResultSchema>;
|
|
129
|
-
/**
|
|
130
|
-
* Tool: webhooks
|
|
131
|
-
*
|
|
132
|
-
* DESCRIÇÃO:
|
|
133
|
-
* Gerenciamento completo de webhooks Gitea com múltiplas ações
|
|
134
|
-
*
|
|
135
|
-
* ACTIONS DISPONÍVEIS:
|
|
136
|
-
*
|
|
137
|
-
* 1. create - Criar novo webhook
|
|
138
|
-
* Parâmetros:
|
|
139
|
-
* - owner (obrigatório): Proprietário do repositório
|
|
140
|
-
* - repo (obrigatório): Nome do repositório
|
|
141
|
-
* - url (obrigatório): URL de destino do webhook
|
|
142
|
-
* - content_type (opcional): Tipo de conteúdo (json, form) - padrão: json
|
|
143
|
-
* - secret (opcional): Secret para assinatura
|
|
144
|
-
* - events (opcional): Array de eventos a serem monitorados
|
|
145
|
-
* - active (opcional): Se webhook está ativo (padrão: true)
|
|
146
|
-
*
|
|
147
|
-
* 2. list - Listar webhooks
|
|
148
|
-
* Parâmetros:
|
|
149
|
-
* - owner (obrigatório): Proprietário do repositório
|
|
150
|
-
* - repo (obrigatório): Nome do repositório
|
|
151
|
-
* - page (opcional): Página da listagem (padrão: 1)
|
|
152
|
-
* - limit (opcional): Itens por página (padrão: 30, máximo: 100)
|
|
153
|
-
*
|
|
154
|
-
* 3. get - Obter detalhes do webhook
|
|
155
|
-
* Parâmetros:
|
|
156
|
-
* - owner (obrigatório): Proprietário do repositório
|
|
157
|
-
* - repo (obrigatório): Nome do repositório
|
|
158
|
-
* - webhook_id (obrigatório): ID do webhook
|
|
159
|
-
*
|
|
160
|
-
* 4. update - Atualizar webhook existente
|
|
161
|
-
* Parâmetros:
|
|
162
|
-
* - owner (obrigatório): Proprietário do repositório
|
|
163
|
-
* - repo (obrigatório): Nome do repositório
|
|
164
|
-
* - webhook_id (obrigatório): ID do webhook
|
|
165
|
-
* - new_url (opcional): Nova URL
|
|
166
|
-
* - new_content_type (opcional): Novo tipo de conteúdo
|
|
167
|
-
* - new_secret (opcional): Novo secret
|
|
168
|
-
* - new_events (opcional): Novos eventos
|
|
169
|
-
* - new_active (opcional): Novo status ativo
|
|
170
|
-
*
|
|
171
|
-
* 5. delete - Deletar webhook
|
|
172
|
-
* Parâmetros:
|
|
173
|
-
* - owner (obrigatório): Proprietário do repositório
|
|
174
|
-
* - repo (obrigatório): Nome do repositório
|
|
175
|
-
* - webhook_id (obrigatório): ID do webhook
|
|
176
|
-
*
|
|
177
|
-
* 6. test - Testar webhook
|
|
178
|
-
* Parâmetros:
|
|
179
|
-
* - owner (obrigatório): Proprietário do repositório
|
|
180
|
-
* - repo (obrigatório): Nome do repositório
|
|
181
|
-
* - webhook_id (obrigatório): ID do webhook
|
|
182
|
-
*
|
|
183
|
-
* RECOMENDAÇÕES DE USO:
|
|
184
|
-
* - Use URLs seguras (HTTPS)
|
|
185
|
-
* - Configure eventos adequadamente
|
|
186
|
-
* - Monitore falhas de entrega
|
|
187
|
-
* - Mantenha secrets seguros
|
|
188
|
-
* - Teste webhooks antes de ativar
|
|
189
|
-
* - Configure retry adequado
|
|
190
|
-
* - Monitore logs de entrega
|
|
191
|
-
*/
|
|
192
|
-
export declare const webhooksTool: {
|
|
193
|
-
name: string;
|
|
194
|
-
description: string;
|
|
195
|
-
inputSchema: {
|
|
196
|
-
type: string;
|
|
197
|
-
properties: {
|
|
198
|
-
action: {
|
|
199
|
-
type: string;
|
|
200
|
-
enum: string[];
|
|
201
|
-
description: string;
|
|
202
|
-
};
|
|
203
|
-
repo: {
|
|
204
|
-
type: string;
|
|
205
|
-
description: string;
|
|
206
|
-
};
|
|
207
|
-
provider: {
|
|
208
|
-
type: string;
|
|
209
|
-
description: string;
|
|
210
|
-
};
|
|
211
|
-
url: {
|
|
212
|
-
type: string;
|
|
213
|
-
description: string;
|
|
214
|
-
};
|
|
215
|
-
content_type: {
|
|
216
|
-
type: string;
|
|
217
|
-
enum: string[];
|
|
218
|
-
description: string;
|
|
219
|
-
};
|
|
220
|
-
secret: {
|
|
221
|
-
type: string;
|
|
222
|
-
description: string;
|
|
223
|
-
};
|
|
224
|
-
events: {
|
|
225
|
-
type: string;
|
|
226
|
-
items: {
|
|
227
|
-
type: string;
|
|
228
|
-
};
|
|
229
|
-
description: string;
|
|
230
|
-
};
|
|
231
|
-
active: {
|
|
232
|
-
type: string;
|
|
233
|
-
description: string;
|
|
234
|
-
};
|
|
235
|
-
webhook_id: {
|
|
236
|
-
type: string;
|
|
237
|
-
description: string;
|
|
238
|
-
};
|
|
239
|
-
page: {
|
|
240
|
-
type: string;
|
|
241
|
-
description: string;
|
|
242
|
-
minimum: number;
|
|
243
|
-
};
|
|
244
|
-
limit: {
|
|
245
|
-
type: string;
|
|
246
|
-
description: string;
|
|
247
|
-
minimum: number;
|
|
248
|
-
maximum: number;
|
|
249
|
-
};
|
|
250
|
-
new_url: {
|
|
251
|
-
type: string;
|
|
252
|
-
description: string;
|
|
253
|
-
};
|
|
254
|
-
new_content_type: {
|
|
255
|
-
type: string;
|
|
256
|
-
enum: string[];
|
|
257
|
-
description: string;
|
|
258
|
-
};
|
|
259
|
-
new_secret: {
|
|
260
|
-
type: string;
|
|
261
|
-
description: string;
|
|
262
|
-
};
|
|
263
|
-
new_events: {
|
|
264
|
-
type: string;
|
|
265
|
-
items: {
|
|
266
|
-
type: string;
|
|
267
|
-
};
|
|
268
|
-
description: string;
|
|
269
|
-
};
|
|
270
|
-
new_active: {
|
|
271
|
-
type: string;
|
|
272
|
-
description: string;
|
|
273
|
-
};
|
|
274
|
-
};
|
|
275
|
-
required: string[];
|
|
276
|
-
};
|
|
277
|
-
/**
|
|
278
|
-
* Handler principal da tool webhooks
|
|
279
|
-
*
|
|
280
|
-
* FUNCIONALIDADE:
|
|
281
|
-
* - Valida entrada usando Zod schema
|
|
282
|
-
* - Roteia para método específico baseado na ação
|
|
283
|
-
* - Trata erros de forma uniforme
|
|
284
|
-
* - Retorna resultado padronizado
|
|
285
|
-
*
|
|
286
|
-
* FLUXO:
|
|
287
|
-
* 1. Validação de entrada
|
|
288
|
-
* 2. Seleção do provider
|
|
289
|
-
* 3. Roteamento por ação
|
|
290
|
-
* 4. Execução do método específico
|
|
291
|
-
* 5. Tratamento de erros
|
|
292
|
-
* 6. Retorno de resultado
|
|
293
|
-
*
|
|
294
|
-
* TRATAMENTO DE ERROS:
|
|
295
|
-
* - Validação: erro de schema
|
|
296
|
-
* - Execução: erro da operação
|
|
297
|
-
* - Roteamento: ação não suportada
|
|
298
|
-
*
|
|
299
|
-
* RECOMENDAÇÕES:
|
|
300
|
-
* - Sempre valide entrada antes de processar
|
|
301
|
-
* - Trate erros específicos adequadamente
|
|
302
|
-
* - Log detalhes de erro para debug
|
|
303
|
-
* - Retorne mensagens de erro úteis
|
|
304
|
-
*/
|
|
305
|
-
handler(input: WebhooksInput): Promise<WebhooksResult>;
|
|
306
|
-
/**
|
|
307
|
-
* Cria um novo webhook no repositório
|
|
308
|
-
*
|
|
309
|
-
* FUNCIONALIDADE:
|
|
310
|
-
* - Cria webhook com URL e configurações
|
|
311
|
-
* - Suporta diferentes tipos de conteúdo
|
|
312
|
-
* - Permite configuração de eventos
|
|
313
|
-
*
|
|
314
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
315
|
-
* - owner: Proprietário do repositório
|
|
316
|
-
* - repo: Nome do repositório
|
|
317
|
-
* - url: URL de destino do webhook
|
|
318
|
-
*
|
|
319
|
-
* PARÂMETROS OPCIONAIS:
|
|
320
|
-
* - content_type: Tipo de conteúdo (json, form) - padrão: json
|
|
321
|
-
* - secret: Secret para assinatura
|
|
322
|
-
* - events: Array de eventos a serem monitorados
|
|
323
|
-
* - active: Se webhook está ativo (padrão: true)
|
|
324
|
-
*
|
|
325
|
-
* VALIDAÇÕES:
|
|
326
|
-
* - Todos os parâmetros obrigatórios
|
|
327
|
-
* - URL deve ser válida e acessível
|
|
328
|
-
* - Usuário deve ter permissão de escrita
|
|
329
|
-
*
|
|
330
|
-
* RECOMENDAÇÕES:
|
|
331
|
-
* - Use URLs seguras (HTTPS)
|
|
332
|
-
* - Configure eventos adequadamente
|
|
333
|
-
* - Mantenha secrets seguros
|
|
334
|
-
* - Teste webhook antes de ativar
|
|
335
|
-
*/
|
|
336
|
-
createWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
337
|
-
/**
|
|
338
|
-
* Lista webhooks do repositório
|
|
339
|
-
*
|
|
340
|
-
* FUNCIONALIDADE:
|
|
341
|
-
* - Lista webhooks com paginação
|
|
342
|
-
* - Retorna informações básicas de cada webhook
|
|
343
|
-
* - Inclui status ativo e eventos configurados
|
|
344
|
-
*
|
|
345
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
346
|
-
* - owner: Proprietário do repositório
|
|
347
|
-
* - repo: Nome do repositório
|
|
348
|
-
*
|
|
349
|
-
* PARÂMETROS OPCIONAIS:
|
|
350
|
-
* - page: Página da listagem (padrão: 1)
|
|
351
|
-
* - limit: Itens por página (padrão: 30, máximo: 100)
|
|
352
|
-
*
|
|
353
|
-
* VALIDAÇÕES:
|
|
354
|
-
* - e repo obrigatórios
|
|
355
|
-
* - Page deve ser >= 1
|
|
356
|
-
* - Limit deve ser entre 1 e 100
|
|
357
|
-
*
|
|
358
|
-
* RECOMENDAÇÕES:
|
|
359
|
-
* - Use paginação para repositórios com muitos webhooks
|
|
360
|
-
* - Monitore número total de webhooks
|
|
361
|
-
* - Verifique status ativo de cada webhook
|
|
362
|
-
* - Mantenha webhooks organizados
|
|
363
|
-
*/
|
|
364
|
-
listWebhooks(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
365
|
-
/**
|
|
366
|
-
* Obtém detalhes de um webhook específico
|
|
367
|
-
*
|
|
368
|
-
* FUNCIONALIDADE:
|
|
369
|
-
* - Retorna informações completas do webhook
|
|
370
|
-
* - Inclui URL, tipo de conteúdo, eventos e status
|
|
371
|
-
* - Mostra configurações de segurança
|
|
372
|
-
*
|
|
373
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
374
|
-
* - owner: Proprietário do repositório
|
|
375
|
-
* - repo: Nome do repositório
|
|
376
|
-
* - webhook_id: ID do webhook
|
|
377
|
-
*
|
|
378
|
-
* VALIDAÇÕES:
|
|
379
|
-
* - Todos os parâmetros obrigatórios
|
|
380
|
-
* - Webhook deve existir no repositório
|
|
381
|
-
* - ID deve ser válido
|
|
382
|
-
*
|
|
383
|
-
* RECOMENDAÇÕES:
|
|
384
|
-
* - Use para obter detalhes completos
|
|
385
|
-
* - Verifique configurações de segurança
|
|
386
|
-
* - Analise eventos configurados
|
|
387
|
-
* - Monitore status ativo
|
|
388
|
-
*/
|
|
389
|
-
getWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
390
|
-
/**
|
|
391
|
-
* Atualiza um webhook existente
|
|
392
|
-
*
|
|
393
|
-
* FUNCIONALIDADE:
|
|
394
|
-
* - Atualiza campos do webhook
|
|
395
|
-
* - Suporta mudança de URL e eventos
|
|
396
|
-
* - Permite alteração de status ativo
|
|
397
|
-
*
|
|
398
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
399
|
-
* - owner: Proprietário do repositório
|
|
400
|
-
* - repo: Nome do repositório
|
|
401
|
-
* - webhook_id: ID do webhook
|
|
402
|
-
*
|
|
403
|
-
* PARÂMETROS OPCIONAIS:
|
|
404
|
-
* - new_url: Nova URL
|
|
405
|
-
* - new_content_type: Novo tipo de conteúdo
|
|
406
|
-
* - new_secret: Novo secret
|
|
407
|
-
* - new_events: Novos eventos
|
|
408
|
-
* - new_active: Novo status ativo
|
|
409
|
-
*
|
|
410
|
-
* VALIDAÇÕES:
|
|
411
|
-
* - Todos os parâmetros obrigatórios
|
|
412
|
-
* - Webhook deve existir
|
|
413
|
-
* - Pelo menos um campo deve ser atualizado
|
|
414
|
-
*
|
|
415
|
-
* RECOMENDAÇÕES:
|
|
416
|
-
* - Atualize apenas campos necessários
|
|
417
|
-
* - Use mensagens de commit descritivas
|
|
418
|
-
* - Documente mudanças importantes
|
|
419
|
-
* - Teste webhook após atualização
|
|
420
|
-
*/
|
|
421
|
-
updateWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
422
|
-
/**
|
|
423
|
-
* Deleta um webhook do repositório
|
|
424
|
-
*
|
|
425
|
-
* FUNCIONALIDADE:
|
|
426
|
-
* - Remove webhook especificado
|
|
427
|
-
* - Confirma exclusão bem-sucedida
|
|
428
|
-
* - Limpa configurações associadas
|
|
429
|
-
*
|
|
430
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
431
|
-
* - owner: Proprietário do repositório
|
|
432
|
-
* - repo: Nome do repositório
|
|
433
|
-
* - webhook_id: ID do webhook
|
|
434
|
-
*
|
|
435
|
-
* VALIDAÇÕES:
|
|
436
|
-
* - Todos os parâmetros obrigatórios
|
|
437
|
-
* - Webhook deve existir
|
|
438
|
-
* - Usuário deve ter permissão de exclusão
|
|
439
|
-
*
|
|
440
|
-
* RECOMENDAÇÕES:
|
|
441
|
-
* - Confirme exclusão antes de executar
|
|
442
|
-
* - Verifique se webhook não está sendo usado
|
|
443
|
-
* - Mantenha backup se necessário
|
|
444
|
-
* - Documente motivo da exclusão
|
|
445
|
-
*/
|
|
446
|
-
deleteWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
447
|
-
/**
|
|
448
|
-
* Testa um webhook existente
|
|
449
|
-
*
|
|
450
|
-
* FUNCIONALIDADE:
|
|
451
|
-
* - Envia payload de teste para webhook
|
|
452
|
-
* - Verifica conectividade e resposta
|
|
453
|
-
* - Retorna resultado do teste
|
|
454
|
-
*
|
|
455
|
-
* PARÂMETROS OBRIGATÓRIOS:
|
|
456
|
-
* - owner: Proprietário do repositório
|
|
457
|
-
* - repo: Nome do repositório
|
|
458
|
-
* - webhook_id: ID do webhook
|
|
459
|
-
*
|
|
460
|
-
* VALIDAÇÕES:
|
|
461
|
-
* - Todos os parâmetros obrigatórios
|
|
462
|
-
* - Webhook deve existir
|
|
463
|
-
* - Webhook deve estar ativo
|
|
464
|
-
*
|
|
465
|
-
* RECOMENDAÇÕES:
|
|
466
|
-
* - Teste webhooks após criação
|
|
467
|
-
* - Monitore respostas de teste
|
|
468
|
-
* - Verifique logs de entrega
|
|
469
|
-
* - Configure retry adequado
|
|
470
|
-
*/
|
|
471
|
-
testWebhook(params: WebhooksInput, provider: VcsOperations, owner: string): Promise<WebhooksResult>;
|
|
472
|
-
};
|
|
473
|
-
export {};
|
|
474
|
-
//# sourceMappingURL=git-webhooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"git-webhooks.d.ts","sourceRoot":"","sources":["../../src/tools/git-webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAyB,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAG7E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BvB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;;;;;GASG;AACH,QAAA,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAMxB,CAAC;AAEH,MAAM,MAAM,cAAc,G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