@andrebuzeli/git-mcp 5.0.4 → 5.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +143 -89
  3. package/dist/config.d.ts +72 -71
  4. package/dist/config.d.ts.map +1 -1
  5. package/dist/config.js +226 -139
  6. package/dist/config.js.map +1 -1
  7. package/dist/index.d.ts +15 -17
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +133 -128
  10. package/dist/index.js.map +1 -1
  11. package/dist/providers/base-provider.d.ts +42 -153
  12. package/dist/providers/base-provider.d.ts.map +1 -1
  13. package/dist/providers/base-provider.js +42 -302
  14. package/dist/providers/base-provider.js.map +1 -1
  15. package/dist/providers/gitea-provider.d.ts +67 -118
  16. package/dist/providers/gitea-provider.d.ts.map +1 -1
  17. package/dist/providers/gitea-provider.js +487 -1161
  18. package/dist/providers/gitea-provider.js.map +1 -1
  19. package/dist/providers/github-provider.d.ts +70 -81
  20. package/dist/providers/github-provider.d.ts.map +1 -1
  21. package/dist/providers/github-provider.js +641 -278
  22. package/dist/providers/github-provider.js.map +1 -1
  23. package/dist/providers/index.d.ts +9 -9
  24. package/dist/providers/index.d.ts.map +1 -1
  25. package/dist/providers/index.js +13 -19
  26. package/dist/providers/index.js.map +1 -1
  27. package/dist/providers/provider-factory.d.ts +29 -59
  28. package/dist/providers/provider-factory.d.ts.map +1 -1
  29. package/dist/providers/provider-factory.js +134 -265
  30. package/dist/providers/provider-factory.js.map +1 -1
  31. package/dist/providers/provider-operation-handler.d.ts +93 -0
  32. package/dist/providers/provider-operation-handler.d.ts.map +1 -0
  33. package/dist/providers/provider-operation-handler.js +280 -0
  34. package/dist/providers/provider-operation-handler.js.map +1 -0
  35. package/dist/providers/types.d.ts +201 -355
  36. package/dist/providers/types.d.ts.map +1 -1
  37. package/dist/providers/types.js +3 -2
  38. package/dist/providers/types.js.map +1 -1
  39. package/dist/server.d.ts +34 -4
  40. package/dist/server.d.ts.map +1 -1
  41. package/dist/server.js +439 -262
  42. package/dist/server.js.map +1 -1
  43. package/dist/tools/git-analytics.d.ts +239 -16
  44. package/dist/tools/git-analytics.d.ts.map +1 -1
  45. package/dist/tools/git-analytics.js +737 -25
  46. package/dist/tools/git-analytics.js.map +1 -1
  47. package/dist/tools/git-archive.d.ts +109 -15
  48. package/dist/tools/git-archive.d.ts.map +1 -1
  49. package/dist/tools/git-archive.js +462 -10
  50. package/dist/tools/git-archive.js.map +1 -1
  51. package/dist/tools/git-backup.d.ts +101 -15
  52. package/dist/tools/git-backup.d.ts.map +1 -1
  53. package/dist/tools/git-backup.js +410 -10
  54. package/dist/tools/git-backup.js.map +1 -1
  55. package/dist/tools/git-branches.d.ts +141 -15
  56. package/dist/tools/git-branches.d.ts.map +1 -1
  57. package/dist/tools/git-branches.js +466 -11
  58. package/dist/tools/git-branches.js.map +1 -1
  59. package/dist/tools/git-config.d.ts +115 -15
  60. package/dist/tools/git-config.d.ts.map +1 -1
  61. package/dist/tools/git-config.js +446 -11
  62. package/dist/tools/git-config.js.map +1 -1
  63. package/dist/tools/git-files.d.ts +179 -59
  64. package/dist/tools/git-files.d.ts.map +1 -1
  65. package/dist/tools/git-files.js +682 -222
  66. package/dist/tools/git-files.js.map +1 -1
  67. package/dist/tools/git-issues.d.ts +158 -15
  68. package/dist/tools/git-issues.d.ts.map +1 -1
  69. package/dist/tools/git-issues.js +323 -11
  70. package/dist/tools/git-issues.js.map +1 -1
  71. package/dist/tools/git-monitor.d.ts +149 -14
  72. package/dist/tools/git-monitor.d.ts.map +1 -1
  73. package/dist/tools/git-monitor.js +528 -11
  74. package/dist/tools/git-monitor.js.map +1 -1
  75. package/dist/tools/git-packages.d.ts +163 -15
  76. package/dist/tools/git-packages.d.ts.map +1 -1
  77. package/dist/tools/git-packages.js +526 -11
  78. package/dist/tools/git-packages.js.map +1 -1
  79. package/dist/tools/git-pulls.d.ts +174 -15
  80. package/dist/tools/git-pulls.d.ts.map +1 -1
  81. package/dist/tools/git-pulls.js +352 -11
  82. package/dist/tools/git-pulls.js.map +1 -1
  83. package/dist/tools/git-release.d.ts +167 -15
  84. package/dist/tools/git-release.d.ts.map +1 -1
  85. package/dist/tools/git-release.js +465 -11
  86. package/dist/tools/git-release.js.map +1 -1
  87. package/dist/tools/git-remote.d.ts +124 -15
  88. package/dist/tools/git-remote.d.ts.map +1 -1
  89. package/dist/tools/git-remote.js +539 -11
  90. package/dist/tools/git-remote.js.map +1 -1
  91. package/dist/tools/git-reset.d.ts +100 -15
  92. package/dist/tools/git-reset.d.ts.map +1 -1
  93. package/dist/tools/git-reset.js +409 -11
  94. package/dist/tools/git-reset.js.map +1 -1
  95. package/dist/tools/git-stash.d.ts +120 -15
  96. package/dist/tools/git-stash.d.ts.map +1 -1
  97. package/dist/tools/git-stash.js +503 -11
  98. package/dist/tools/git-stash.js.map +1 -1
  99. package/dist/tools/git-sync.d.ts +160 -16
  100. package/dist/tools/git-sync.d.ts.map +1 -1
  101. package/dist/tools/git-sync.js +462 -113
  102. package/dist/tools/git-sync.js.map +1 -1
  103. package/dist/tools/git-tags.d.ts +142 -15
  104. package/dist/tools/git-tags.d.ts.map +1 -1
  105. package/dist/tools/git-tags.js +471 -11
  106. package/dist/tools/git-tags.js.map +1 -1
  107. package/dist/tools/git-workflow.d.ts +151 -80
  108. package/dist/tools/git-workflow.d.ts.map +1 -1
  109. package/dist/tools/git-workflow.js +407 -912
  110. package/dist/tools/git-workflow.js.map +1 -1
  111. package/dist/utils/credential-manager.d.ts +119 -0
  112. package/dist/utils/credential-manager.d.ts.map +1 -0
  113. package/dist/utils/credential-manager.js +450 -0
  114. package/dist/utils/credential-manager.js.map +1 -0
  115. package/dist/utils/git-command-executor.d.ts +326 -0
  116. package/dist/utils/git-command-executor.d.ts.map +1 -0
  117. package/dist/utils/git-command-executor.js +877 -0
  118. package/dist/utils/git-command-executor.js.map +1 -0
  119. package/dist/utils/logger.d.ts +143 -0
  120. package/dist/utils/logger.d.ts.map +1 -0
  121. package/dist/utils/logger.js +473 -0
  122. package/dist/utils/logger.js.map +1 -0
  123. package/dist/utils/operation-error-handler.d.ts +54 -41
  124. package/dist/utils/operation-error-handler.d.ts.map +1 -1
  125. package/dist/utils/operation-error-handler.js +211 -227
  126. package/dist/utils/operation-error-handler.js.map +1 -1
  127. package/dist/utils/parameter-validator.d.ts +41 -0
  128. package/dist/utils/parameter-validator.d.ts.map +1 -0
  129. package/dist/utils/parameter-validator.js +464 -0
  130. package/dist/utils/parameter-validator.js.map +1 -0
  131. package/dist/utils/repository-detector.d.ts +128 -0
  132. package/dist/utils/repository-detector.d.ts.map +1 -0
  133. package/dist/utils/repository-detector.js +422 -0
  134. package/dist/utils/repository-detector.js.map +1 -0
  135. package/dist/utils/response-formatter.d.ts +146 -0
  136. package/dist/utils/response-formatter.d.ts.map +1 -0
  137. package/dist/utils/response-formatter.js +378 -0
  138. package/dist/utils/response-formatter.js.map +1 -0
  139. package/dist/utils/retry.d.ts +12 -0
  140. package/dist/utils/retry.d.ts.map +1 -0
  141. package/dist/utils/retry.js +28 -0
  142. package/dist/utils/retry.js.map +1 -0
  143. package/dist/utils/terminal-controller.d.ts +73 -139
  144. package/dist/utils/terminal-controller.d.ts.map +1 -1
  145. package/dist/utils/terminal-controller.js +234 -459
  146. package/dist/utils/terminal-controller.js.map +1 -1
  147. package/package.json +79 -60
  148. package/dist/providers/error-handler.d.ts +0 -51
  149. package/dist/providers/error-handler.d.ts.map +0 -1
  150. package/dist/providers/error-handler.js +0 -176
  151. package/dist/providers/error-handler.js.map +0 -1
  152. package/dist/providers/github-provider-backup.d.ts +0 -81
  153. package/dist/providers/github-provider-backup.d.ts.map +0 -1
  154. package/dist/providers/github-provider-backup.js +0 -1179
  155. package/dist/providers/github-provider-backup.js.map +0 -1
  156. package/dist/providers/github-provider-complete.d.ts +0 -1
  157. package/dist/providers/github-provider-complete.d.ts.map +0 -1
  158. package/dist/providers/github-provider-complete.js +0 -2
  159. package/dist/providers/github-provider-complete.js.map +0 -1
  160. package/dist/tools/git-init.d.ts +0 -50
  161. package/dist/tools/git-init.d.ts.map +0 -1
  162. package/dist/tools/git-init.js +0 -258
  163. package/dist/tools/git-init.js.map +0 -1
  164. package/dist/tools/git-log.d.ts +0 -67
  165. package/dist/tools/git-log.d.ts.map +0 -1
  166. package/dist/tools/git-log.js +0 -320
  167. package/dist/tools/git-log.js.map +0 -1
  168. package/dist/tools/git-status.d.ts +0 -29
  169. package/dist/tools/git-status.d.ts.map +0 -1
  170. package/dist/tools/git-status.js +0 -182
  171. package/dist/tools/git-status.js.map +0 -1
  172. package/dist/tools/git-update.d.ts +0 -34
  173. package/dist/tools/git-update.d.ts.map +0 -1
  174. package/dist/tools/git-update.js +0 -191
  175. package/dist/tools/git-update.js.map +0 -1
  176. package/dist/utils/auto-detection.d.ts +0 -120
  177. package/dist/utils/auto-detection.d.ts.map +0 -1
  178. package/dist/utils/auto-detection.js +0 -259
  179. package/dist/utils/auto-detection.js.map +0 -1
  180. package/dist/utils/configuration-error-generator.d.ts +0 -41
  181. package/dist/utils/configuration-error-generator.d.ts.map +0 -1
  182. package/dist/utils/configuration-error-generator.js +0 -168
  183. package/dist/utils/configuration-error-generator.js.map +0 -1
  184. package/dist/utils/configuration-validator.d.ts +0 -67
  185. package/dist/utils/configuration-validator.d.ts.map +0 -1
  186. package/dist/utils/configuration-validator.js +0 -257
  187. package/dist/utils/configuration-validator.js.map +0 -1
  188. package/dist/utils/error-handler.d.ts +0 -107
  189. package/dist/utils/error-handler.d.ts.map +0 -1
  190. package/dist/utils/error-handler.js +0 -331
  191. package/dist/utils/error-handler.js.map +0 -1
  192. package/dist/utils/git-operations.d.ts +0 -200
  193. package/dist/utils/git-operations.d.ts.map +0 -1
  194. package/dist/utils/git-operations.js +0 -836
  195. package/dist/utils/git-operations.js.map +0 -1
  196. package/dist/utils/multi-provider-error-handler.d.ts +0 -75
  197. package/dist/utils/multi-provider-error-handler.d.ts.map +0 -1
  198. package/dist/utils/multi-provider-error-handler.js +0 -276
  199. package/dist/utils/multi-provider-error-handler.js.map +0 -1
  200. package/dist/utils/multi-provider-operation-handler.d.ts +0 -113
  201. package/dist/utils/multi-provider-operation-handler.d.ts.map +0 -1
  202. package/dist/utils/multi-provider-operation-handler.js +0 -303
  203. package/dist/utils/multi-provider-operation-handler.js.map +0 -1
  204. package/dist/utils/provider-operation-handler.d.ts +0 -80
  205. package/dist/utils/provider-operation-handler.d.ts.map +0 -1
  206. package/dist/utils/provider-operation-handler.js +0 -201
  207. package/dist/utils/provider-operation-handler.js.map +0 -1
  208. package/dist/utils/response-helper.d.ts +0 -57
  209. package/dist/utils/response-helper.d.ts.map +0 -1
  210. package/dist/utils/response-helper.js +0 -54
  211. package/dist/utils/response-helper.js.map +0 -1
  212. package/dist/utils/user-detection.d.ts +0 -25
  213. package/dist/utils/user-detection.d.ts.map +0 -1
  214. package/dist/utils/user-detection.js +0 -54
  215. package/dist/utils/user-detection.js.map +0 -1
@@ -1,14 +1,542 @@
1
1
  "use strict";
2
+ /**
3
+ * Git Remote Tool
4
+ *
5
+ * Comprehensive Git remote management tool providing remote repository operations.
6
+ * Supports add, remove, rename, show, set-url, and prune operations.
7
+ *
8
+ * Operations: add, remove, rename, show, set-url, prune
9
+ */
2
10
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.gitRemoteTool = void 0;
4
- const auto_detection_js_1 = require("../utils/auto-detection.js");
5
- exports.gitRemoteTool = {
6
- name: 'git-remote',
7
- description: '🌐 REMOTES - Gerenciamento de remotes',
8
- inputSchema: { type: 'object', properties: { action: { type: 'string' }, projectPath: { type: 'string' } }, required: ['action', 'projectPath'] },
9
- async handler(input) {
10
- const detection = (0, auto_detection_js_1.autoDetect)(input.projectPath);
11
- return (0, auto_detection_js_1.createUniversalResponse)(true, input.action, 'Remote processado', detection, 'git-remote', { remotes: ['origin'] });
12
- }
13
- };
11
+ exports.GitRemoteTool = void 0;
12
+ const git_command_executor_js_1 = require("../utils/git-command-executor.js");
13
+ const parameter_validator_js_1 = require("../utils/parameter-validator.js");
14
+ const operation_error_handler_js_1 = require("../utils/operation-error-handler.js");
15
+ class GitRemoteTool {
16
+ gitExecutor;
17
+ constructor() {
18
+ this.gitExecutor = new git_command_executor_js_1.GitCommandExecutor();
19
+ }
20
+ /**
21
+ * Execute git-remote operation
22
+ */
23
+ async execute(params) {
24
+ const startTime = Date.now();
25
+ try {
26
+ // Validate basic parameters
27
+ const validation = parameter_validator_js_1.ParameterValidator.validateToolParams('git-remote', params);
28
+ if (!validation.isValid) {
29
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('VALIDATION_ERROR', `Parameter validation failed: ${validation.errors.join(', ')}`, params.action, { validationErrors: validation.errors }, validation.suggestions);
30
+ }
31
+ // Validate operation-specific parameters
32
+ const operationValidation = this.validateOperationParams(params);
33
+ if (!operationValidation.isValid) {
34
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('VALIDATION_ERROR', `Operation validation failed: ${operationValidation.errors.join(', ')}`, params.action, { validationErrors: operationValidation.errors }, operationValidation.suggestions);
35
+ }
36
+ // Check if it's a Git repository
37
+ const isRepo = await this.gitExecutor.isGitRepository(params.projectPath);
38
+ if (!isRepo) {
39
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('NOT_A_GIT_REPOSITORY', 'The specified path is not a Git repository', params.action, { projectPath: params.projectPath }, ['Initialize a Git repository first with: git init']);
40
+ }
41
+ // Route to appropriate handler
42
+ switch (params.action) {
43
+ case 'add':
44
+ return await this.handleAdd(params, startTime);
45
+ case 'remove':
46
+ return await this.handleRemove(params, startTime);
47
+ case 'rename':
48
+ return await this.handleRename(params, startTime);
49
+ case 'show':
50
+ return await this.handleShow(params, startTime);
51
+ case 'set-url':
52
+ return await this.handleSetUrl(params, startTime);
53
+ case 'prune':
54
+ return await this.handlePrune(params, startTime);
55
+ case 'list':
56
+ return await this.handleList(params, startTime);
57
+ default:
58
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('UNSUPPORTED_OPERATION', `Operation '${params.action}' is not supported`, params.action, {}, ['Use one of: add, remove, rename, show, set-url, prune, list']);
59
+ }
60
+ }
61
+ catch (error) {
62
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
63
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('EXECUTION_ERROR', `Failed to execute ${params.action}: ${errorMessage}`, params.action, { error: errorMessage }, ['Check the error details and try again']);
64
+ }
65
+ }
66
+ /**
67
+ * Validate operation-specific parameters
68
+ */
69
+ validateOperationParams(params) {
70
+ const errors = [];
71
+ const suggestions = [];
72
+ switch (params.action) {
73
+ case 'add':
74
+ if (!params.name) {
75
+ errors.push('Remote name is required for add operation');
76
+ suggestions.push('Provide a remote name (e.g., "origin", "upstream")');
77
+ }
78
+ if (!params.url) {
79
+ errors.push('Remote URL is required for add operation');
80
+ suggestions.push('Provide a remote URL (e.g., "https://github.com/user/repo.git")');
81
+ }
82
+ break;
83
+ case 'remove':
84
+ if (!params.name) {
85
+ errors.push('Remote name is required for remove operation');
86
+ suggestions.push('Provide the name of the remote to remove');
87
+ }
88
+ break;
89
+ case 'rename':
90
+ if (!params.name) {
91
+ errors.push('Current remote name is required for rename operation');
92
+ suggestions.push('Provide the current remote name');
93
+ }
94
+ if (!params.newName) {
95
+ errors.push('New remote name is required for rename operation');
96
+ suggestions.push('Provide the new remote name');
97
+ }
98
+ break;
99
+ case 'set-url':
100
+ if (!params.name) {
101
+ errors.push('Remote name is required for set-url operation');
102
+ suggestions.push('Provide the remote name to update');
103
+ }
104
+ if (!params.url) {
105
+ errors.push('Remote URL is required for set-url operation');
106
+ suggestions.push('Provide the new remote URL');
107
+ }
108
+ break;
109
+ case 'prune':
110
+ if (!params.name) {
111
+ errors.push('Remote name is required for prune operation');
112
+ suggestions.push('Provide the remote name to prune (e.g., "origin")');
113
+ }
114
+ break;
115
+ case 'show':
116
+ // Show operation can work without parameters (shows all remotes)
117
+ break;
118
+ }
119
+ return {
120
+ isValid: errors.length === 0,
121
+ errors,
122
+ suggestions
123
+ };
124
+ }
125
+ /**
126
+ * Handle git remote add operation
127
+ */
128
+ async handleAdd(params, startTime) {
129
+ try {
130
+ const args = [params.name, params.url];
131
+ // Add fetch option if specified
132
+ if (params.fetch) {
133
+ args.unshift('-f');
134
+ }
135
+ const result = await this.gitExecutor.executeGitCommand('remote', ['add', ...args], params.projectPath);
136
+ if (!result.success) {
137
+ return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'remote add', params.projectPath);
138
+ }
139
+ // If fetch was requested, the output will include fetch information
140
+ const message = params.fetch
141
+ ? `Remote '${params.name}' added and fetched successfully`
142
+ : `Remote '${params.name}' added successfully`;
143
+ return {
144
+ success: true,
145
+ data: {
146
+ message,
147
+ remoteName: params.name,
148
+ remoteUrl: params.url,
149
+ fetched: params.fetch || false,
150
+ output: result.stdout
151
+ },
152
+ metadata: {
153
+ operation: 'remote add',
154
+ timestamp: new Date().toISOString(),
155
+ executionTime: Date.now() - startTime
156
+ }
157
+ };
158
+ }
159
+ catch (error) {
160
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
161
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_ADD_ERROR', `Failed to add remote: ${errorMessage}`, 'add', { error: errorMessage, remoteName: params.name, remoteUrl: params.url });
162
+ }
163
+ }
164
+ /**
165
+ * Handle git remote remove operation
166
+ */
167
+ async handleRemove(params, startTime) {
168
+ try {
169
+ // Check if remote exists first
170
+ const showResult = await this.gitExecutor.executeGitCommand('remote', ['show'], params.projectPath);
171
+ if (showResult.success) {
172
+ const remotes = showResult.stdout.split('\n').filter(line => line.trim());
173
+ if (!remotes.includes(params.name)) {
174
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_NOT_FOUND', `Remote '${params.name}' does not exist`, 'remove', { remoteName: params.name, availableRemotes: remotes }, [`Available remotes: ${remotes.join(', ')}`]);
175
+ }
176
+ }
177
+ const result = await this.gitExecutor.executeGitCommand('remote', ['remove', params.name], params.projectPath);
178
+ if (!result.success) {
179
+ return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'remote remove', params.projectPath);
180
+ }
181
+ return {
182
+ success: true,
183
+ data: {
184
+ message: `Remote '${params.name}' removed successfully`,
185
+ remoteName: params.name,
186
+ output: result.stdout
187
+ },
188
+ metadata: {
189
+ operation: 'remote remove',
190
+ timestamp: new Date().toISOString(),
191
+ executionTime: Date.now() - startTime
192
+ }
193
+ };
194
+ }
195
+ catch (error) {
196
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
197
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_REMOVE_ERROR', `Failed to remove remote: ${errorMessage}`, 'remove', { error: errorMessage, remoteName: params.name });
198
+ }
199
+ }
200
+ /**
201
+ * Handle git remote rename operation
202
+ */
203
+ async handleRename(params, startTime) {
204
+ try {
205
+ // Check if current remote exists
206
+ const showResult = await this.gitExecutor.executeGitCommand('remote', ['show'], params.projectPath);
207
+ if (showResult.success) {
208
+ const remotes = showResult.stdout.split('\n').filter(line => line.trim());
209
+ if (!remotes.includes(params.name)) {
210
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_NOT_FOUND', `Remote '${params.name}' does not exist`, 'rename', { remoteName: params.name, availableRemotes: remotes }, [`Available remotes: ${remotes.join(', ')}`]);
211
+ }
212
+ if (remotes.includes(params.newName)) {
213
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_ALREADY_EXISTS', `Remote '${params.newName}' already exists`, 'rename', { newRemoteName: params.newName, availableRemotes: remotes }, ['Choose a different name for the remote']);
214
+ }
215
+ }
216
+ const result = await this.gitExecutor.executeGitCommand('remote', ['rename', params.name, params.newName], params.projectPath);
217
+ if (!result.success) {
218
+ return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'remote rename', params.projectPath);
219
+ }
220
+ return {
221
+ success: true,
222
+ data: {
223
+ message: `Remote '${params.name}' renamed to '${params.newName}' successfully`,
224
+ oldName: params.name,
225
+ newName: params.newName,
226
+ output: result.stdout
227
+ },
228
+ metadata: {
229
+ operation: 'remote rename',
230
+ timestamp: new Date().toISOString(),
231
+ executionTime: Date.now() - startTime
232
+ }
233
+ };
234
+ }
235
+ catch (error) {
236
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
237
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_RENAME_ERROR', `Failed to rename remote: ${errorMessage}`, 'rename', { error: errorMessage, oldName: params.name, newName: params.newName });
238
+ }
239
+ }
240
+ /**
241
+ * Handle git remote show operation
242
+ */
243
+ async handleShow(params, startTime) {
244
+ try {
245
+ const args = [];
246
+ if (params.verbose) {
247
+ args.push('-v');
248
+ }
249
+ if (params.name && !params.all) {
250
+ // Show specific remote details
251
+ args.push(params.name);
252
+ }
253
+ const result = await this.gitExecutor.executeGitCommand('remote', ['show', ...args], params.projectPath);
254
+ if (!result.success) {
255
+ return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'remote show', params.projectPath);
256
+ }
257
+ // Parse the output
258
+ const output = result.stdout.trim();
259
+ let parsedData = { raw: output };
260
+ if (params.name && !params.all) {
261
+ // Detailed remote information
262
+ parsedData.remoteName = params.name;
263
+ parsedData.details = this.parseRemoteDetails(output);
264
+ }
265
+ else {
266
+ // List of remotes
267
+ const lines = output.split('\n').filter(line => line.trim());
268
+ if (params.verbose) {
269
+ parsedData.remotes = this.parseVerboseRemotes(lines);
270
+ }
271
+ else {
272
+ parsedData.remotes = lines;
273
+ }
274
+ }
275
+ return {
276
+ success: true,
277
+ data: {
278
+ message: params.name ? `Remote '${params.name}' details` : 'Remote repositories',
279
+ ...parsedData
280
+ },
281
+ metadata: {
282
+ operation: 'remote show',
283
+ timestamp: new Date().toISOString(),
284
+ executionTime: Date.now() - startTime
285
+ }
286
+ };
287
+ }
288
+ catch (error) {
289
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
290
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_SHOW_ERROR', `Failed to show remote information: ${errorMessage}`, 'show', { error: errorMessage, remoteName: params.name });
291
+ }
292
+ }
293
+ /**
294
+ * Handle git remote set-url operation
295
+ */
296
+ async handleSetUrl(params, startTime) {
297
+ try {
298
+ // Check if remote exists
299
+ const showResult = await this.gitExecutor.executeGitCommand('remote', ['show'], params.projectPath);
300
+ if (showResult.success) {
301
+ const remotes = showResult.stdout.split('\n').filter(line => line.trim());
302
+ if (!remotes.includes(params.name)) {
303
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_NOT_FOUND', `Remote '${params.name}' does not exist`, 'set-url', { remoteName: params.name, availableRemotes: remotes }, [`Available remotes: ${remotes.join(', ')}`]);
304
+ }
305
+ }
306
+ const args = [params.name, params.url];
307
+ // Add push option if specified
308
+ if (params.push) {
309
+ args.unshift('--push');
310
+ }
311
+ const result = await this.gitExecutor.executeGitCommand('remote', ['set-url', ...args], params.projectPath);
312
+ if (!result.success) {
313
+ return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'remote set-url', params.projectPath);
314
+ }
315
+ const urlType = params.push ? 'push URL' : 'URL';
316
+ return {
317
+ success: true,
318
+ data: {
319
+ message: `Remote '${params.name}' ${urlType} updated successfully`,
320
+ remoteName: params.name,
321
+ newUrl: params.url,
322
+ urlType: params.push ? 'push' : 'fetch',
323
+ output: result.stdout
324
+ },
325
+ metadata: {
326
+ operation: 'remote set-url',
327
+ timestamp: new Date().toISOString(),
328
+ executionTime: Date.now() - startTime
329
+ }
330
+ };
331
+ }
332
+ catch (error) {
333
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
334
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_SET_URL_ERROR', `Failed to set remote URL: ${errorMessage}`, 'set-url', { error: errorMessage, remoteName: params.name, url: params.url });
335
+ }
336
+ }
337
+ /**
338
+ * Handle git remote prune operation
339
+ */
340
+ async handlePrune(params, startTime) {
341
+ try {
342
+ // Check if remote exists
343
+ const showResult = await this.gitExecutor.executeGitCommand('remote', ['show'], params.projectPath);
344
+ if (showResult.success) {
345
+ const remotes = showResult.stdout.split('\n').filter(line => line.trim());
346
+ if (!remotes.includes(params.name)) {
347
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_NOT_FOUND', `Remote '${params.name}' does not exist`, 'prune', { remoteName: params.name, availableRemotes: remotes }, [`Available remotes: ${remotes.join(', ')}`]);
348
+ }
349
+ }
350
+ const args = [params.name];
351
+ // Add dry-run option if specified
352
+ if (params.dryRun) {
353
+ args.unshift('--dry-run');
354
+ }
355
+ const result = await this.gitExecutor.executeGitCommand('remote', ['prune', ...args], params.projectPath);
356
+ if (!result.success) {
357
+ return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'remote prune', params.projectPath);
358
+ }
359
+ // Parse pruned branches from output
360
+ const prunedBranches = this.parsePrunedBranches(result.stdout);
361
+ const message = params.dryRun
362
+ ? `Dry run: Would prune ${prunedBranches.length} stale branches from '${params.name}'`
363
+ : `Pruned ${prunedBranches.length} stale branches from '${params.name}'`;
364
+ return {
365
+ success: true,
366
+ data: {
367
+ message,
368
+ remoteName: params.name,
369
+ dryRun: params.dryRun || false,
370
+ prunedBranches,
371
+ output: result.stdout
372
+ },
373
+ metadata: {
374
+ operation: 'remote prune',
375
+ timestamp: new Date().toISOString(),
376
+ executionTime: Date.now() - startTime
377
+ }
378
+ };
379
+ }
380
+ catch (error) {
381
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
382
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_PRUNE_ERROR', `Failed to prune remote: ${errorMessage}`, 'prune', { error: errorMessage, remoteName: params.name });
383
+ }
384
+ }
385
+ /**
386
+ * Handle list remotes
387
+ */
388
+ async handleList(params, startTime) {
389
+ try {
390
+ const result = await this.gitExecutor.executeGitCommand('remote', [], params.projectPath);
391
+ if (!result.success) {
392
+ return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'remote list', params.projectPath);
393
+ }
394
+ // Parse remotes from output
395
+ const remotes = result.stdout
396
+ .split('\n')
397
+ .map(line => line.trim())
398
+ .filter(line => line.length > 0);
399
+ return {
400
+ success: true,
401
+ data: {
402
+ operation: 'list',
403
+ message: `Found ${remotes.length} remote(s)`,
404
+ details: {
405
+ remotes,
406
+ count: remotes.length
407
+ },
408
+ duration: Date.now() - startTime
409
+ }
410
+ };
411
+ }
412
+ catch (error) {
413
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
414
+ return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_LIST_ERROR', `Failed to list remotes: ${errorMessage}`, 'list', { error: errorMessage });
415
+ }
416
+ }
417
+ /**
418
+ * Parse remote details from git remote show output
419
+ */
420
+ parseRemoteDetails(output) {
421
+ const lines = output.split('\n');
422
+ const details = {};
423
+ for (const line of lines) {
424
+ const trimmed = line.trim();
425
+ if (trimmed.includes('Fetch URL:')) {
426
+ details.fetchUrl = trimmed.split('Fetch URL:')[1]?.trim();
427
+ }
428
+ else if (trimmed.includes('Push URL:')) {
429
+ details.pushUrl = trimmed.split('Push URL:')[1]?.trim();
430
+ }
431
+ else if (trimmed.includes('HEAD branch:')) {
432
+ details.headBranch = trimmed.split('HEAD branch:')[1]?.trim();
433
+ }
434
+ }
435
+ return details;
436
+ }
437
+ /**
438
+ * Parse verbose remotes output
439
+ */
440
+ parseVerboseRemotes(lines) {
441
+ const remotes = [];
442
+ const remoteMap = new Map();
443
+ for (const line of lines) {
444
+ const parts = line.split('\t');
445
+ if (parts.length >= 2) {
446
+ const name = parts[0].trim();
447
+ const urlAndType = parts[1].trim();
448
+ const urlMatch = urlAndType.match(/^(.+?)\s+\((.+)\)$/);
449
+ if (urlMatch) {
450
+ const url = urlMatch[1];
451
+ const type = urlMatch[2];
452
+ if (!remoteMap.has(name)) {
453
+ remoteMap.set(name, { name });
454
+ }
455
+ const remote = remoteMap.get(name);
456
+ if (type === 'fetch') {
457
+ remote.fetchUrl = url;
458
+ }
459
+ else if (type === 'push') {
460
+ remote.pushUrl = url;
461
+ }
462
+ }
463
+ }
464
+ }
465
+ return Array.from(remoteMap.values());
466
+ }
467
+ /**
468
+ * Parse pruned branches from git remote prune output
469
+ */
470
+ parsePrunedBranches(output) {
471
+ const lines = output.split('\n');
472
+ const prunedBranches = [];
473
+ for (const line of lines) {
474
+ const trimmed = line.trim();
475
+ if (trimmed.startsWith('* [would prune]') || trimmed.startsWith('* [pruned]')) {
476
+ const branchMatch = trimmed.match(/\* \[(would prune|pruned)\] (.+)/);
477
+ if (branchMatch) {
478
+ prunedBranches.push(branchMatch[2]);
479
+ }
480
+ }
481
+ }
482
+ return prunedBranches;
483
+ }
484
+ /**
485
+ * Get tool schema for MCP registration
486
+ */
487
+ static getToolSchema() {
488
+ return {
489
+ name: 'git-remote',
490
+ description: 'Git remote management tool for managing remote repositories. Supports add, remove, rename, show, set-url, and prune operations.',
491
+ inputSchema: {
492
+ type: 'object',
493
+ properties: {
494
+ action: {
495
+ type: 'string',
496
+ enum: ['add', 'remove', 'rename', 'show', 'set-url', 'prune', 'list'],
497
+ description: 'The remote operation to perform'
498
+ },
499
+ projectPath: {
500
+ type: 'string',
501
+ description: 'Absolute path to the project directory'
502
+ },
503
+ name: {
504
+ type: 'string',
505
+ description: 'Remote name (required for most operations)'
506
+ },
507
+ url: {
508
+ type: 'string',
509
+ description: 'Remote URL (required for add and set-url operations)'
510
+ },
511
+ newName: {
512
+ type: 'string',
513
+ description: 'New remote name (required for rename operation)'
514
+ },
515
+ fetch: {
516
+ type: 'boolean',
517
+ description: 'Fetch after adding remote (for add action)'
518
+ },
519
+ push: {
520
+ type: 'boolean',
521
+ description: 'Set push URL instead of fetch URL (for set-url action)'
522
+ },
523
+ all: {
524
+ type: 'boolean',
525
+ description: 'Show all remotes (for show action)'
526
+ },
527
+ verbose: {
528
+ type: 'boolean',
529
+ description: 'Show verbose output with URLs (for show action)'
530
+ },
531
+ dryRun: {
532
+ type: 'boolean',
533
+ description: 'Show what would be pruned without actually pruning (for prune action)'
534
+ }
535
+ },
536
+ required: ['action', 'projectPath']
537
+ }
538
+ };
539
+ }
540
+ }
541
+ exports.GitRemoteTool = GitRemoteTool;
14
542
  //# sourceMappingURL=git-remote.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"git-remote.js","sourceRoot":"","sources":["../../src/tools/git-remote.ts"],"names":[],"mappings":";;;AAAA,kEAAoG;AAEvF,QAAA,aAAa,GAAG;IAC3B,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,uCAAuC;IACpD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC,EAAE;IACjJ,KAAK,CAAC,OAAO,CAAC,KAAU;QACtB,MAAM,SAAS,GAAG,IAAA,8BAAU,EAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QAChD,OAAO,IAAA,2CAAuB,EAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,mBAAmB,EAAE,SAAS,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC5H,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"git-remote.js","sourceRoot":"","sources":["../../src/tools/git-remote.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,8EAAwF;AACxF,4EAAiF;AACjF,oFAAwF;AAkBxF,MAAa,aAAa;IAChB,WAAW,CAAqB;IAExC;QACE,IAAI,CAAC,WAAW,GAAG,IAAI,4CAAkB,EAAE,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO,CAAC,MAAuB;QACnC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE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