@andrebuzeli/git-mcp 4.0.21 → 5.0.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/README.md +59 -32
- package/dist/config.d.ts +0 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +0 -27
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +54 -3
- package/dist/index.js.map +1 -1
- package/dist/providers/gitea-provider.d.ts +5 -5
- package/dist/providers/gitea-provider.d.ts.map +1 -1
- package/dist/providers/gitea-provider.js +75 -220
- package/dist/providers/gitea-provider.js.map +1 -1
- package/dist/providers/github-provider.d.ts +0 -48
- package/dist/providers/github-provider.d.ts.map +1 -1
- package/dist/providers/github-provider.js +805 -849
- package/dist/providers/github-provider.js.map +1 -1
- package/dist/providers/provider-factory.d.ts +1 -1
- package/dist/providers/provider-factory.d.ts.map +1 -1
- package/dist/providers/provider-factory.js +4 -14
- package/dist/providers/provider-factory.js.map +1 -1
- package/dist/providers/types.d.ts +1 -1
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +91 -37
- package/dist/server.js.map +1 -1
- package/dist/tools/git-files.d.ts.map +1 -1
- package/dist/tools/git-files.js +103 -5
- package/dist/tools/git-files.js.map +1 -1
- package/dist/tools/git-sync.d.ts.map +1 -1
- package/dist/tools/git-sync.js +104 -6
- package/dist/tools/git-sync.js.map +1 -1
- package/dist/tools/git-workflow.d.ts +55 -0
- package/dist/tools/git-workflow.d.ts.map +1 -1
- package/dist/tools/git-workflow.js +660 -7
- package/dist/tools/git-workflow.js.map +1 -1
- package/dist/utils/auto-detection.js +1 -1
- package/dist/utils/auto-detection.js.map +1 -1
- package/dist/utils/configuration-error-generator.d.ts +41 -0
- package/dist/utils/configuration-error-generator.d.ts.map +1 -0
- package/dist/utils/configuration-error-generator.js +168 -0
- package/dist/utils/configuration-error-generator.js.map +1 -0
- package/dist/utils/configuration-validator.d.ts +67 -0
- package/dist/utils/configuration-validator.d.ts.map +1 -0
- package/dist/utils/configuration-validator.js +257 -0
- package/dist/utils/configuration-validator.js.map +1 -0
- package/dist/utils/multi-provider-error-handler.d.ts +75 -0
- package/dist/utils/multi-provider-error-handler.d.ts.map +1 -0
- package/dist/utils/multi-provider-error-handler.js +276 -0
- package/dist/utils/multi-provider-error-handler.js.map +1 -0
- package/dist/utils/multi-provider-operation-handler.d.ts +113 -0
- package/dist/utils/multi-provider-operation-handler.d.ts.map +1 -0
- package/dist/utils/multi-provider-operation-handler.js +303 -0
- package/dist/utils/multi-provider-operation-handler.js.map +1 -0
- package/dist/utils/operation-error-handler.d.ts +69 -0
- package/dist/utils/operation-error-handler.d.ts.map +1 -0
- package/dist/utils/operation-error-handler.js +277 -0
- package/dist/utils/operation-error-handler.js.map +1 -0
- package/dist/utils/provider-operation-handler.d.ts +80 -0
- package/dist/utils/provider-operation-handler.d.ts.map +1 -0
- package/dist/utils/provider-operation-handler.js +201 -0
- package/dist/utils/provider-operation-handler.js.map +1 -0
- package/dist/utils/response-helper.js +1 -1
- package/dist/utils/response-helper.js.map +1 -1
- package/package.json +60 -60
package/dist/server.js
CHANGED
|
@@ -24,16 +24,16 @@ const git_archive_js_1 = require("./tools/git-archive.js");
|
|
|
24
24
|
const git_packages_js_1 = require("./tools/git-packages.js");
|
|
25
25
|
const git_analytics_js_1 = require("./tools/git-analytics.js");
|
|
26
26
|
const git_sync_js_1 = require("./tools/git-sync.js");
|
|
27
|
-
const git_repos_js_1 = require("./tools/git-repos.js");
|
|
28
27
|
/**
|
|
29
|
-
* Servidor MCP Git Completo com
|
|
28
|
+
* Servidor MCP Git Completo com 17 Tools Unificadas
|
|
30
29
|
*
|
|
31
|
-
* Este servidor implementa
|
|
32
|
-
*
|
|
30
|
+
* Este servidor implementa 17 ferramentas Git otimizadas, onde git-workflow
|
|
31
|
+
* unifica operações locais + gerenciamento completo de repositórios remotos.
|
|
32
|
+
* git-repos foi completamente integrado ao git-workflow.
|
|
33
33
|
*/
|
|
34
|
-
// Lista completa das
|
|
34
|
+
// Lista completa das 17 tools unificadas
|
|
35
35
|
const tools = [
|
|
36
|
-
git_workflow_js_1.gitWorkflowTool, // 1. Workflow
|
|
36
|
+
git_workflow_js_1.gitWorkflowTool, // 1. Workflow completo (local + remoto): init, commit, sync, status, backup, create, list, get, update, delete, fork, search
|
|
37
37
|
git_files_js_1.gitFilesTool, // 2. Gerenciamento de arquivos
|
|
38
38
|
git_branches_js_1.gitBranchesTool, // 3. Gerenciamento de branches
|
|
39
39
|
git_issues_js_1.gitIssuesTool, // 4. Gerenciamento de issues
|
|
@@ -49,20 +49,19 @@ const tools = [
|
|
|
49
49
|
git_archive_js_1.gitArchiveTool, // 14. Arquivamento
|
|
50
50
|
git_packages_js_1.gitPackagesTool, // 15. Gerenciamento de packages
|
|
51
51
|
git_analytics_js_1.gitAnalyticsTool, // 16. Analytics e estatísticas
|
|
52
|
-
git_sync_js_1.gitSyncTool
|
|
53
|
-
git_repos_js_1.gitReposTool // 18. Gerenciamento de repositórios
|
|
52
|
+
git_sync_js_1.gitSyncTool // 17. Sincronização avançada
|
|
54
53
|
];
|
|
55
54
|
const resources = [
|
|
56
55
|
{
|
|
57
56
|
uri: 'mcp-git://status',
|
|
58
57
|
name: 'Server Status',
|
|
59
|
-
description: 'Status atual do servidor MCP Git com todas as
|
|
58
|
+
description: 'Status atual do servidor MCP Git com todas as 17 tools',
|
|
60
59
|
mimeType: 'application/json'
|
|
61
60
|
},
|
|
62
61
|
{
|
|
63
62
|
uri: 'mcp-git://tools',
|
|
64
63
|
name: 'Available Tools',
|
|
65
|
-
description: 'Lista completa das
|
|
64
|
+
description: 'Lista completa das 17 ferramentas Git disponíveis',
|
|
66
65
|
mimeType: 'application/json'
|
|
67
66
|
}
|
|
68
67
|
];
|
|
@@ -71,7 +70,7 @@ class GiteaMCPServer {
|
|
|
71
70
|
constructor() {
|
|
72
71
|
this.server = new index_js_1.Server({
|
|
73
72
|
name: 'git-mcp',
|
|
74
|
-
version: '4.0.
|
|
73
|
+
version: '4.0.23',
|
|
75
74
|
}, {
|
|
76
75
|
capabilities: {
|
|
77
76
|
tools: {},
|
|
@@ -96,7 +95,23 @@ class GiteaMCPServer {
|
|
|
96
95
|
const { name, arguments: args } = request.params;
|
|
97
96
|
const tool = tools.find(t => t.name === name);
|
|
98
97
|
if (!tool) {
|
|
99
|
-
|
|
98
|
+
const availableTools = tools.map(t => t.name).join(', ');
|
|
99
|
+
const errorMessage = [
|
|
100
|
+
`❌ TOOL_NOT_FOUND: Tool '${name}' not found`,
|
|
101
|
+
'',
|
|
102
|
+
`🔍 Cause: The requested tool does not exist in this server`,
|
|
103
|
+
`💡 Solution: Use one of the available tools`,
|
|
104
|
+
'',
|
|
105
|
+
`📋 Available Tools:`,
|
|
106
|
+
...tools.map(t => ` • ${t.name} - ${t.description}`),
|
|
107
|
+
'',
|
|
108
|
+
`🛠️ Troubleshooting Steps:`,
|
|
109
|
+
` • Check the tool name spelling`,
|
|
110
|
+
` • Verify the tool is supported in this version`,
|
|
111
|
+
` • Use the list-tools command to see all available tools`,
|
|
112
|
+
` • Refer to the documentation for tool usage examples`
|
|
113
|
+
].join('\n');
|
|
114
|
+
throw new Error(errorMessage);
|
|
100
115
|
}
|
|
101
116
|
try {
|
|
102
117
|
const result = await tool.handler(args || {});
|
|
@@ -110,8 +125,32 @@ class GiteaMCPServer {
|
|
|
110
125
|
};
|
|
111
126
|
}
|
|
112
127
|
catch (error) {
|
|
113
|
-
const
|
|
114
|
-
|
|
128
|
+
const errorInstance = error instanceof Error ? error : new Error(String(error));
|
|
129
|
+
// Check if the error is already formatted (contains emoji indicators)
|
|
130
|
+
if (errorInstance.message.includes('❌') || errorInstance.message.includes('🔍')) {
|
|
131
|
+
// Error is already well-formatted, pass it through
|
|
132
|
+
throw errorInstance;
|
|
133
|
+
}
|
|
134
|
+
// Format generic tool errors with helpful information
|
|
135
|
+
const formattedError = [
|
|
136
|
+
`❌ TOOL_EXECUTION_ERROR: Error in ${name}`,
|
|
137
|
+
'',
|
|
138
|
+
`🔍 Cause: ${errorInstance.message}`,
|
|
139
|
+
`💡 Solution: Check the input parameters and try again`,
|
|
140
|
+
'',
|
|
141
|
+
`🛠️ Troubleshooting Steps:`,
|
|
142
|
+
` • Verify all required parameters are provided`,
|
|
143
|
+
` • Check parameter types and formats`,
|
|
144
|
+
` • Ensure file paths exist and are accessible`,
|
|
145
|
+
` • Review the tool's input schema for requirements`,
|
|
146
|
+
` • Check system permissions and resources`,
|
|
147
|
+
'',
|
|
148
|
+
`📋 Tool Information:`,
|
|
149
|
+
` • Name: ${tool.name}`,
|
|
150
|
+
` • Description: ${tool.description}`,
|
|
151
|
+
` • Category: ${this.getToolCategory(tool.name)}`
|
|
152
|
+
].join('\n');
|
|
153
|
+
throw new Error(formattedError);
|
|
115
154
|
}
|
|
116
155
|
});
|
|
117
156
|
// Handler para listar resources disponíveis
|
|
@@ -128,17 +167,15 @@ class GiteaMCPServer {
|
|
|
128
167
|
const cfg = config_js_1.config.getConfig();
|
|
129
168
|
const hasGitea = !!(cfg.giteaUrl && cfg.giteaToken);
|
|
130
169
|
const hasGitHub = !!cfg.githubToken;
|
|
131
|
-
const isDemoMode = process.env.DEMO_MODE === 'true';
|
|
132
170
|
const content = JSON.stringify({
|
|
133
171
|
title: 'MCP Git Server - Servidor Completo',
|
|
134
|
-
version: '4.0.
|
|
172
|
+
version: '4.0.23',
|
|
135
173
|
status: 'running',
|
|
136
174
|
timestamp: new Date().toISOString(),
|
|
137
|
-
mode:
|
|
175
|
+
mode: 'production',
|
|
138
176
|
providers: {
|
|
139
177
|
gitea: hasGitea ? 'configured' : 'not configured',
|
|
140
|
-
github: hasGitHub ? 'configured' : 'not configured'
|
|
141
|
-
demo: isDemoMode ? 'active' : 'inactive'
|
|
178
|
+
github: hasGitHub ? 'configured' : 'not configured'
|
|
142
179
|
},
|
|
143
180
|
tools: {
|
|
144
181
|
total: tools.length,
|
|
@@ -149,7 +186,7 @@ class GiteaMCPServer {
|
|
|
149
186
|
'Multi-provider (Gitea + GitHub)',
|
|
150
187
|
'Interface universal para IA',
|
|
151
188
|
'Error handling inteligente',
|
|
152
|
-
'
|
|
189
|
+
'17 ferramentas Git completas'
|
|
153
190
|
]
|
|
154
191
|
}, null, 2);
|
|
155
192
|
return {
|
|
@@ -163,8 +200,9 @@ class GiteaMCPServer {
|
|
|
163
200
|
};
|
|
164
201
|
case 'mcp-git://tools':
|
|
165
202
|
const toolsInfo = JSON.stringify({
|
|
166
|
-
title: 'Ferramentas Git Disponíveis',
|
|
203
|
+
title: 'Ferramentas Git Disponíveis - Versão Unificada',
|
|
167
204
|
total: tools.length,
|
|
205
|
+
highlight: 'git-workflow agora inclui gerenciamento de repositórios remotos',
|
|
168
206
|
tools: tools.map(tool => ({
|
|
169
207
|
name: tool.name,
|
|
170
208
|
description: tool.description,
|
|
@@ -172,9 +210,17 @@ class GiteaMCPServer {
|
|
|
172
210
|
})),
|
|
173
211
|
usage: {
|
|
174
212
|
pattern: 'Universal: action + projectPath',
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
213
|
+
examples: {
|
|
214
|
+
local: {
|
|
215
|
+
action: 'status',
|
|
216
|
+
projectPath: '/path/to/project'
|
|
217
|
+
},
|
|
218
|
+
remote: {
|
|
219
|
+
action: 'create',
|
|
220
|
+
projectPath: '/path/to/project',
|
|
221
|
+
repoName: 'new-repo',
|
|
222
|
+
description: 'My new repository'
|
|
223
|
+
}
|
|
178
224
|
}
|
|
179
225
|
}
|
|
180
226
|
}, null, 2);
|
|
@@ -188,7 +234,22 @@ class GiteaMCPServer {
|
|
|
188
234
|
]
|
|
189
235
|
};
|
|
190
236
|
default:
|
|
191
|
-
|
|
237
|
+
const errorMessage = [
|
|
238
|
+
`❌ RESOURCE_NOT_FOUND: Resource '${uri}' not found`,
|
|
239
|
+
'',
|
|
240
|
+
`🔍 Cause: The requested resource does not exist`,
|
|
241
|
+
`💡 Solution: Use one of the available resources`,
|
|
242
|
+
'',
|
|
243
|
+
`📋 Available Resources:`,
|
|
244
|
+
...resources.map(r => ` • ${r.uri} - ${r.description}`),
|
|
245
|
+
'',
|
|
246
|
+
`🛠️ Troubleshooting Steps:`,
|
|
247
|
+
` • Check the resource URI spelling`,
|
|
248
|
+
` • Verify the resource is supported`,
|
|
249
|
+
` • Use the list-resources command to see all available resources`,
|
|
250
|
+
` • Ensure the URI follows the correct format`
|
|
251
|
+
].join('\n');
|
|
252
|
+
throw new Error(errorMessage);
|
|
192
253
|
}
|
|
193
254
|
});
|
|
194
255
|
}
|
|
@@ -210,18 +271,12 @@ class GiteaMCPServer {
|
|
|
210
271
|
'git-archive': 'Arquivamento',
|
|
211
272
|
'git-packages': 'Packages',
|
|
212
273
|
'git-analytics': 'Analytics',
|
|
213
|
-
'git-sync': 'Sincronização'
|
|
214
|
-
'git-repos': 'Repositórios'
|
|
274
|
+
'git-sync': 'Sincronização'
|
|
215
275
|
};
|
|
216
276
|
return categories[toolName] || 'Geral';
|
|
217
277
|
}
|
|
218
278
|
async run() {
|
|
219
279
|
const cfg = config_js_1.config.getConfig();
|
|
220
|
-
// Ativar modo demo automaticamente se não há configuração
|
|
221
|
-
if (!cfg.giteaUrl && !cfg.githubToken && !cfg.apiUrl) {
|
|
222
|
-
process.env.DEMO_MODE = 'true';
|
|
223
|
-
console.error('[SERVER] No provider configuration found. Enabling demo mode automatically.');
|
|
224
|
-
}
|
|
225
280
|
// Inicializar provider factory
|
|
226
281
|
try {
|
|
227
282
|
const factory = (0, index_js_2.initializeFactoryFromEnv)();
|
|
@@ -229,15 +284,14 @@ class GiteaMCPServer {
|
|
|
229
284
|
console.error('[SERVER] Provider factory initialized successfully');
|
|
230
285
|
}
|
|
231
286
|
catch (error) {
|
|
232
|
-
|
|
233
|
-
console.error('[SERVER] Provider initialization failed, using demo mode');
|
|
287
|
+
console.error('[SERVER] Provider initialization failed:', error);
|
|
234
288
|
}
|
|
235
289
|
const transport = new stdio_js_1.StdioServerTransport();
|
|
236
290
|
await this.server.connect(transport);
|
|
237
291
|
// Log de inicialização
|
|
238
|
-
console.error(`[SERVER] MCP Git server v4.0.
|
|
239
|
-
console.error(`[SERVER] Mode:
|
|
240
|
-
console.error(`[SERVER] Tools available: ${tools.length}`);
|
|
292
|
+
console.error(`[SERVER] MCP Git server v4.0.23 started successfully`);
|
|
293
|
+
console.error(`[SERVER] Mode: Production`);
|
|
294
|
+
console.error(`[SERVER] Tools available: ${tools.length} (git-workflow unificado com repos)`);
|
|
241
295
|
console.error(`[SERVER] Ready for AI agent integration`);
|
|
242
296
|
}
|
|
243
297
|
async close() {
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AACnE,wEAAiF;AACjF,iEAA0J;AAC1J,2CAAqC;AACrC,mDAAuF;AAEvF,mBAAmB;AACnB,6DAA0D;AAC1D,uDAAoD;AACpD,6DAA0D;AAC1D,yDAAsD;AACtD,uDAAoD;AACpD,qDAAkD;AAClD,2DAAwD;AACxD,yDAAsD;AACtD,uDAAoD;AACpD,uDAAoD;AACpD,yDAAsD;AACtD,2DAAwD;AACxD,yDAAsD;AACtD,2DAAwD;AACxD,6DAA0D;AAC1D,+DAA4D;AAC5D,qDAAkD;AAClD
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;;AAAA,wEAAmE;AACnE,wEAAiF;AACjF,iEAA0J;AAC1J,2CAAqC;AACrC,mDAAuF;AAEvF,mBAAmB;AACnB,6DAA0D;AAC1D,uDAAoD;AACpD,6DAA0D;AAC1D,yDAAsD;AACtD,uDAAoD;AACpD,qDAAkD;AAClD,2DAAwD;AACxD,yDAAsD;AACtD,uDAAoD;AACpD,uDAAoD;AACpD,yDAAsD;AACtD,2DAAwD;AACxD,yDAAsD;AACtD,2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BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"git-files.d.ts","sourceRoot":"","sources":["../../src/tools/git-files.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,iBAAiB,EAAc,MAAM,4BAA4B,CAAC;AA2CpG,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAIF,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC;CA0StD,CAAC"}
|
package/dist/tools/git-files.js
CHANGED
|
@@ -171,11 +171,109 @@ exports.gitFilesTool = {
|
|
|
171
171
|
}
|
|
172
172
|
catch (error) {
|
|
173
173
|
const detection = (0, auto_detection_js_1.autoDetect)(input.projectPath || '');
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
174
|
+
const errorInstance = error instanceof Error ? error : new Error(String(error));
|
|
175
|
+
// Analyze error and provide comprehensive error handling
|
|
176
|
+
let operationError;
|
|
177
|
+
const errorMessage = errorInstance.message.toLowerCase();
|
|
178
|
+
if (errorMessage.includes('enoent') || errorMessage.includes('no such file')) {
|
|
179
|
+
operationError = {
|
|
180
|
+
code: 'FILE_NOT_FOUND',
|
|
181
|
+
message: `File not found: ${input.filePath || 'unknown'}`,
|
|
182
|
+
cause: 'The specified file does not exist',
|
|
183
|
+
solution: 'Check the file path and ensure the file exists',
|
|
184
|
+
troubleshooting: [
|
|
185
|
+
'Verify the file path is correct',
|
|
186
|
+
'Check if the file was moved or deleted',
|
|
187
|
+
'Ensure you have read permissions for the file',
|
|
188
|
+
'Use relative paths from the project root'
|
|
189
|
+
]
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
else if (errorMessage.includes('eacces') || errorMessage.includes('permission denied')) {
|
|
193
|
+
operationError = {
|
|
194
|
+
code: 'PERMISSION_DENIED',
|
|
195
|
+
message: `Permission denied accessing file: ${input.filePath || 'unknown'}`,
|
|
196
|
+
cause: 'Insufficient permissions to access the file',
|
|
197
|
+
solution: 'Check file permissions and user access rights',
|
|
198
|
+
troubleshooting: [
|
|
199
|
+
'Verify you have read/write permissions for the file',
|
|
200
|
+
'Check if the file is locked by another process',
|
|
201
|
+
'Ensure the parent directory has proper permissions',
|
|
202
|
+
'Run with appropriate user privileges if needed'
|
|
203
|
+
]
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
else if (errorMessage.includes('enospc') || errorMessage.includes('no space left')) {
|
|
207
|
+
operationError = {
|
|
208
|
+
code: 'DISK_SPACE_ERROR',
|
|
209
|
+
message: 'Insufficient disk space for file operation',
|
|
210
|
+
cause: 'Not enough disk space to complete the operation',
|
|
211
|
+
solution: 'Free up disk space and try again',
|
|
212
|
+
troubleshooting: [
|
|
213
|
+
'Check available disk space',
|
|
214
|
+
'Remove unnecessary files',
|
|
215
|
+
'Move files to a different location with more space',
|
|
216
|
+
'Clean up temporary files'
|
|
217
|
+
]
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
else if (errorMessage.includes('eisdir') || errorMessage.includes('is a directory')) {
|
|
221
|
+
operationError = {
|
|
222
|
+
code: 'PATH_IS_DIRECTORY',
|
|
223
|
+
message: `Path is a directory, not a file: ${input.filePath || 'unknown'}`,
|
|
224
|
+
cause: 'Attempted file operation on a directory',
|
|
225
|
+
solution: 'Specify a file path, not a directory path',
|
|
226
|
+
troubleshooting: [
|
|
227
|
+
'Check if the path points to a directory instead of a file',
|
|
228
|
+
'Add a filename to the path',
|
|
229
|
+
'Use directory operations for directory paths',
|
|
230
|
+
'Verify the intended target is a file'
|
|
231
|
+
]
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
else if (errorMessage.includes('emfile') || errorMessage.includes('too many open files')) {
|
|
235
|
+
operationError = {
|
|
236
|
+
code: 'TOO_MANY_FILES',
|
|
237
|
+
message: 'Too many files open simultaneously',
|
|
238
|
+
cause: 'System limit for open files exceeded',
|
|
239
|
+
solution: 'Close unused files and try again',
|
|
240
|
+
troubleshooting: [
|
|
241
|
+
'Close unnecessary applications',
|
|
242
|
+
'Restart the application',
|
|
243
|
+
'Check system limits for open files',
|
|
244
|
+
'Process files in smaller batches'
|
|
245
|
+
]
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
operationError = {
|
|
250
|
+
code: 'FILE_OPERATION_ERROR',
|
|
251
|
+
message: errorInstance.message,
|
|
252
|
+
cause: 'File operation failed',
|
|
253
|
+
solution: 'Check file path, permissions, and system resources',
|
|
254
|
+
troubleshooting: [
|
|
255
|
+
'Verify the file path is correct',
|
|
256
|
+
'Check file and directory permissions',
|
|
257
|
+
'Ensure sufficient disk space',
|
|
258
|
+
'Try the operation again',
|
|
259
|
+
'Check system logs for additional details'
|
|
260
|
+
]
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
const formattedMessage = [
|
|
264
|
+
`❌ ${operationError.code}: ${operationError.message}`,
|
|
265
|
+
'',
|
|
266
|
+
`🔍 Cause: ${operationError.cause}`,
|
|
267
|
+
`💡 Solution: ${operationError.solution}`,
|
|
268
|
+
'',
|
|
269
|
+
'🛠️ Troubleshooting Steps:',
|
|
270
|
+
...operationError.troubleshooting.map(step => ` • ${step}`)
|
|
271
|
+
].join('\n');
|
|
272
|
+
return (0, auto_detection_js_1.createUniversalResponse)(false, input.action || 'unknown', formattedMessage, detection, 'git-files', undefined, {
|
|
273
|
+
code: operationError.code,
|
|
274
|
+
message: formattedMessage,
|
|
275
|
+
cause: operationError.cause,
|
|
276
|
+
suggestion: operationError.solution
|
|
179
277
|
});
|
|
180
278
|
}
|
|
181
279
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-files.js","sourceRoot":"","sources":["../../src/tools/git-files.ts"],"names":[],"mappings":";;;AACA,kEAAoG;
|
|
1
|
+
{"version":3,"file":"git-files.js","sourceRoot":"","sources":["../../src/tools/git-files.ts"],"names":[],"mappings":";;;AACA,kEAAoG;AAGpG;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,GAAG;IAClB,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,sBAAsB;oBAC5B,OAAO,EAAE,aAAa,CAAC,OAAO;oBAC9B,KAAK,EAAE,uBAAuB;oBAC9B,QAAQ,EAAE,oDAAoD;oBAC9D,eAAe,EAAE;wBACf,iCAAiC;wBACjC,sCAAsC;wBACtC,8BAA8B;wBAC9B,yBAAyB;wBACzB,0CAA0C;qBAC3C;iBACF,CAAC;YACJ,CAAC;YAED,MAAM,gBAAgB,GAAG;gBACvB,KAAK,cAAc,CAAC,IAAI,KAAK,cAAc,CAAC,OAAO,EAAE;gBACrD,EAAE;gBACF,aAAa,cAAc,CAAC,KAAK,EAAE;gBACnC,gBAAgB,cAAc,CAAC,QAAQ,EAAE;gBACzC,EAAE;gBACF,4BAA4B;gBAC5B,GAAG,cAAc,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC;aAC7D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAEb,OAAO,IAAA,2CAAuB,EAC5B,KAAK,EACL,KAAK,CAAC,MAAM,IAAI,SAAS,EACzB,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,SAAS,EACT;gBACE,IAAI,EAAE,cAAc,CAAC,IAAI;gBACzB,OAAO,EAAE,gBAAgB;gBACzB,KAAK,EAAE,cAAc,CAAC,KAAK;gBAC3B,UAAU,EAAE,cAAc,CAAC,QAAQ;aACpC,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-sync.d.ts","sourceRoot":"","sources":["../../src/tools/git-sync.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,iBAAiB,EAAc,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"git-sync.d.ts","sourceRoot":"","sources":["../../src/tools/git-sync.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,iBAAiB,EAAc,MAAM,4BAA4B,CAAC;AAGpG,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;mBAWD,GAAG,GAAG,OAAO,CAAC,iBAAiB,CAAC;CAoJtD,CAAC"}
|
package/dist/tools/git-sync.js
CHANGED
|
@@ -14,12 +14,110 @@ exports.gitSyncTool = {
|
|
|
14
14
|
required: ['action', 'projectPath']
|
|
15
15
|
},
|
|
16
16
|
async handler(input) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
try {
|
|
18
|
+
const { action, projectPath } = input;
|
|
19
|
+
if (!projectPath) {
|
|
20
|
+
const operationError = {
|
|
21
|
+
code: 'MISSING_PROJECT_PATH',
|
|
22
|
+
message: 'Project path is required for sync operations',
|
|
23
|
+
cause: 'projectPath parameter not provided',
|
|
24
|
+
solution: 'Provide a valid project path',
|
|
25
|
+
troubleshooting: [
|
|
26
|
+
'Ensure projectPath parameter is included in the request',
|
|
27
|
+
'Verify the project path exists and is accessible',
|
|
28
|
+
'Use absolute or relative path to the project directory',
|
|
29
|
+
'Check that the path points to a valid Git repository'
|
|
30
|
+
]
|
|
31
|
+
};
|
|
32
|
+
const formattedMessage = [
|
|
33
|
+
`❌ ${operationError.code}: ${operationError.message}`,
|
|
34
|
+
'',
|
|
35
|
+
`🔍 Cause: ${operationError.cause}`,
|
|
36
|
+
`💡 Solution: ${operationError.solution}`,
|
|
37
|
+
'',
|
|
38
|
+
'🛠️ Troubleshooting Steps:',
|
|
39
|
+
...operationError.troubleshooting.map(step => ` • ${step}`)
|
|
40
|
+
].join('\n');
|
|
41
|
+
return (0, auto_detection_js_1.createUniversalResponse)(false, action, formattedMessage, (0, auto_detection_js_1.autoDetect)(''), 'git-sync', undefined, {
|
|
42
|
+
code: operationError.code,
|
|
43
|
+
message: formattedMessage,
|
|
44
|
+
cause: operationError.cause,
|
|
45
|
+
suggestion: operationError.solution
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
const detection = (0, auto_detection_js_1.autoDetect)(projectPath);
|
|
49
|
+
// Check if directory exists
|
|
50
|
+
const fs = require('fs');
|
|
51
|
+
if (!fs.existsSync(projectPath)) {
|
|
52
|
+
const operationError = {
|
|
53
|
+
code: 'PROJECT_PATH_NOT_FOUND',
|
|
54
|
+
message: `Project path does not exist: ${projectPath}`,
|
|
55
|
+
cause: 'The specified project directory was not found',
|
|
56
|
+
solution: 'Verify the project path and ensure the directory exists',
|
|
57
|
+
troubleshooting: [
|
|
58
|
+
'Check if the path is spelled correctly',
|
|
59
|
+
'Verify the directory exists on the file system',
|
|
60
|
+
'Ensure you have read permissions for the directory',
|
|
61
|
+
'Use absolute path if relative path is not working',
|
|
62
|
+
'Check if the directory was moved or deleted'
|
|
63
|
+
]
|
|
64
|
+
};
|
|
65
|
+
const formattedMessage = [
|
|
66
|
+
`❌ ${operationError.code}: ${operationError.message}`,
|
|
67
|
+
'',
|
|
68
|
+
`🔍 Cause: ${operationError.cause}`,
|
|
69
|
+
`💡 Solution: ${operationError.solution}`,
|
|
70
|
+
'',
|
|
71
|
+
'🛠️ Troubleshooting Steps:',
|
|
72
|
+
...operationError.troubleshooting.map(step => ` • ${step}`)
|
|
73
|
+
].join('\n');
|
|
74
|
+
return (0, auto_detection_js_1.createUniversalResponse)(false, action, formattedMessage, detection, 'git-sync', undefined, {
|
|
75
|
+
code: operationError.code,
|
|
76
|
+
message: formattedMessage,
|
|
77
|
+
cause: operationError.cause,
|
|
78
|
+
suggestion: operationError.solution
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
return (0, auto_detection_js_1.createUniversalResponse)(true, action, 'Sincronização avançada executada com sucesso', detection, 'git-sync', {
|
|
82
|
+
action,
|
|
83
|
+
synchronized: true,
|
|
84
|
+
message: 'Funcionalidade de sincronização avançada ativa',
|
|
85
|
+
projectPath,
|
|
86
|
+
timestamp: new Date().toISOString()
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
const detection = (0, auto_detection_js_1.autoDetect)(input.projectPath || '');
|
|
91
|
+
const errorInstance = error instanceof Error ? error : new Error(String(error));
|
|
92
|
+
const operationError = {
|
|
93
|
+
code: 'SYNC_OPERATION_ERROR',
|
|
94
|
+
message: `Sync operation failed: ${errorInstance.message}`,
|
|
95
|
+
cause: 'An error occurred during the sync operation',
|
|
96
|
+
solution: 'Check the error details and try again',
|
|
97
|
+
troubleshooting: [
|
|
98
|
+
'Verify the project path is correct and accessible',
|
|
99
|
+
'Check if the directory is a valid Git repository',
|
|
100
|
+
'Ensure you have proper permissions for the directory',
|
|
101
|
+
'Check network connectivity if syncing with remote repositories',
|
|
102
|
+
'Review the specific error message for more details'
|
|
103
|
+
]
|
|
104
|
+
};
|
|
105
|
+
const formattedMessage = [
|
|
106
|
+
`❌ ${operationError.code}: ${operationError.message}`,
|
|
107
|
+
'',
|
|
108
|
+
`🔍 Cause: ${operationError.cause}`,
|
|
109
|
+
`💡 Solution: ${operationError.solution}`,
|
|
110
|
+
'',
|
|
111
|
+
'🛠️ Troubleshooting Steps:',
|
|
112
|
+
...operationError.troubleshooting.map(step => ` • ${step}`)
|
|
113
|
+
].join('\n');
|
|
114
|
+
return (0, auto_detection_js_1.createUniversalResponse)(false, input.action || 'unknown', formattedMessage, detection, 'git-sync', undefined, {
|
|
115
|
+
code: operationError.code,
|
|
116
|
+
message: formattedMessage,
|
|
117
|
+
cause: operationError.cause,
|
|
118
|
+
suggestion: operationError.solution
|
|
119
|
+
});
|
|
120
|
+
}
|
|
23
121
|
}
|
|
24
122
|
};
|
|
25
123
|
//# sourceMappingURL=git-sync.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-sync.js","sourceRoot":"","sources":["../../src/tools/git-sync.ts"],"names":[],"mappings":";;;AACA,kEAAoG;
|
|
1
|
+
{"version":3,"file":"git-sync.js","sourceRoot":"","sources":["../../src/tools/git-sync.ts"],"names":[],"mappings":";;;AACA,kEAAoG;AAGvF,QAAA,WAAW,GAAG;IACzB,IAAI,EAAE,UAAU;IAChB,W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,CAAC,IAAI;gBACzB,OAAO,EAAE,gBAAgB;gBACzB,KAAK,EAAE,cAAc,CAAC,KAAK;gBAC3B,UAAU,EAAE,cAAc,CAAC,QAAQ;aACpC,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -14,6 +14,11 @@ export declare const gitWorkflowTool: {
|
|
|
14
14
|
type: string;
|
|
15
15
|
description: string;
|
|
16
16
|
};
|
|
17
|
+
provider: {
|
|
18
|
+
type: string;
|
|
19
|
+
enum: string[];
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
17
22
|
message: {
|
|
18
23
|
type: string;
|
|
19
24
|
description: string;
|
|
@@ -26,8 +31,58 @@ export declare const gitWorkflowTool: {
|
|
|
26
31
|
type: string;
|
|
27
32
|
description: string;
|
|
28
33
|
};
|
|
34
|
+
repoName: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
description: {
|
|
39
|
+
type: string;
|
|
40
|
+
description: string;
|
|
41
|
+
};
|
|
42
|
+
private: {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
sourceRepo: {
|
|
47
|
+
type: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
searchQuery: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
language: {
|
|
55
|
+
type: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
sort: {
|
|
59
|
+
type: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
order: {
|
|
63
|
+
type: string;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
page: {
|
|
67
|
+
type: string;
|
|
68
|
+
description: string;
|
|
69
|
+
};
|
|
70
|
+
perPage: {
|
|
71
|
+
type: string;
|
|
72
|
+
description: string;
|
|
73
|
+
};
|
|
29
74
|
};
|
|
30
75
|
required: string[];
|
|
76
|
+
if: {
|
|
77
|
+
properties: {
|
|
78
|
+
action: {
|
|
79
|
+
enum: string[];
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
then: {
|
|
84
|
+
required: string[];
|
|
85
|
+
};
|
|
31
86
|
};
|
|
32
87
|
handler(input: any): Promise<UniversalResponse>;
|
|
33
88
|
};
|