@andrebuzeli/git-mcp 5.0.5 → 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.
- package/LICENSE +21 -0
- package/README.md +143 -89
- package/dist/config.d.ts +72 -71
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +226 -139
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +15 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +133 -128
- package/dist/index.js.map +1 -1
- package/dist/providers/base-provider.d.ts +42 -153
- package/dist/providers/base-provider.d.ts.map +1 -1
- package/dist/providers/base-provider.js +42 -302
- package/dist/providers/base-provider.js.map +1 -1
- package/dist/providers/gitea-provider.d.ts +67 -118
- package/dist/providers/gitea-provider.d.ts.map +1 -1
- package/dist/providers/gitea-provider.js +487 -1161
- package/dist/providers/gitea-provider.js.map +1 -1
- package/dist/providers/github-provider.d.ts +70 -81
- package/dist/providers/github-provider.d.ts.map +1 -1
- package/dist/providers/github-provider.js +641 -278
- package/dist/providers/github-provider.js.map +1 -1
- package/dist/providers/index.d.ts +9 -9
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +13 -19
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/provider-factory.d.ts +29 -59
- package/dist/providers/provider-factory.d.ts.map +1 -1
- package/dist/providers/provider-factory.js +134 -265
- package/dist/providers/provider-factory.js.map +1 -1
- package/dist/providers/provider-operation-handler.d.ts +93 -0
- package/dist/providers/provider-operation-handler.d.ts.map +1 -0
- package/dist/providers/provider-operation-handler.js +280 -0
- package/dist/providers/provider-operation-handler.js.map +1 -0
- package/dist/providers/types.d.ts +201 -355
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/providers/types.js +3 -2
- package/dist/providers/types.js.map +1 -1
- package/dist/server.d.ts +34 -8
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +436 -494
- package/dist/server.js.map +1 -1
- package/dist/tools/git-analytics.d.ts +239 -16
- package/dist/tools/git-analytics.d.ts.map +1 -1
- package/dist/tools/git-analytics.js +737 -25
- package/dist/tools/git-analytics.js.map +1 -1
- package/dist/tools/git-archive.d.ts +109 -15
- package/dist/tools/git-archive.d.ts.map +1 -1
- package/dist/tools/git-archive.js +462 -10
- package/dist/tools/git-archive.js.map +1 -1
- package/dist/tools/git-backup.d.ts +101 -15
- package/dist/tools/git-backup.d.ts.map +1 -1
- package/dist/tools/git-backup.js +410 -10
- package/dist/tools/git-backup.js.map +1 -1
- package/dist/tools/git-branches.d.ts +141 -15
- package/dist/tools/git-branches.d.ts.map +1 -1
- package/dist/tools/git-branches.js +466 -11
- package/dist/tools/git-branches.js.map +1 -1
- package/dist/tools/git-config.d.ts +115 -15
- package/dist/tools/git-config.d.ts.map +1 -1
- package/dist/tools/git-config.js +446 -11
- package/dist/tools/git-config.js.map +1 -1
- package/dist/tools/git-files.d.ts +179 -59
- package/dist/tools/git-files.d.ts.map +1 -1
- package/dist/tools/git-files.js +682 -222
- package/dist/tools/git-files.js.map +1 -1
- package/dist/tools/git-issues.d.ts +158 -15
- package/dist/tools/git-issues.d.ts.map +1 -1
- package/dist/tools/git-issues.js +323 -11
- package/dist/tools/git-issues.js.map +1 -1
- package/dist/tools/git-monitor.d.ts +149 -14
- package/dist/tools/git-monitor.d.ts.map +1 -1
- package/dist/tools/git-monitor.js +528 -11
- package/dist/tools/git-monitor.js.map +1 -1
- package/dist/tools/git-packages.d.ts +163 -15
- package/dist/tools/git-packages.d.ts.map +1 -1
- package/dist/tools/git-packages.js +526 -11
- package/dist/tools/git-packages.js.map +1 -1
- package/dist/tools/git-pulls.d.ts +174 -15
- package/dist/tools/git-pulls.d.ts.map +1 -1
- package/dist/tools/git-pulls.js +352 -11
- package/dist/tools/git-pulls.js.map +1 -1
- package/dist/tools/git-release.d.ts +167 -15
- package/dist/tools/git-release.d.ts.map +1 -1
- package/dist/tools/git-release.js +465 -11
- package/dist/tools/git-release.js.map +1 -1
- package/dist/tools/git-remote.d.ts +124 -15
- package/dist/tools/git-remote.d.ts.map +1 -1
- package/dist/tools/git-remote.js +539 -11
- package/dist/tools/git-remote.js.map +1 -1
- package/dist/tools/git-reset.d.ts +100 -15
- package/dist/tools/git-reset.d.ts.map +1 -1
- package/dist/tools/git-reset.js +409 -11
- package/dist/tools/git-reset.js.map +1 -1
- package/dist/tools/git-stash.d.ts +120 -15
- package/dist/tools/git-stash.d.ts.map +1 -1
- package/dist/tools/git-stash.js +503 -11
- package/dist/tools/git-stash.js.map +1 -1
- package/dist/tools/git-sync.d.ts +160 -16
- package/dist/tools/git-sync.d.ts.map +1 -1
- package/dist/tools/git-sync.js +462 -113
- package/dist/tools/git-sync.js.map +1 -1
- package/dist/tools/git-tags.d.ts +142 -15
- package/dist/tools/git-tags.d.ts.map +1 -1
- package/dist/tools/git-tags.js +471 -11
- package/dist/tools/git-tags.js.map +1 -1
- package/dist/tools/git-workflow.d.ts +151 -80
- package/dist/tools/git-workflow.d.ts.map +1 -1
- package/dist/tools/git-workflow.js +407 -912
- package/dist/tools/git-workflow.js.map +1 -1
- package/dist/utils/credential-manager.d.ts +119 -0
- package/dist/utils/credential-manager.d.ts.map +1 -0
- package/dist/utils/credential-manager.js +450 -0
- package/dist/utils/credential-manager.js.map +1 -0
- package/dist/utils/git-command-executor.d.ts +326 -0
- package/dist/utils/git-command-executor.d.ts.map +1 -0
- package/dist/utils/git-command-executor.js +877 -0
- package/dist/utils/git-command-executor.js.map +1 -0
- package/dist/utils/logger.d.ts +143 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +473 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/operation-error-handler.d.ts +54 -41
- package/dist/utils/operation-error-handler.d.ts.map +1 -1
- package/dist/utils/operation-error-handler.js +211 -227
- package/dist/utils/operation-error-handler.js.map +1 -1
- package/dist/utils/parameter-validator.d.ts +41 -0
- package/dist/utils/parameter-validator.d.ts.map +1 -0
- package/dist/utils/parameter-validator.js +464 -0
- package/dist/utils/parameter-validator.js.map +1 -0
- package/dist/utils/repository-detector.d.ts +128 -0
- package/dist/utils/repository-detector.d.ts.map +1 -0
- package/dist/utils/repository-detector.js +422 -0
- package/dist/utils/repository-detector.js.map +1 -0
- package/dist/utils/response-formatter.d.ts +146 -0
- package/dist/utils/response-formatter.d.ts.map +1 -0
- package/dist/utils/response-formatter.js +378 -0
- package/dist/utils/response-formatter.js.map +1 -0
- package/dist/utils/retry.d.ts +12 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/utils/retry.js +28 -0
- package/dist/utils/retry.js.map +1 -0
- package/dist/utils/terminal-controller.d.ts +73 -139
- package/dist/utils/terminal-controller.d.ts.map +1 -1
- package/dist/utils/terminal-controller.js +234 -459
- package/dist/utils/terminal-controller.js.map +1 -1
- package/package.json +79 -60
- package/dist/providers/error-handler.d.ts +0 -51
- package/dist/providers/error-handler.d.ts.map +0 -1
- package/dist/providers/error-handler.js +0 -176
- package/dist/providers/error-handler.js.map +0 -1
- package/dist/providers/github-provider-backup.d.ts +0 -81
- package/dist/providers/github-provider-backup.d.ts.map +0 -1
- package/dist/providers/github-provider-backup.js +0 -1179
- package/dist/providers/github-provider-backup.js.map +0 -1
- package/dist/providers/github-provider-complete.d.ts +0 -1
- package/dist/providers/github-provider-complete.d.ts.map +0 -1
- package/dist/providers/github-provider-complete.js +0 -2
- package/dist/providers/github-provider-complete.js.map +0 -1
- package/dist/tools/git-init.d.ts +0 -50
- package/dist/tools/git-init.d.ts.map +0 -1
- package/dist/tools/git-init.js +0 -258
- package/dist/tools/git-init.js.map +0 -1
- package/dist/tools/git-log.d.ts +0 -67
- package/dist/tools/git-log.d.ts.map +0 -1
- package/dist/tools/git-log.js +0 -320
- package/dist/tools/git-log.js.map +0 -1
- package/dist/tools/git-status.d.ts +0 -29
- package/dist/tools/git-status.d.ts.map +0 -1
- package/dist/tools/git-status.js +0 -182
- package/dist/tools/git-status.js.map +0 -1
- package/dist/tools/git-update.d.ts +0 -34
- package/dist/tools/git-update.d.ts.map +0 -1
- package/dist/tools/git-update.js +0 -191
- package/dist/tools/git-update.js.map +0 -1
- package/dist/utils/auto-detection.d.ts +0 -120
- package/dist/utils/auto-detection.d.ts.map +0 -1
- package/dist/utils/auto-detection.js +0 -259
- package/dist/utils/auto-detection.js.map +0 -1
- package/dist/utils/configuration-error-generator.d.ts +0 -41
- package/dist/utils/configuration-error-generator.d.ts.map +0 -1
- package/dist/utils/configuration-error-generator.js +0 -168
- package/dist/utils/configuration-error-generator.js.map +0 -1
- package/dist/utils/configuration-validator.d.ts +0 -67
- package/dist/utils/configuration-validator.d.ts.map +0 -1
- package/dist/utils/configuration-validator.js +0 -257
- package/dist/utils/configuration-validator.js.map +0 -1
- package/dist/utils/error-handler.d.ts +0 -107
- package/dist/utils/error-handler.d.ts.map +0 -1
- package/dist/utils/error-handler.js +0 -331
- package/dist/utils/error-handler.js.map +0 -1
- package/dist/utils/git-operations.d.ts +0 -200
- package/dist/utils/git-operations.d.ts.map +0 -1
- package/dist/utils/git-operations.js +0 -836
- package/dist/utils/git-operations.js.map +0 -1
- package/dist/utils/multi-provider-error-handler.d.ts +0 -75
- package/dist/utils/multi-provider-error-handler.d.ts.map +0 -1
- package/dist/utils/multi-provider-error-handler.js +0 -276
- package/dist/utils/multi-provider-error-handler.js.map +0 -1
- package/dist/utils/multi-provider-operation-handler.d.ts +0 -113
- package/dist/utils/multi-provider-operation-handler.d.ts.map +0 -1
- package/dist/utils/multi-provider-operation-handler.js +0 -303
- package/dist/utils/multi-provider-operation-handler.js.map +0 -1
- package/dist/utils/provider-operation-handler.d.ts +0 -80
- package/dist/utils/provider-operation-handler.d.ts.map +0 -1
- package/dist/utils/provider-operation-handler.js +0 -201
- package/dist/utils/provider-operation-handler.js.map +0 -1
- package/dist/utils/response-helper.d.ts +0 -57
- package/dist/utils/response-helper.d.ts.map +0 -1
- package/dist/utils/response-helper.js +0 -54
- package/dist/utils/response-helper.js.map +0 -1
- package/dist/utils/user-detection.d.ts +0 -25
- package/dist/utils/user-detection.d.ts.map +0 -1
- package/dist/utils/user-detection.js +0 -54
- package/dist/utils/user-detection.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-branches.js","sourceRoot":"","sources":["../../src/tools/git-branches.ts"],"names":[],"mappings":";;;AAAA,kEAAoG;AAEvF,QAAA,eAAe,GAAG;IAC7B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,yCAAyC;IACtD,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,8BAA8B,EAAE,SAAS,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC,EAAE,CAAC,CAAC;IACnJ,CAAC;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"git-branches.js","sourceRoot":"","sources":["../../src/tools/git-branches.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAEH,8EAAwF;AACxF,4EAAiF;AACjF,oFAAwF;AACxF,8FAAsF;AAuBtF,MAAa,eAAe;IAClB,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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E,QAAQ;wBACd,WAAW,EAAE,0DAA0D;qBACxE;oBACD,aAAa,EAAE;wBACb,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,8DAA8D;qBAC5E;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,SAAS;wBACf,WAAW,EAAE,6CAA6C;qBAC3D;oBACD,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,+BAA+B;qBAC7C;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,SAAS;wBACf,WAAW,EAAE,oDAAoD;qBAClE;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,0CAA0C;qBACxD;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,yCAAyC;qBACvD;iBACF;gBACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,aAAa,CAAC;aACpC;SACF,CAAC;IACJ,CAAC;CACF;AAlnBD,0CAknBC"}
|
|
@@ -1,19 +1,119 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Git Configuration Tool
|
|
3
|
+
*
|
|
4
|
+
* Git configuration management tool providing comprehensive Git config operations.
|
|
5
|
+
* Supports get, set, unset, list, edit, and show operations for Git configuration.
|
|
6
|
+
*
|
|
7
|
+
* Operations: get, set, unset, list, edit, show
|
|
8
|
+
*/
|
|
9
|
+
import { ToolParams } from '../utils/parameter-validator.js';
|
|
10
|
+
import { ToolResult } from '../utils/operation-error-handler.js';
|
|
11
|
+
export interface GitConfigParams extends ToolParams {
|
|
12
|
+
action: 'get' | 'set' | 'unset' | 'list' | 'edit' | 'show';
|
|
13
|
+
key?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
global?: boolean;
|
|
16
|
+
local?: boolean;
|
|
17
|
+
system?: boolean;
|
|
18
|
+
showOrigin?: boolean;
|
|
19
|
+
showScope?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare class GitConfigTool {
|
|
22
|
+
private gitExecutor;
|
|
23
|
+
constructor();
|
|
24
|
+
/**
|
|
25
|
+
* Execute git-config operation
|
|
26
|
+
*/
|
|
27
|
+
execute(params: GitConfigParams): Promise<ToolResult>;
|
|
28
|
+
/**
|
|
29
|
+
* Validate operation-specific parameters
|
|
30
|
+
*/
|
|
31
|
+
private validateOperationParams;
|
|
32
|
+
/**
|
|
33
|
+
* Validate configuration key format
|
|
34
|
+
*/
|
|
35
|
+
private isValidConfigKey;
|
|
36
|
+
/**
|
|
37
|
+
* Handle get configuration operation
|
|
38
|
+
*/
|
|
39
|
+
private handleGet;
|
|
40
|
+
/**
|
|
41
|
+
* Handle set configuration operation
|
|
42
|
+
*/
|
|
43
|
+
private handleSet;
|
|
44
|
+
/**
|
|
45
|
+
* Handle unset configuration operation
|
|
46
|
+
*/
|
|
47
|
+
private handleUnset;
|
|
48
|
+
/**
|
|
49
|
+
* Handle list configuration operation
|
|
50
|
+
*/
|
|
51
|
+
private handleList;
|
|
52
|
+
/**
|
|
53
|
+
* Handle edit configuration operation
|
|
54
|
+
*/
|
|
55
|
+
private handleEdit;
|
|
56
|
+
/**
|
|
57
|
+
* Handle show configuration operation
|
|
58
|
+
*/
|
|
59
|
+
private handleShow;
|
|
60
|
+
/**
|
|
61
|
+
* Get scope string for display
|
|
62
|
+
*/
|
|
63
|
+
private getScopeString;
|
|
64
|
+
/**
|
|
65
|
+
* Group configurations by section
|
|
66
|
+
*/
|
|
67
|
+
private groupConfigsBySection;
|
|
68
|
+
/**
|
|
69
|
+
* Get tool schema for MCP registration
|
|
70
|
+
*/
|
|
71
|
+
static getToolSchema(): {
|
|
72
|
+
name: string;
|
|
73
|
+
description: string;
|
|
74
|
+
inputSchema: {
|
|
75
|
+
type: string;
|
|
76
|
+
properties: {
|
|
77
|
+
action: {
|
|
78
|
+
type: string;
|
|
79
|
+
enum: string[];
|
|
80
|
+
description: string;
|
|
81
|
+
};
|
|
82
|
+
projectPath: {
|
|
83
|
+
type: string;
|
|
84
|
+
description: string;
|
|
85
|
+
};
|
|
86
|
+
key: {
|
|
87
|
+
type: string;
|
|
88
|
+
description: string;
|
|
89
|
+
};
|
|
90
|
+
value: {
|
|
91
|
+
type: string;
|
|
92
|
+
description: string;
|
|
93
|
+
};
|
|
94
|
+
global: {
|
|
95
|
+
type: string;
|
|
96
|
+
description: string;
|
|
97
|
+
};
|
|
98
|
+
local: {
|
|
99
|
+
type: string;
|
|
100
|
+
description: string;
|
|
101
|
+
};
|
|
102
|
+
system: {
|
|
103
|
+
type: string;
|
|
104
|
+
description: string;
|
|
105
|
+
};
|
|
106
|
+
showOrigin: {
|
|
107
|
+
type: string;
|
|
108
|
+
description: string;
|
|
109
|
+
};
|
|
110
|
+
showScope: {
|
|
111
|
+
type: string;
|
|
112
|
+
description: string;
|
|
113
|
+
};
|
|
13
114
|
};
|
|
115
|
+
required: string[];
|
|
14
116
|
};
|
|
15
|
-
required: string[];
|
|
16
117
|
};
|
|
17
|
-
|
|
18
|
-
};
|
|
118
|
+
}
|
|
19
119
|
//# sourceMappingURL=git-config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-config.d.ts","sourceRoot":"","sources":["../../src/tools/git-config.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"git-config.d.ts","sourceRoot":"","sources":["../../src/tools/git-config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAsB,UAAU,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAAyB,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAExF,MAAM,WAAW,eAAgB,SAAQ,UAAU;IACjD,MAAM,EAAE,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAG3D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IAGf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IAGjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,WAAW,CAAqB;;IAMxC;;OAEG;IACG,OAAO,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC;IAgE3D;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAoC/B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAKxB;;OAEG;YACW,SAAS;IA6DvB;;OAEG;YACW,SAAS;IA2CvB;;OAEG;YACW,WAAW;IA2DzB;;OAEG;YACW,UAAU;IA+CxB;;OAEG;YACW,UAAU;IAwCxB;;OAEG;YACW,UAAU;IAuExB;;OAEG;IACH,OAAO,CAAC,cAAc;IAOtB;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAiB7B;;OAEG;IACH,MAAM,CAAC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDrB"}
|
package/dist/tools/git-config.js
CHANGED
|
@@ -1,14 +1,449 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Git Configuration Tool
|
|
4
|
+
*
|
|
5
|
+
* Git configuration management tool providing comprehensive Git config operations.
|
|
6
|
+
* Supports get, set, unset, list, edit, and show operations for Git configuration.
|
|
7
|
+
*
|
|
8
|
+
* Operations: get, set, unset, list, edit, show
|
|
9
|
+
*/
|
|
2
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
exports.GitConfigTool = 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 GitConfigTool {
|
|
16
|
+
gitExecutor;
|
|
17
|
+
constructor() {
|
|
18
|
+
this.gitExecutor = new git_command_executor_js_1.GitCommandExecutor();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Execute git-config 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-config', 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
|
+
// Route to appropriate handler
|
|
37
|
+
switch (params.action) {
|
|
38
|
+
case 'get':
|
|
39
|
+
return await this.handleGet(params, startTime);
|
|
40
|
+
case 'set':
|
|
41
|
+
return await this.handleSet(params, startTime);
|
|
42
|
+
case 'unset':
|
|
43
|
+
return await this.handleUnset(params, startTime);
|
|
44
|
+
case 'list':
|
|
45
|
+
return await this.handleList(params, startTime);
|
|
46
|
+
case 'edit':
|
|
47
|
+
return await this.handleEdit(params, startTime);
|
|
48
|
+
case 'show':
|
|
49
|
+
return await this.handleShow(params, startTime);
|
|
50
|
+
default:
|
|
51
|
+
return operation_error_handler_js_1.OperationErrorHandler.createToolError('UNSUPPORTED_OPERATION', `Operation '${params.action}' is not supported`, params.action, {}, ['Use one of: get, set, unset, list, edit, show']);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch (error) {
|
|
55
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
56
|
+
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']);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Validate operation-specific parameters
|
|
61
|
+
*/
|
|
62
|
+
validateOperationParams(params) {
|
|
63
|
+
const errors = [];
|
|
64
|
+
const suggestions = [];
|
|
65
|
+
// Validate key requirement for specific operations
|
|
66
|
+
if (['get', 'set', 'unset'].includes(params.action) && !params.key) {
|
|
67
|
+
errors.push(`Key parameter is required for ${params.action} operation`);
|
|
68
|
+
suggestions.push('Provide a configuration key (e.g., user.name, user.email)');
|
|
69
|
+
}
|
|
70
|
+
// Validate value requirement for set operation
|
|
71
|
+
if (params.action === 'set' && !params.value) {
|
|
72
|
+
errors.push('Value parameter is required for set operation');
|
|
73
|
+
suggestions.push('Provide a configuration value to set');
|
|
74
|
+
}
|
|
75
|
+
// Validate scope conflicts
|
|
76
|
+
const scopeCount = [params.global, params.local, params.system].filter(Boolean).length;
|
|
77
|
+
if (scopeCount > 1) {
|
|
78
|
+
errors.push('Only one scope can be specified (global, local, or system)');
|
|
79
|
+
suggestions.push('Choose either --global, --local, or --system, not multiple');
|
|
80
|
+
}
|
|
81
|
+
// Validate key format
|
|
82
|
+
if (params.key && !this.isValidConfigKey(params.key)) {
|
|
83
|
+
errors.push('Invalid configuration key format');
|
|
84
|
+
suggestions.push('Use format like: user.name, core.editor, remote.origin.url');
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
isValid: errors.length === 0,
|
|
88
|
+
errors,
|
|
89
|
+
suggestions
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Validate configuration key format
|
|
94
|
+
*/
|
|
95
|
+
isValidConfigKey(key) {
|
|
96
|
+
// Git config keys should contain at least one dot and valid characters
|
|
97
|
+
return /^[a-zA-Z][a-zA-Z0-9-]*(\.[a-zA-Z][a-zA-Z0-9-]*)+$/.test(key);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Handle get configuration operation
|
|
101
|
+
*/
|
|
102
|
+
async handleGet(params, startTime) {
|
|
103
|
+
try {
|
|
104
|
+
const result = await this.gitExecutor.getConfig(params.projectPath, params.key, {
|
|
105
|
+
global: params.global,
|
|
106
|
+
local: params.local,
|
|
107
|
+
system: params.system
|
|
108
|
+
});
|
|
109
|
+
if (!result.success) {
|
|
110
|
+
// Check if it's a "not found" error
|
|
111
|
+
if (result.stderr.includes('not found') || result.exitCode === 1) {
|
|
112
|
+
return {
|
|
113
|
+
success: true,
|
|
114
|
+
data: {
|
|
115
|
+
key: params.key,
|
|
116
|
+
value: null,
|
|
117
|
+
found: false,
|
|
118
|
+
message: `Configuration key '${params.key}' not found`,
|
|
119
|
+
scope: this.getScopeString(params)
|
|
120
|
+
},
|
|
121
|
+
metadata: {
|
|
122
|
+
operation: 'get',
|
|
123
|
+
timestamp: new Date().toISOString(),
|
|
124
|
+
executionTime: Date.now() - startTime
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'get config', params.projectPath);
|
|
129
|
+
}
|
|
130
|
+
return {
|
|
131
|
+
success: true,
|
|
132
|
+
data: {
|
|
133
|
+
key: params.key,
|
|
134
|
+
value: result.value,
|
|
135
|
+
found: true,
|
|
136
|
+
scope: this.getScopeString(params),
|
|
137
|
+
raw: result.stdout
|
|
138
|
+
},
|
|
139
|
+
metadata: {
|
|
140
|
+
operation: 'get',
|
|
141
|
+
timestamp: new Date().toISOString(),
|
|
142
|
+
executionTime: Date.now() - startTime
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
148
|
+
return operation_error_handler_js_1.OperationErrorHandler.createToolError('GET_CONFIG_ERROR', `Failed to get configuration: ${errorMessage}`, 'get', { error: errorMessage, key: params.key });
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Handle set configuration operation
|
|
153
|
+
*/
|
|
154
|
+
async handleSet(params, startTime) {
|
|
155
|
+
try {
|
|
156
|
+
const result = await this.gitExecutor.setConfig(params.projectPath, params.key, params.value, {
|
|
157
|
+
global: params.global,
|
|
158
|
+
local: params.local,
|
|
159
|
+
system: params.system
|
|
160
|
+
});
|
|
161
|
+
if (!result.success) {
|
|
162
|
+
return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'set config', params.projectPath);
|
|
163
|
+
}
|
|
164
|
+
return {
|
|
165
|
+
success: true,
|
|
166
|
+
data: {
|
|
167
|
+
message: 'Configuration set successfully',
|
|
168
|
+
key: params.key,
|
|
169
|
+
value: params.value,
|
|
170
|
+
scope: this.getScopeString(params),
|
|
171
|
+
output: result.stdout
|
|
172
|
+
},
|
|
173
|
+
metadata: {
|
|
174
|
+
operation: 'set',
|
|
175
|
+
timestamp: new Date().toISOString(),
|
|
176
|
+
executionTime: Date.now() - startTime
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
182
|
+
return operation_error_handler_js_1.OperationErrorHandler.createToolError('SET_CONFIG_ERROR', `Failed to set configuration: ${errorMessage}`, 'set', { error: errorMessage, key: params.key, value: params.value });
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Handle unset configuration operation
|
|
187
|
+
*/
|
|
188
|
+
async handleUnset(params, startTime) {
|
|
189
|
+
try {
|
|
190
|
+
const result = await this.gitExecutor.unsetConfig(params.projectPath, params.key, {
|
|
191
|
+
global: params.global,
|
|
192
|
+
local: params.local,
|
|
193
|
+
system: params.system
|
|
194
|
+
});
|
|
195
|
+
if (!result.success) {
|
|
196
|
+
// Check if it's a "not found" error
|
|
197
|
+
if (result.stderr.includes('not found') || result.exitCode === 5) {
|
|
198
|
+
return {
|
|
199
|
+
success: true,
|
|
200
|
+
data: {
|
|
201
|
+
key: params.key,
|
|
202
|
+
found: false,
|
|
203
|
+
message: `Configuration key '${params.key}' was not set`,
|
|
204
|
+
scope: this.getScopeString(params)
|
|
205
|
+
},
|
|
206
|
+
metadata: {
|
|
207
|
+
operation: 'unset',
|
|
208
|
+
timestamp: new Date().toISOString(),
|
|
209
|
+
executionTime: Date.now() - startTime
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'unset config', params.projectPath);
|
|
214
|
+
}
|
|
215
|
+
return {
|
|
216
|
+
success: true,
|
|
217
|
+
data: {
|
|
218
|
+
message: 'Configuration unset successfully',
|
|
219
|
+
key: params.key,
|
|
220
|
+
scope: this.getScopeString(params),
|
|
221
|
+
output: result.stdout
|
|
222
|
+
},
|
|
223
|
+
metadata: {
|
|
224
|
+
operation: 'unset',
|
|
225
|
+
timestamp: new Date().toISOString(),
|
|
226
|
+
executionTime: Date.now() - startTime
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
catch (error) {
|
|
231
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
232
|
+
return operation_error_handler_js_1.OperationErrorHandler.createToolError('UNSET_CONFIG_ERROR', `Failed to unset configuration: ${errorMessage}`, 'unset', { error: errorMessage, key: params.key });
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Handle list configuration operation
|
|
237
|
+
*/
|
|
238
|
+
async handleList(params, startTime) {
|
|
239
|
+
try {
|
|
240
|
+
const result = await this.gitExecutor.listConfig(params.projectPath, {
|
|
241
|
+
global: params.global,
|
|
242
|
+
local: params.local,
|
|
243
|
+
system: params.system,
|
|
244
|
+
showOrigin: params.showOrigin
|
|
245
|
+
});
|
|
246
|
+
if (!result.success) {
|
|
247
|
+
return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'list config', params.projectPath);
|
|
248
|
+
}
|
|
249
|
+
const configs = result.configs || [];
|
|
250
|
+
const groupedConfigs = this.groupConfigsBySection(configs);
|
|
251
|
+
return {
|
|
252
|
+
success: true,
|
|
253
|
+
data: {
|
|
254
|
+
message: `Found ${configs.length} configuration entries`,
|
|
255
|
+
scope: this.getScopeString(params),
|
|
256
|
+
totalCount: configs.length,
|
|
257
|
+
configs: configs,
|
|
258
|
+
groupedConfigs: groupedConfigs,
|
|
259
|
+
showOrigin: params.showOrigin,
|
|
260
|
+
raw: result.stdout
|
|
261
|
+
},
|
|
262
|
+
metadata: {
|
|
263
|
+
operation: 'list',
|
|
264
|
+
timestamp: new Date().toISOString(),
|
|
265
|
+
executionTime: Date.now() - startTime
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
catch (error) {
|
|
270
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
271
|
+
return operation_error_handler_js_1.OperationErrorHandler.createToolError('LIST_CONFIG_ERROR', `Failed to list configuration: ${errorMessage}`, 'list', { error: errorMessage });
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Handle edit configuration operation
|
|
276
|
+
*/
|
|
277
|
+
async handleEdit(params, startTime) {
|
|
278
|
+
try {
|
|
279
|
+
const result = await this.gitExecutor.editConfig(params.projectPath, {
|
|
280
|
+
global: params.global,
|
|
281
|
+
local: params.local,
|
|
282
|
+
system: params.system
|
|
283
|
+
});
|
|
284
|
+
if (!result.success) {
|
|
285
|
+
return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'edit config', params.projectPath);
|
|
286
|
+
}
|
|
287
|
+
return {
|
|
288
|
+
success: true,
|
|
289
|
+
data: {
|
|
290
|
+
message: 'Configuration editor opened successfully',
|
|
291
|
+
scope: this.getScopeString(params),
|
|
292
|
+
note: 'Configuration file was opened in the default editor',
|
|
293
|
+
output: result.stdout
|
|
294
|
+
},
|
|
295
|
+
metadata: {
|
|
296
|
+
operation: 'edit',
|
|
297
|
+
timestamp: new Date().toISOString(),
|
|
298
|
+
executionTime: Date.now() - startTime
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
catch (error) {
|
|
303
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
304
|
+
return operation_error_handler_js_1.OperationErrorHandler.createToolError('EDIT_CONFIG_ERROR', `Failed to edit configuration: ${errorMessage}`, 'edit', { error: errorMessage });
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* Handle show configuration operation
|
|
309
|
+
*/
|
|
310
|
+
async handleShow(params, startTime) {
|
|
311
|
+
try {
|
|
312
|
+
const result = await this.gitExecutor.showConfig(params.projectPath, params.key, {
|
|
313
|
+
global: params.global,
|
|
314
|
+
local: params.local,
|
|
315
|
+
system: params.system,
|
|
316
|
+
showOrigin: params.showOrigin,
|
|
317
|
+
showScope: params.showScope
|
|
318
|
+
});
|
|
319
|
+
if (!result.success) {
|
|
320
|
+
// Check if it's a "not found" error for specific key
|
|
321
|
+
if (params.key && (result.stderr.includes('not found') || result.exitCode === 1)) {
|
|
322
|
+
return {
|
|
323
|
+
success: true,
|
|
324
|
+
data: {
|
|
325
|
+
key: params.key,
|
|
326
|
+
found: false,
|
|
327
|
+
message: `Configuration key '${params.key}' not found`,
|
|
328
|
+
scope: this.getScopeString(params)
|
|
329
|
+
},
|
|
330
|
+
metadata: {
|
|
331
|
+
operation: 'show',
|
|
332
|
+
timestamp: new Date().toISOString(),
|
|
333
|
+
executionTime: Date.now() - startTime
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
return operation_error_handler_js_1.OperationErrorHandler.handleGitError(result.stderr, 'show config', params.projectPath);
|
|
338
|
+
}
|
|
339
|
+
const configs = result.configs || [];
|
|
340
|
+
const groupedConfigs = params.key ? undefined : this.groupConfigsBySection(configs);
|
|
341
|
+
return {
|
|
342
|
+
success: true,
|
|
343
|
+
data: {
|
|
344
|
+
message: params.key
|
|
345
|
+
? `Configuration for '${params.key}'`
|
|
346
|
+
: `Configuration details (${configs.length} entries)`,
|
|
347
|
+
key: params.key,
|
|
348
|
+
scope: this.getScopeString(params),
|
|
349
|
+
totalCount: configs.length,
|
|
350
|
+
configs: configs,
|
|
351
|
+
groupedConfigs: groupedConfigs,
|
|
352
|
+
showOrigin: params.showOrigin,
|
|
353
|
+
showScope: params.showScope,
|
|
354
|
+
raw: result.stdout
|
|
355
|
+
},
|
|
356
|
+
metadata: {
|
|
357
|
+
operation: 'show',
|
|
358
|
+
timestamp: new Date().toISOString(),
|
|
359
|
+
executionTime: Date.now() - startTime
|
|
360
|
+
}
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
catch (error) {
|
|
364
|
+
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
365
|
+
return operation_error_handler_js_1.OperationErrorHandler.createToolError('SHOW_CONFIG_ERROR', `Failed to show configuration: ${errorMessage}`, 'show', { error: errorMessage, key: params.key });
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Get scope string for display
|
|
370
|
+
*/
|
|
371
|
+
getScopeString(params) {
|
|
372
|
+
if (params.global)
|
|
373
|
+
return 'global';
|
|
374
|
+
if (params.local)
|
|
375
|
+
return 'local';
|
|
376
|
+
if (params.system)
|
|
377
|
+
return 'system';
|
|
378
|
+
return 'default';
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Group configurations by section
|
|
382
|
+
*/
|
|
383
|
+
groupConfigsBySection(configs) {
|
|
384
|
+
const grouped = {};
|
|
385
|
+
for (const config of configs) {
|
|
386
|
+
const dotIndex = config.key.indexOf('.');
|
|
387
|
+
const section = dotIndex > 0 ? config.key.substring(0, dotIndex) : 'other';
|
|
388
|
+
if (!grouped[section]) {
|
|
389
|
+
grouped[section] = [];
|
|
390
|
+
}
|
|
391
|
+
grouped[section].push(config);
|
|
392
|
+
}
|
|
393
|
+
return grouped;
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Get tool schema for MCP registration
|
|
397
|
+
*/
|
|
398
|
+
static getToolSchema() {
|
|
399
|
+
return {
|
|
400
|
+
name: 'git-config',
|
|
401
|
+
description: 'Git configuration management tool for get, set, unset, list, edit, and show operations. Supports global, local, and system configuration scopes.',
|
|
402
|
+
inputSchema: {
|
|
403
|
+
type: 'object',
|
|
404
|
+
properties: {
|
|
405
|
+
action: {
|
|
406
|
+
type: 'string',
|
|
407
|
+
enum: ['get', 'set', 'unset', 'list', 'edit', 'show'],
|
|
408
|
+
description: 'The Git configuration operation to perform'
|
|
409
|
+
},
|
|
410
|
+
projectPath: {
|
|
411
|
+
type: 'string',
|
|
412
|
+
description: 'Absolute path to the project directory'
|
|
413
|
+
},
|
|
414
|
+
key: {
|
|
415
|
+
type: 'string',
|
|
416
|
+
description: 'Configuration key (required for get, set, unset, show operations). Examples: user.name, user.email, core.editor'
|
|
417
|
+
},
|
|
418
|
+
value: {
|
|
419
|
+
type: 'string',
|
|
420
|
+
description: 'Configuration value (required for set operation)'
|
|
421
|
+
},
|
|
422
|
+
global: {
|
|
423
|
+
type: 'boolean',
|
|
424
|
+
description: 'Use global configuration (~/.gitconfig)'
|
|
425
|
+
},
|
|
426
|
+
local: {
|
|
427
|
+
type: 'boolean',
|
|
428
|
+
description: 'Use local repository configuration (.git/config)'
|
|
429
|
+
},
|
|
430
|
+
system: {
|
|
431
|
+
type: 'boolean',
|
|
432
|
+
description: 'Use system configuration (/etc/gitconfig)'
|
|
433
|
+
},
|
|
434
|
+
showOrigin: {
|
|
435
|
+
type: 'boolean',
|
|
436
|
+
description: 'Show configuration file origin (for list and show operations)'
|
|
437
|
+
},
|
|
438
|
+
showScope: {
|
|
439
|
+
type: 'boolean',
|
|
440
|
+
description: 'Show configuration scope (for show operation)'
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
required: ['action', 'projectPath']
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
exports.GitConfigTool = GitConfigTool;
|
|
14
449
|
//# sourceMappingURL=git-config.js.map
|