@andrebuzeli/git-mcp 5.5.1 → 5.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/README.md +94 -6
  2. package/dist/config.d.ts +5 -131
  3. package/dist/config.js +28 -430
  4. package/dist/index.d.ts +1 -21
  5. package/dist/index.js +118 -140
  6. package/dist/providers/giteaProvider.d.ts +3 -0
  7. package/dist/providers/giteaProvider.js +12 -0
  8. package/dist/providers/githubProvider.d.ts +2 -0
  9. package/dist/providers/githubProvider.js +7 -0
  10. package/dist/providers/providerManager.d.ts +11 -0
  11. package/dist/providers/providerManager.js +48 -0
  12. package/dist/resources/toolsGuide.d.ts +12 -0
  13. package/dist/resources/toolsGuide.js +1491 -0
  14. package/dist/server.d.ts +7 -40
  15. package/dist/server.js +59 -696
  16. package/dist/tools/gitAnalytics.d.ts +29 -0
  17. package/dist/tools/gitAnalytics.js +72 -0
  18. package/dist/tools/gitArchive.d.ts +6 -0
  19. package/dist/tools/gitArchive.js +27 -0
  20. package/dist/tools/gitBackup.d.ts +10 -0
  21. package/dist/tools/gitBackup.js +44 -0
  22. package/dist/tools/gitBranches.d.ts +72 -0
  23. package/dist/tools/gitBranches.js +98 -0
  24. package/dist/tools/gitConfig.d.ts +34 -0
  25. package/dist/tools/gitConfig.js +73 -0
  26. package/dist/tools/gitFiles.d.ts +30 -0
  27. package/dist/tools/gitFiles.js +55 -0
  28. package/dist/tools/gitHistory.d.ts +17 -0
  29. package/dist/tools/gitHistory.js +365 -0
  30. package/dist/tools/gitIssues.d.ts +6 -0
  31. package/dist/tools/gitIssues.js +279 -0
  32. package/dist/tools/gitMonitor.d.ts +51 -0
  33. package/dist/tools/gitMonitor.js +102 -0
  34. package/dist/tools/gitPackages.d.ts +6 -0
  35. package/dist/tools/gitPackages.js +28 -0
  36. package/dist/tools/gitPulls.d.ts +6 -0
  37. package/dist/tools/gitPulls.js +288 -0
  38. package/dist/tools/gitRelease.d.ts +6 -0
  39. package/dist/tools/gitRelease.js +321 -0
  40. package/dist/tools/gitRemote.d.ts +51 -0
  41. package/dist/tools/gitRemote.js +68 -0
  42. package/dist/tools/gitReset.d.ts +34 -0
  43. package/dist/tools/gitReset.js +64 -0
  44. package/dist/tools/gitStash.d.ts +41 -0
  45. package/dist/tools/gitStash.js +67 -0
  46. package/dist/tools/gitSync.d.ts +25 -0
  47. package/dist/tools/gitSync.js +51 -0
  48. package/dist/tools/gitTags.d.ts +30 -0
  49. package/dist/tools/gitTags.js +69 -0
  50. package/dist/tools/gitUpdate.d.ts +14 -0
  51. package/dist/tools/gitUpdate.js +374 -0
  52. package/dist/tools/gitUpload.d.ts +11 -0
  53. package/dist/tools/gitUpload.js +342 -0
  54. package/dist/tools/gitWorkflow.d.ts +6 -0
  55. package/dist/tools/gitWorkflow.js +303 -0
  56. package/dist/types.d.ts +17 -0
  57. package/dist/types.js +2 -0
  58. package/dist/utils/errors.d.ts +13 -0
  59. package/dist/utils/errors.js +22 -0
  60. package/dist/utils/safetyController.d.ts +1 -0
  61. package/dist/utils/safetyController.js +15 -0
  62. package/package.json +8 -3
  63. package/dist/config.d.ts.map +0 -1
  64. package/dist/config.js.map +0 -1
  65. package/dist/index.d.ts.map +0 -1
  66. package/dist/index.js.map +0 -1
  67. package/dist/providers/base-provider.d.ts +0 -66
  68. package/dist/providers/base-provider.d.ts.map +0 -1
  69. package/dist/providers/base-provider.js +0 -65
  70. package/dist/providers/base-provider.js.map +0 -1
  71. package/dist/providers/gitea-provider.d.ts +0 -79
  72. package/dist/providers/gitea-provider.d.ts.map +0 -1
  73. package/dist/providers/gitea-provider.js +0 -576
  74. package/dist/providers/gitea-provider.js.map +0 -1
  75. package/dist/providers/github-provider.d.ts +0 -74
  76. package/dist/providers/github-provider.d.ts.map +0 -1
  77. package/dist/providers/github-provider.js +0 -683
  78. package/dist/providers/github-provider.js.map +0 -1
  79. package/dist/providers/index.d.ts +0 -13
  80. package/dist/providers/index.d.ts.map +0 -1
  81. package/dist/providers/index.js +0 -35
  82. package/dist/providers/index.js.map +0 -1
  83. package/dist/providers/provider-factory.d.ts +0 -49
  84. package/dist/providers/provider-factory.d.ts.map +0 -1
  85. package/dist/providers/provider-factory.js +0 -193
  86. package/dist/providers/provider-factory.js.map +0 -1
  87. package/dist/providers/provider-operation-handler.d.ts +0 -115
  88. package/dist/providers/provider-operation-handler.d.ts.map +0 -1
  89. package/dist/providers/provider-operation-handler.js +0 -449
  90. package/dist/providers/provider-operation-handler.js.map +0 -1
  91. package/dist/providers/types.d.ts +0 -200
  92. package/dist/providers/types.d.ts.map +0 -1
  93. package/dist/providers/types.js +0 -8
  94. package/dist/providers/types.js.map +0 -1
  95. package/dist/server.d.ts.map +0 -1
  96. package/dist/server.js.map +0 -1
  97. package/dist/tools/git-analytics.d.ts +0 -237
  98. package/dist/tools/git-analytics.d.ts.map +0 -1
  99. package/dist/tools/git-analytics.js +0 -819
  100. package/dist/tools/git-analytics.js.map +0 -1
  101. package/dist/tools/git-archive.d.ts +0 -113
  102. package/dist/tools/git-archive.d.ts.map +0 -1
  103. package/dist/tools/git-archive.js +0 -466
  104. package/dist/tools/git-archive.js.map +0 -1
  105. package/dist/tools/git-auto-monitor.d.ts +0 -180
  106. package/dist/tools/git-auto-monitor.d.ts.map +0 -1
  107. package/dist/tools/git-auto-monitor.js +0 -522
  108. package/dist/tools/git-auto-monitor.js.map +0 -1
  109. package/dist/tools/git-backup.d.ts +0 -105
  110. package/dist/tools/git-backup.d.ts.map +0 -1
  111. package/dist/tools/git-backup.js +0 -414
  112. package/dist/tools/git-backup.js.map +0 -1
  113. package/dist/tools/git-branches.d.ts +0 -183
  114. package/dist/tools/git-branches.d.ts.map +0 -1
  115. package/dist/tools/git-branches.js +0 -498
  116. package/dist/tools/git-branches.js.map +0 -1
  117. package/dist/tools/git-config.d.ts +0 -119
  118. package/dist/tools/git-config.d.ts.map +0 -1
  119. package/dist/tools/git-config.js +0 -449
  120. package/dist/tools/git-config.js.map +0 -1
  121. package/dist/tools/git-files.d.ts +0 -150
  122. package/dist/tools/git-files.d.ts.map +0 -1
  123. package/dist/tools/git-files.js +0 -527
  124. package/dist/tools/git-files.js.map +0 -1
  125. package/dist/tools/git-history.d.ts +0 -253
  126. package/dist/tools/git-history.d.ts.map +0 -1
  127. package/dist/tools/git-history.js +0 -824
  128. package/dist/tools/git-history.js.map +0 -1
  129. package/dist/tools/git-issues.d.ts +0 -164
  130. package/dist/tools/git-issues.d.ts.map +0 -1
  131. package/dist/tools/git-issues.js +0 -340
  132. package/dist/tools/git-issues.js.map +0 -1
  133. package/dist/tools/git-monitor.d.ts +0 -154
  134. package/dist/tools/git-monitor.d.ts.map +0 -1
  135. package/dist/tools/git-monitor.js +0 -531
  136. package/dist/tools/git-monitor.js.map +0 -1
  137. package/dist/tools/git-packages.d.ts +0 -157
  138. package/dist/tools/git-packages.d.ts.map +0 -1
  139. package/dist/tools/git-packages.js +0 -534
  140. package/dist/tools/git-packages.js.map +0 -1
  141. package/dist/tools/git-pulls.d.ts +0 -180
  142. package/dist/tools/git-pulls.d.ts.map +0 -1
  143. package/dist/tools/git-pulls.js +0 -369
  144. package/dist/tools/git-pulls.js.map +0 -1
  145. package/dist/tools/git-release.d.ts +0 -161
  146. package/dist/tools/git-release.d.ts.map +0 -1
  147. package/dist/tools/git-release.js +0 -466
  148. package/dist/tools/git-release.js.map +0 -1
  149. package/dist/tools/git-remote.d.ts +0 -128
  150. package/dist/tools/git-remote.d.ts.map +0 -1
  151. package/dist/tools/git-remote.js +0 -542
  152. package/dist/tools/git-remote.js.map +0 -1
  153. package/dist/tools/git-reset.d.ts +0 -120
  154. package/dist/tools/git-reset.d.ts.map +0 -1
  155. package/dist/tools/git-reset.js +0 -479
  156. package/dist/tools/git-reset.js.map +0 -1
  157. package/dist/tools/git-stash.d.ts +0 -124
  158. package/dist/tools/git-stash.d.ts.map +0 -1
  159. package/dist/tools/git-stash.js +0 -506
  160. package/dist/tools/git-stash.js.map +0 -1
  161. package/dist/tools/git-sync.d.ts +0 -154
  162. package/dist/tools/git-sync.d.ts.map +0 -1
  163. package/dist/tools/git-sync.js +0 -479
  164. package/dist/tools/git-sync.js.map +0 -1
  165. package/dist/tools/git-tags.d.ts +0 -136
  166. package/dist/tools/git-tags.d.ts.map +0 -1
  167. package/dist/tools/git-tags.js +0 -461
  168. package/dist/tools/git-tags.js.map +0 -1
  169. package/dist/tools/git-update.d.ts +0 -224
  170. package/dist/tools/git-update.d.ts.map +0 -1
  171. package/dist/tools/git-update.js +0 -948
  172. package/dist/tools/git-update.js.map +0 -1
  173. package/dist/tools/git-workflow.d.ts +0 -189
  174. package/dist/tools/git-workflow.d.ts.map +0 -1
  175. package/dist/tools/git-workflow.js +0 -542
  176. package/dist/tools/git-workflow.js.map +0 -1
  177. package/dist/utils/credential-manager.d.ts +0 -119
  178. package/dist/utils/credential-manager.d.ts.map +0 -1
  179. package/dist/utils/credential-manager.js +0 -450
  180. package/dist/utils/credential-manager.js.map +0 -1
  181. package/dist/utils/data-merger.d.ts +0 -49
  182. package/dist/utils/data-merger.d.ts.map +0 -1
  183. package/dist/utils/data-merger.js +0 -233
  184. package/dist/utils/data-merger.js.map +0 -1
  185. package/dist/utils/git-command-executor.d.ts +0 -330
  186. package/dist/utils/git-command-executor.d.ts.map +0 -1
  187. package/dist/utils/git-command-executor.js +0 -901
  188. package/dist/utils/git-command-executor.js.map +0 -1
  189. package/dist/utils/logger.d.ts +0 -143
  190. package/dist/utils/logger.d.ts.map +0 -1
  191. package/dist/utils/logger.js +0 -473
  192. package/dist/utils/logger.js.map +0 -1
  193. package/dist/utils/operation-error-handler.d.ts +0 -97
  194. package/dist/utils/operation-error-handler.d.ts.map +0 -1
  195. package/dist/utils/operation-error-handler.js +0 -367
  196. package/dist/utils/operation-error-handler.js.map +0 -1
  197. package/dist/utils/parameter-validator.d.ts +0 -49
  198. package/dist/utils/parameter-validator.d.ts.map +0 -1
  199. package/dist/utils/parameter-validator.js +0 -647
  200. package/dist/utils/parameter-validator.js.map +0 -1
  201. package/dist/utils/repository-checker.d.ts +0 -46
  202. package/dist/utils/repository-checker.d.ts.map +0 -1
  203. package/dist/utils/repository-checker.js +0 -151
  204. package/dist/utils/repository-checker.js.map +0 -1
  205. package/dist/utils/repository-detector.d.ts +0 -128
  206. package/dist/utils/repository-detector.d.ts.map +0 -1
  207. package/dist/utils/repository-detector.js +0 -422
  208. package/dist/utils/repository-detector.js.map +0 -1
  209. package/dist/utils/repository-sync.d.ts +0 -67
  210. package/dist/utils/repository-sync.d.ts.map +0 -1
  211. package/dist/utils/repository-sync.js +0 -344
  212. package/dist/utils/repository-sync.js.map +0 -1
  213. package/dist/utils/response-formatter.d.ts +0 -146
  214. package/dist/utils/response-formatter.d.ts.map +0 -1
  215. package/dist/utils/response-formatter.js +0 -378
  216. package/dist/utils/response-formatter.js.map +0 -1
  217. package/dist/utils/retry.d.ts +0 -12
  218. package/dist/utils/retry.d.ts.map +0 -1
  219. package/dist/utils/retry.js +0 -28
  220. package/dist/utils/retry.js.map +0 -1
  221. package/dist/utils/safety-warnings.d.ts +0 -56
  222. package/dist/utils/safety-warnings.d.ts.map +0 -1
  223. package/dist/utils/safety-warnings.js +0 -330
  224. package/dist/utils/safety-warnings.js.map +0 -1
  225. package/dist/utils/terminal-controller.d.ts +0 -79
  226. package/dist/utils/terminal-controller.d.ts.map +0 -1
  227. package/dist/utils/terminal-controller.js +0 -291
  228. package/dist/utils/terminal-controller.js.map +0 -1
  229. package/dist/utils/user-friendly-formatter.d.ts +0 -45
  230. package/dist/utils/user-friendly-formatter.d.ts.map +0 -1
  231. package/dist/utils/user-friendly-formatter.js +0 -175
  232. package/dist/utils/user-friendly-formatter.js.map +0 -1
@@ -1,161 +0,0 @@
1
- /**
2
- * Git Release Tool
3
- *
4
- * Release management tool providing comprehensive Git release operations.
5
- * Supports both local Git operations and remote provider operations.
6
- *
7
- * Operations: create, list, get, update, delete, publish, download
8
- */
9
- import { ToolParams } from '../utils/parameter-validator.js';
10
- import { ToolResult } from '../utils/operation-error-handler.js';
11
- import { ProviderConfig } from '../providers/types.js';
12
- export interface GitReleaseParams extends ToolParams {
13
- action: 'create' | 'list' | 'get' | 'update' | 'delete' | 'publish' | 'download';
14
- tagName?: string;
15
- releaseName?: string;
16
- description?: string;
17
- body?: string;
18
- commitish?: string;
19
- draft?: boolean;
20
- prerelease?: boolean;
21
- assets?: string[];
22
- assetName?: string;
23
- downloadPath?: string;
24
- force?: boolean;
25
- generateNotes?: boolean;
26
- repo?: string;
27
- limit?: number;
28
- includeDrafts?: boolean;
29
- includePrerelease?: boolean;
30
- }
31
- export declare class GitReleaseTool {
32
- private gitExecutor;
33
- private providerHandler?;
34
- constructor(providerConfig?: ProviderConfig);
35
- /**
36
- * Execute git-release operation
37
- */
38
- execute(params: GitReleaseParams): Promise<ToolResult>;
39
- /**
40
- * Execute local Git release operations
41
- */
42
- private executeLocalOperation;
43
- /**
44
- * Execute remote provider operations
45
- */
46
- private executeRemoteOperation;
47
- /**
48
- * Handle create local release operation (creates tag with release info)
49
- */
50
- private handleCreateLocalRelease;
51
- /**
52
- * Handle list local releases operation (lists tags as releases)
53
- */
54
- private handleListLocalReleases;
55
- /**
56
- * Handle get local release operation (gets tag info as release)
57
- */
58
- private handleGetLocalRelease;
59
- /**
60
- * Check if operation is a remote operation
61
- */
62
- private isRemoteOperation;
63
- /**
64
- * Extract parameters for remote operations
65
- */
66
- private extractRemoteParameters;
67
- /**
68
- * Map git-release actions to provider operations
69
- */
70
- private mapActionToProviderOperation;
71
- /**
72
- * Get tool schema for MCP registration
73
- */
74
- static getToolSchema(): {
75
- name: string;
76
- description: string;
77
- inputSchema: {
78
- type: string;
79
- properties: {
80
- action: {
81
- type: string;
82
- enum: string[];
83
- description: string;
84
- };
85
- projectPath: {
86
- type: string;
87
- description: string;
88
- };
89
- tagName: {
90
- type: string;
91
- description: string;
92
- };
93
- releaseName: {
94
- type: string;
95
- description: string;
96
- };
97
- description: {
98
- type: string;
99
- description: string;
100
- };
101
- body: {
102
- type: string;
103
- description: string;
104
- };
105
- commitish: {
106
- type: string;
107
- description: string;
108
- };
109
- draft: {
110
- type: string;
111
- description: string;
112
- };
113
- prerelease: {
114
- type: string;
115
- description: string;
116
- };
117
- assets: {
118
- type: string;
119
- items: {
120
- type: string;
121
- };
122
- description: string;
123
- };
124
- assetName: {
125
- type: string;
126
- description: string;
127
- };
128
- downloadPath: {
129
- type: string;
130
- description: string;
131
- };
132
- force: {
133
- type: string;
134
- description: string;
135
- };
136
- generateNotes: {
137
- type: string;
138
- description: string;
139
- };
140
- repo: {
141
- type: string;
142
- description: string;
143
- };
144
- limit: {
145
- type: string;
146
- description: string;
147
- };
148
- includeDrafts: {
149
- type: string;
150
- description: string;
151
- };
152
- includePrerelease: {
153
- type: string;
154
- description: string;
155
- };
156
- };
157
- required: string[];
158
- };
159
- };
160
- }
161
- //# sourceMappingURL=git-release.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-release.d.ts","sourceRoot":"","sources":["../../src/tools/git-release.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAsB,UAAU,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAyB,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAExF,OAAO,EAAE,cAAc,EAAqB,MAAM,uBAAuB,CAAC;AAG1E,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,MAAM,EAAE,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;IAGjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IAGrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,IAAI,CAAC,EAAE,MAAM,CAAC;IAGd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,qBAAa,cAAc;IACzB,OAAO,CAAC,WAAW,CAAqB;IACxC,OAAO,CAAC,eAAe,CAAC,CAA2B;gBAEvC,cAAc,CAAC,EAAE,cAAc;IAO3C;;OAEG;IACG,OAAO,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IAiD5D;;OAEG;YACW,qBAAqB;IAmBnC;;OAEG;YACW,sBAAsB;IAiEpC;;OAEG;YACW,wBAAwB;IA6EtC;;OAEG;YACW,uBAAuB;IAyDrC;;OAEG;YACW,qBAAqB;IA0EnC;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA8D/B;;OAEG;IACH,OAAO,CAAC,4BAA4B;IAcpC;;OAEG;IACH,MAAM,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFrB"}
@@ -1,466 +0,0 @@
1
- "use strict";
2
- /**
3
- * Git Release Tool
4
- *
5
- * Release management tool providing comprehensive Git release operations.
6
- * Supports both local Git operations and remote provider operations.
7
- *
8
- * Operations: create, list, get, update, delete, publish, download
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.GitReleaseTool = 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
- const provider_operation_handler_js_1 = require("../providers/provider-operation-handler.js");
16
- const config_js_1 = require("../config.js");
17
- class GitReleaseTool {
18
- gitExecutor;
19
- providerHandler;
20
- constructor(providerConfig) {
21
- this.gitExecutor = new git_command_executor_js_1.GitCommandExecutor();
22
- if (providerConfig) {
23
- this.providerHandler = new provider_operation_handler_js_1.ProviderOperationHandler(providerConfig);
24
- }
25
- }
26
- /**
27
- * Execute git-release operation
28
- */
29
- async execute(params) {
30
- const startTime = Date.now();
31
- try {
32
- // Validate basic parameters
33
- const validation = parameter_validator_js_1.ParameterValidator.validateToolParams('git-release', params);
34
- if (!validation.isValid) {
35
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('VALIDATION_ERROR', `Parameter validation failed: ${validation.errors.join(', ')}`, params.action, { validationErrors: validation.errors }, validation.suggestions);
36
- }
37
- // Validate operation-specific parameters
38
- const operationValidation = parameter_validator_js_1.ParameterValidator.validateOperationParams('git-release', params.action, params);
39
- if (!operationValidation.isValid) {
40
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('VALIDATION_ERROR', `Operation validation failed: ${operationValidation.errors.join(', ')}`, params.action, { validationErrors: operationValidation.errors }, operationValidation.suggestions);
41
- }
42
- // Route to appropriate handler
43
- const isRemoteOperation = this.isRemoteOperation(params.action);
44
- if (isRemoteOperation) {
45
- return await this.executeRemoteOperation(params, startTime);
46
- }
47
- else {
48
- return await this.executeLocalOperation(params, startTime);
49
- }
50
- }
51
- catch (error) {
52
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
53
- 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']);
54
- }
55
- }
56
- /**
57
- * Execute local Git release operations
58
- */
59
- async executeLocalOperation(params, startTime) {
60
- switch (params.action) {
61
- case 'create':
62
- return await this.handleCreateLocalRelease(params, startTime);
63
- case 'list':
64
- return await this.handleListLocalReleases(params, startTime);
65
- case 'get':
66
- return await this.handleGetLocalRelease(params, startTime);
67
- default:
68
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('UNSUPPORTED_LOCAL_OPERATION', `Local operation '${params.action}' is not supported. Use provider for remote release operations.`, params.action, {}, ['Specify a provider (github, gitea, or both) for remote release operations']);
69
- }
70
- }
71
- /**
72
- * Execute remote provider operations
73
- */
74
- async executeRemoteOperation(params, startTime) {
75
- if (!this.providerHandler) {
76
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('PROVIDER_NOT_CONFIGURED', 'Provider handler is not configured for remote operations', params.action, {}, ['Configure GitHub or Gitea provider to use remote operations']);
77
- }
78
- if (!params.provider) {
79
- if (config_js_1.configManager.isUniversalMode()) {
80
- params.provider = 'both';
81
- console.error(`[Universal Mode] Auto-applying both providers for ${params.action}`);
82
- }
83
- else {
84
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('PROVIDER_REQUIRED', 'Provider parameter is required for remote release operations', params.action, {}, ['Specify provider as: github, gitea, or both']);
85
- }
86
- }
87
- const operation = {
88
- provider: 'github', // This will be auto-determined by the provider handler
89
- operation: this.mapActionToProviderOperation(params.action),
90
- parameters: this.extractRemoteParameters(params),
91
- requiresAuth: true,
92
- isRemoteOperation: true
93
- };
94
- try {
95
- const result = await this.providerHandler.executeOperation(operation);
96
- return {
97
- success: result.success,
98
- data: result.partialFailure ? result : result.results[0]?.data,
99
- error: result.success ? undefined : {
100
- code: result.errors[0]?.error?.code || 'REMOTE_OPERATION_ERROR',
101
- message: result.errors[0]?.error?.message || 'Remote operation failed',
102
- details: result.errors,
103
- suggestions: ['Check provider configuration and credentials']
104
- },
105
- metadata: {
106
- provider: 'github', // This will be auto-determined by the provider handler
107
- operation: params.action,
108
- timestamp: new Date().toISOString(),
109
- executionTime: Date.now() - startTime
110
- }
111
- };
112
- }
113
- catch (error) {
114
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
115
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('REMOTE_OPERATION_ERROR', `Remote operation failed: ${errorMessage}`, params.action, { error: errorMessage }, ['Check provider configuration and network connectivity']);
116
- }
117
- }
118
- /**
119
- * Handle create local release operation (creates tag with release info)
120
- */
121
- async handleCreateLocalRelease(params, startTime) {
122
- try {
123
- if (!params.tagName) {
124
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('MISSING_PARAMETER', 'tagName is required for release creation', 'create', {}, ['Provide a tag name for the release']);
125
- }
126
- // Check if tag already exists
127
- const existingTags = await this.gitExecutor.listTags(params.projectPath);
128
- if (existingTags.success && existingTags.tags?.includes(params.tagName)) {
129
- if (!params.force) {
130
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('TAG_EXISTS', `Tag '${params.tagName}' already exists`, 'create', { tagName: params.tagName }, ['Use force=true to overwrite the existing tag or choose a different name']);
131
- }
132
- }
133
- // Prepare release message
134
- const releaseName = params.releaseName || params.tagName;
135
- const releaseBody = params.body || params.description || '';
136
- const releaseMessage = `${releaseName}\n\n${releaseBody}`.trim();
137
- // Create annotated tag with release information
138
- const result = await this.gitExecutor.createTag(params.projectPath, params.tagName, {
139
- message: releaseMessage,
140
- commit: params.commitish,
141
- annotated: true,
142
- force: Boolean(params.force)
143
- });
144
- if (!result.success) {
145
- return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'create release tag', params.projectPath);
146
- }
147
- return {
148
- success: true,
149
- data: {
150
- message: `Local release '${releaseName}' created successfully`,
151
- tagName: params.tagName,
152
- releaseName,
153
- description: releaseBody,
154
- commit: params.commitish || 'HEAD',
155
- draft: Boolean(params.draft),
156
- prerelease: Boolean(params.prerelease),
157
- output: result.stdout,
158
- note: 'This is a local release (tag). Use a provider for remote release management.'
159
- },
160
- metadata: {
161
- operation: 'create',
162
- timestamp: new Date().toISOString(),
163
- executionTime: Date.now() - startTime
164
- }
165
- };
166
- }
167
- catch (error) {
168
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
169
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('CREATE_RELEASE_ERROR', `Failed to create local release: ${errorMessage}`, 'create', { error: errorMessage, projectPath: params.projectPath });
170
- }
171
- }
172
- /**
173
- * Handle list local releases operation (lists tags as releases)
174
- */
175
- async handleListLocalReleases(params, startTime) {
176
- try {
177
- const result = await this.gitExecutor.listTags(params.projectPath, {
178
- sort: '-version:refname' // Sort by version descending
179
- });
180
- if (!result.success) {
181
- return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'list release tags', params.projectPath);
182
- }
183
- // Get detailed information for each tag (treating as releases)
184
- const releases = [];
185
- const tags = result.tags || [];
186
- const limit = params.limit || 20;
187
- for (const tag of tags.slice(0, limit)) {
188
- const tagInfo = await this.gitExecutor.getTagInfo(params.projectPath, tag);
189
- if (tagInfo.success) {
190
- releases.push({
191
- tagName: tag,
192
- name: tag,
193
- type: tagInfo.type,
194
- commit: tagInfo.commit,
195
- message: tagInfo.message,
196
- author: tagInfo.tagger,
197
- date: tagInfo.date,
198
- isLocal: true
199
- });
200
- }
201
- }
202
- return {
203
- success: true,
204
- data: {
205
- releases,
206
- total: releases.length,
207
- totalTags: tags.length,
208
- limit,
209
- note: 'These are local releases (tags). Use a provider for remote release management.'
210
- },
211
- metadata: {
212
- operation: 'list',
213
- timestamp: new Date().toISOString(),
214
- executionTime: Date.now() - startTime
215
- }
216
- };
217
- }
218
- catch (error) {
219
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
220
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('LIST_RELEASES_ERROR', `Failed to list local releases: ${errorMessage}`, 'list', { error: errorMessage, projectPath: params.projectPath });
221
- }
222
- }
223
- /**
224
- * Handle get local release operation (gets tag info as release)
225
- */
226
- async handleGetLocalRelease(params, startTime) {
227
- try {
228
- if (!params.tagName) {
229
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('MISSING_PARAMETER', 'tagName is required for get release operation', 'get', {}, ['Provide the tag name of the release to get information about']);
230
- }
231
- // Get tag information
232
- const tagInfo = await this.gitExecutor.getTagInfo(params.projectPath, params.tagName);
233
- if (!tagInfo.success) {
234
- return operation_error_handler_js_1.OperationErrorHandler.handleGitError(tagInfo.stderr, 'get release tag info', params.projectPath);
235
- }
236
- if (!tagInfo.exists) {
237
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('RELEASE_NOT_FOUND', `Release tag '${params.tagName}' does not exist`, 'get', { tagName: params.tagName }, ['Check the tag name or list available releases first']);
238
- }
239
- // Get commit information for the tag
240
- const commitInfo = await this.gitExecutor.getCommitInfo(params.projectPath, tagInfo.commit || params.tagName);
241
- // Parse release name and body from tag message
242
- const tagMessage = tagInfo.message || '';
243
- const lines = tagMessage.split('\n');
244
- const releaseName = lines[0] || params.tagName;
245
- const releaseBody = lines.slice(2).join('\n').trim(); // Skip empty line after title
246
- return {
247
- success: true,
248
- data: {
249
- tagName: params.tagName,
250
- name: releaseName,
251
- body: releaseBody,
252
- type: tagInfo.type,
253
- commit: tagInfo.commit,
254
- author: tagInfo.tagger,
255
- date: tagInfo.date,
256
- commitInfo: commitInfo.success ? {
257
- hash: commitInfo.hash,
258
- author: commitInfo.author,
259
- date: commitInfo.date,
260
- message: commitInfo.message
261
- } : null,
262
- isLocal: true,
263
- note: 'This is a local release (tag). Use a provider for remote release management.'
264
- },
265
- metadata: {
266
- operation: 'get',
267
- timestamp: new Date().toISOString(),
268
- executionTime: Date.now() - startTime
269
- }
270
- };
271
- }
272
- catch (error) {
273
- const errorMessage = error instanceof Error ? error.message : 'Unknown error';
274
- return operation_error_handler_js_1.OperationErrorHandler.createToolError('GET_RELEASE_ERROR', `Failed to get local release information: ${errorMessage}`, 'get', { error: errorMessage, projectPath: params.projectPath });
275
- }
276
- }
277
- /**
278
- * Check if operation is a remote operation
279
- */
280
- isRemoteOperation(action) {
281
- // Most release operations require remote provider APIs
282
- const remoteOperations = ['create', 'list', 'get', 'update', 'delete', 'publish', 'download'];
283
- return remoteOperations.includes(action);
284
- }
285
- /**
286
- * Extract parameters for remote operations
287
- */
288
- extractRemoteParameters(params) {
289
- const remoteParams = {
290
- projectPath: params.projectPath
291
- };
292
- // Common parameters
293
- if (params.repo)
294
- remoteParams.repo = params.repo;
295
- if (params.tagName) {
296
- remoteParams.tagName = params.tagName;
297
- remoteParams.tag_name = params.tagName; // GitHub API expects tag_name
298
- }
299
- // Operation-specific parameters
300
- switch (params.action) {
301
- case 'create':
302
- if (params.releaseName)
303
- remoteParams.name = params.releaseName;
304
- if (params.description)
305
- remoteParams.description = params.description;
306
- if (params.body)
307
- remoteParams.body = params.body;
308
- if (params.commitish)
309
- remoteParams.target_commitish = params.commitish;
310
- if (params.draft !== undefined)
311
- remoteParams.draft = params.draft;
312
- if (params.prerelease !== undefined)
313
- remoteParams.prerelease = params.prerelease;
314
- if (params.generateNotes !== undefined)
315
- remoteParams.generate_release_notes = params.generateNotes;
316
- if (params.assets)
317
- remoteParams.assets = params.assets;
318
- break;
319
- case 'list':
320
- if (params.limit)
321
- remoteParams.per_page = params.limit;
322
- if (params.includeDrafts !== undefined)
323
- remoteParams.include_drafts = params.includeDrafts;
324
- if (params.includePrerelease !== undefined)
325
- remoteParams.include_prerelease = params.includePrerelease;
326
- break;
327
- case 'get':
328
- // Get operations need tagName (already handled above)
329
- break;
330
- case 'update':
331
- if (params.releaseName)
332
- remoteParams.name = params.releaseName;
333
- if (params.description)
334
- remoteParams.description = params.description;
335
- if (params.body)
336
- remoteParams.body = params.body;
337
- if (params.draft !== undefined)
338
- remoteParams.draft = params.draft;
339
- if (params.prerelease !== undefined)
340
- remoteParams.prerelease = params.prerelease;
341
- if (params.assets)
342
- remoteParams.assets = params.assets;
343
- break;
344
- case 'delete':
345
- // Delete operations need tagName (already handled above)
346
- break;
347
- case 'publish':
348
- // Publish operations (make draft release public)
349
- remoteParams.draft = false;
350
- break;
351
- case 'download':
352
- if (params.assetName)
353
- remoteParams.asset_name = params.assetName;
354
- if (params.downloadPath)
355
- remoteParams.download_path = params.downloadPath;
356
- break;
357
- }
358
- return remoteParams;
359
- }
360
- /**
361
- * Map git-release actions to provider operations
362
- */
363
- mapActionToProviderOperation(action) {
364
- const actionMap = {
365
- 'create': 'release-create',
366
- 'list': 'release-list',
367
- 'get': 'release-get',
368
- 'update': 'release-update',
369
- 'delete': 'release-delete',
370
- 'publish': 'release-publish',
371
- 'download': 'release-download'
372
- };
373
- return actionMap[action] || action;
374
- }
375
- /**
376
- * Get tool schema for MCP registration
377
- */
378
- static getToolSchema() {
379
- return {
380
- name: 'git-release',
381
- description: 'Git release management tool for release operations. Supports create, list, get, update, delete, publish, and download operations. Local operations work with tags, remote operations require a provider. In universal mode (GIT_MCP_MODE=universal), automatically executes on both GitHub and Gitea providers.',
382
- inputSchema: {
383
- type: 'object',
384
- properties: {
385
- action: {
386
- type: 'string',
387
- enum: ['create', 'list', 'get', 'update', 'delete', 'publish', 'download'],
388
- description: 'The release operation to perform'
389
- },
390
- projectPath: {
391
- type: 'string',
392
- description: 'Absolute path to the project directory'
393
- },
394
- tagName: {
395
- type: 'string',
396
- description: 'Tag name for the release (required for most operations)'
397
- },
398
- releaseName: {
399
- type: 'string',
400
- description: 'Name of the release (defaults to tagName, for create/update)'
401
- },
402
- description: {
403
- type: 'string',
404
- description: 'Short description of the release (for create/update)'
405
- },
406
- body: {
407
- type: 'string',
408
- description: 'Detailed release notes/body (for create/update)'
409
- },
410
- commitish: {
411
- type: 'string',
412
- description: 'Commit or branch to create release from (default: HEAD, for create)'
413
- },
414
- draft: {
415
- type: 'boolean',
416
- description: 'Create as draft release (for create/update)'
417
- },
418
- prerelease: {
419
- type: 'boolean',
420
- description: 'Mark as pre-release (for create/update)'
421
- },
422
- assets: {
423
- type: 'array',
424
- items: { type: 'string' },
425
- description: 'File paths to upload as release assets (for create/update)'
426
- },
427
- assetName: {
428
- type: 'string',
429
- description: 'Specific asset name to download (for download)'
430
- },
431
- downloadPath: {
432
- type: 'string',
433
- description: 'Path to save downloaded assets (for download)'
434
- },
435
- force: {
436
- type: 'boolean',
437
- description: 'Force operation (for delete, update)'
438
- },
439
- generateNotes: {
440
- type: 'boolean',
441
- description: 'Auto-generate release notes (for create)'
442
- },
443
- repo: {
444
- type: 'string',
445
- description: 'Repository name (for remote operations)'
446
- },
447
- limit: {
448
- type: 'number',
449
- description: 'Maximum number of releases to return (for list)'
450
- },
451
- includeDrafts: {
452
- type: 'boolean',
453
- description: 'Include draft releases in list (for list)'
454
- },
455
- includePrerelease: {
456
- type: 'boolean',
457
- description: 'Include pre-releases in list (for list)'
458
- }
459
- },
460
- required: ['action', 'projectPath']
461
- }
462
- };
463
- }
464
- }
465
- exports.GitReleaseTool = GitReleaseTool;
466
- //# sourceMappingURL=git-release.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"git-release.js","sourceRoot":"","sources":["../../src/tools/git-release.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,8EAAsE;AACtE,4EAAiF;AACjF,oFAAwF;AACxF,8FAAsF;AAEtF,4CAA6C;AAkC7C,MAAa,cAAc;IACjB,WAAW,CAAqB;IAChC,eAAe,CAA4B;IAEnD,YAAY,cAA+B;QACzC,IAAI,CAAC,WAAW,GAAG,IAAI,4CAAkB,EAAE,CAAC;QAC5C,IAAI,cAAc,EAAE,CAAC;YACnB,IAAI,CAAC,eAAe,GAAG,IAAI,wDAAwB,CAAC,cAAc,CAAC,CAAC;QACtE,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAO,CAAC,MAAwB;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAE7B,IAAI,CAAC;YACH,4BAA4B;YAC5B,MAAM,UAAU,GAAG,2CAAkB,CAAC,kBAAkB,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YAChF,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;gBACxB,OAAO,kDAAqB,CAAC,eAAe,CAC1C,kBAAkB,EAClB,gCAAgC,UAAU,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