@renfeng/ai-code-review 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +77 -0
- package/dist/api/gitlab-api.d.ts +63 -0
- package/dist/api/gitlab-api.d.ts.map +1 -0
- package/dist/api/gitlab-api.js +218 -0
- package/dist/api/gitlab-api.js.map +1 -0
- package/dist/bin/index.d.ts +10 -0
- package/dist/bin/index.d.ts.map +1 -0
- package/dist/bin/index.js +57 -0
- package/dist/bin/index.js.map +1 -0
- package/dist/config/glab-config.loader.d.ts +14 -0
- package/dist/config/glab-config.loader.d.ts.map +1 -0
- package/dist/config/glab-config.loader.js +87 -0
- package/dist/config/glab-config.loader.js.map +1 -0
- package/dist/errors/error-handler.d.ts +45 -0
- package/dist/errors/error-handler.d.ts.map +1 -0
- package/dist/errors/error-handler.js +134 -0
- package/dist/errors/error-handler.js.map +1 -0
- package/dist/logging/index.d.ts +2 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +2 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/logger.service.d.ts +34 -0
- package/dist/logging/logger.service.d.ts.map +1 -0
- package/dist/logging/logger.service.js +91 -0
- package/dist/logging/logger.service.js.map +1 -0
- package/dist/servers/git-server.d.ts +17 -0
- package/dist/servers/git-server.d.ts.map +1 -0
- package/dist/servers/git-server.js +73 -0
- package/dist/servers/git-server.js.map +1 -0
- package/dist/servers/gitlab-server.d.ts +18 -0
- package/dist/servers/gitlab-server.d.ts.map +1 -0
- package/dist/servers/gitlab-server.js +102 -0
- package/dist/servers/gitlab-server.js.map +1 -0
- package/dist/services/git-tools.service.d.ts +111 -0
- package/dist/services/git-tools.service.d.ts.map +1 -0
- package/dist/services/git-tools.service.js +157 -0
- package/dist/services/git-tools.service.js.map +1 -0
- package/dist/services/review-tools.service.d.ts +77 -0
- package/dist/services/review-tools.service.d.ts.map +1 -0
- package/dist/services/review-tools.service.js +289 -0
- package/dist/services/review-tools.service.js.map +1 -0
- package/dist/tools/git-tools.d.ts +8 -0
- package/dist/tools/git-tools.d.ts.map +1 -0
- package/dist/tools/git-tools.js +161 -0
- package/dist/tools/git-tools.js.map +1 -0
- package/dist/tools/gitlab-tools.d.ts +8 -0
- package/dist/tools/gitlab-tools.d.ts.map +1 -0
- package/dist/tools/gitlab-tools.js +155 -0
- package/dist/tools/gitlab-tools.js.map +1 -0
- package/dist/types.d.ts +80 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git Tool Definitions
|
|
3
|
+
*
|
|
4
|
+
* Local git operations exposed as MCP tools.
|
|
5
|
+
*/
|
|
6
|
+
export const GIT_TOOLS = [
|
|
7
|
+
{
|
|
8
|
+
name: "git_clone",
|
|
9
|
+
description: "Clone a git repository. If the directory already exists, fetches instead.",
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
url: { type: "string", description: "Repository URL (SSH or HTTPS)" },
|
|
14
|
+
directory: { type: "string", description: "Target directory name" },
|
|
15
|
+
cwd: { type: "string", description: "Parent directory to clone into (optional, defaults to process.cwd())" },
|
|
16
|
+
},
|
|
17
|
+
required: ["url", "directory"],
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: "git_clone_local",
|
|
22
|
+
description: "Clone from a local reference directory. The remote origin URL is always inherited from the reference repo.",
|
|
23
|
+
inputSchema: {
|
|
24
|
+
type: "object",
|
|
25
|
+
properties: {
|
|
26
|
+
referenceDir: { type: "string", description: "Local reference repo directory name" },
|
|
27
|
+
workDir: { type: "string", description: "Target working directory name" },
|
|
28
|
+
cwd: { type: "string", description: "Parent directory (optional, defaults to process.cwd())" },
|
|
29
|
+
},
|
|
30
|
+
required: ["referenceDir", "workDir"],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "git_fetch",
|
|
35
|
+
description: "Fetch from remote. Can fetch all remotes with prune, or specific branches as refspecs.",
|
|
36
|
+
inputSchema: {
|
|
37
|
+
type: "object",
|
|
38
|
+
properties: {
|
|
39
|
+
repoDir: { type: "string", description: "Path to the git repository" },
|
|
40
|
+
branches: { type: "array", items: { type: "string" }, description: "Specific branches to fetch as refspecs" },
|
|
41
|
+
all: { type: "boolean", description: "Fetch all remotes with prune" },
|
|
42
|
+
},
|
|
43
|
+
required: ["repoDir"],
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "git_checkout",
|
|
48
|
+
description: "Checkout a branch in a git repository",
|
|
49
|
+
inputSchema: {
|
|
50
|
+
type: "object",
|
|
51
|
+
properties: {
|
|
52
|
+
repoDir: { type: "string", description: "Path to the git repository" },
|
|
53
|
+
branch: { type: "string", description: "Branch name to checkout" },
|
|
54
|
+
},
|
|
55
|
+
required: ["repoDir", "branch"],
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "git_reset",
|
|
60
|
+
description: "Reset the current branch to a specific ref. Supports soft, mixed (default), and hard modes.",
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: "object",
|
|
63
|
+
properties: {
|
|
64
|
+
repoDir: { type: "string", description: "Path to the git repository" },
|
|
65
|
+
ref: { type: "string", description: "Ref to reset to (e.g. 'origin/main', a SHA, 'HEAD~1')" },
|
|
66
|
+
mode: { type: "string", enum: ["soft", "mixed", "hard"], description: "Reset mode (default: 'mixed')" },
|
|
67
|
+
},
|
|
68
|
+
required: ["repoDir", "ref"],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "git_merge_base",
|
|
73
|
+
description: "Compute the merge base (common ancestor) of two refs",
|
|
74
|
+
inputSchema: {
|
|
75
|
+
type: "object",
|
|
76
|
+
properties: {
|
|
77
|
+
repoDir: { type: "string", description: "Path to the git repository" },
|
|
78
|
+
ref1: { type: "string", description: "First ref (e.g. branch name or SHA)" },
|
|
79
|
+
ref2: { type: "string", description: "Second ref (e.g. 'HEAD')" },
|
|
80
|
+
},
|
|
81
|
+
required: ["repoDir", "ref1", "ref2"],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "git_diff",
|
|
86
|
+
description: "Run git diff between two refs. Modes: 'stat' (default), 'name-only', or 'full'.",
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: "object",
|
|
89
|
+
properties: {
|
|
90
|
+
repoDir: { type: "string", description: "Path to the git repository" },
|
|
91
|
+
base: { type: "string", description: "Base ref (e.g. merge-base SHA)" },
|
|
92
|
+
head: { type: "string", description: "Head ref (default: 'HEAD')" },
|
|
93
|
+
mode: { type: "string", enum: ["stat", "name-only", "full"], description: "Diff output mode (default: 'stat')" },
|
|
94
|
+
},
|
|
95
|
+
required: ["repoDir", "base"],
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: "git_show",
|
|
100
|
+
description: "Show file content at a specific git ref (e.g. 'HEAD:path/to/file')",
|
|
101
|
+
inputSchema: {
|
|
102
|
+
type: "object",
|
|
103
|
+
properties: {
|
|
104
|
+
repoDir: { type: "string", description: "Path to the git repository" },
|
|
105
|
+
ref: { type: "string", description: "Git ref (e.g. 'HEAD', 'origin/main')" },
|
|
106
|
+
path: { type: "string", description: "File path within the repository" },
|
|
107
|
+
},
|
|
108
|
+
required: ["repoDir", "ref", "path"],
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "git_log",
|
|
113
|
+
description: "Show recent commits with one-line format and branch decorations",
|
|
114
|
+
inputSchema: {
|
|
115
|
+
type: "object",
|
|
116
|
+
properties: {
|
|
117
|
+
repoDir: { type: "string", description: "Path to the git repository" },
|
|
118
|
+
maxCount: { type: "number", description: "Maximum number of commits to show (default: 10)" },
|
|
119
|
+
},
|
|
120
|
+
required: ["repoDir"],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "git_cleanup",
|
|
125
|
+
description: "Remove a directory recursively (used to clean up working copies after review)",
|
|
126
|
+
inputSchema: {
|
|
127
|
+
type: "object",
|
|
128
|
+
properties: {
|
|
129
|
+
directory: { type: "string", description: "Directory path to remove" },
|
|
130
|
+
},
|
|
131
|
+
required: ["directory"],
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: "write_file",
|
|
136
|
+
description: "Write text content to a file (e.g. prior-discussions.json for the subagent)",
|
|
137
|
+
inputSchema: {
|
|
138
|
+
type: "object",
|
|
139
|
+
properties: {
|
|
140
|
+
filePath: { type: "string", description: "Absolute or relative file path" },
|
|
141
|
+
content: { type: "string", description: "File content to write" },
|
|
142
|
+
},
|
|
143
|
+
required: ["filePath", "content"],
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "git_grep",
|
|
148
|
+
description: "Search for a pattern in tracked files using git grep. Returns matching lines with file paths and line numbers.",
|
|
149
|
+
inputSchema: {
|
|
150
|
+
type: "object",
|
|
151
|
+
properties: {
|
|
152
|
+
repoDir: { type: "string", description: "Path to the git repository" },
|
|
153
|
+
pattern: { type: "string", description: "Search pattern (basic regex)" },
|
|
154
|
+
paths: { type: "array", items: { type: "string" }, description: "Glob patterns to restrict search, e.g. ['*.ts', 'libs/**']" },
|
|
155
|
+
maxResults: { type: "number", description: "Max results to return (default: 50)" },
|
|
156
|
+
},
|
|
157
|
+
required: ["repoDir", "pattern"],
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
];
|
|
161
|
+
//# sourceMappingURL=git-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-tools.js","sourceRoot":"","sources":["../../src/tools/git-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,MAAM,CAAC,MAAM,SA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@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gitlab-tools.d.ts","sourceRoot":"","sources":["../../src/tools/gitlab-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,eAAO,MAAM,YAAY,EAAE,IAAI,EAoJ9B,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitLab Review Tool Definitions
|
|
3
|
+
*
|
|
4
|
+
* MR review and todo triage tools exposed as MCP tools.
|
|
5
|
+
*/
|
|
6
|
+
export const REVIEW_TOOLS = [
|
|
7
|
+
{
|
|
8
|
+
name: "extract_mr_metadata",
|
|
9
|
+
description: "Get source and target branch for a GitLab merge request",
|
|
10
|
+
inputSchema: {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
project: { type: ["string", "number"], description: "GitLab project ID or path" },
|
|
14
|
+
mergeRequestIid: { type: "number", description: "Merge request internal ID" },
|
|
15
|
+
gitlabToken: { type: "string", description: "GitLab API token (optional)" },
|
|
16
|
+
gitlabUrl: { type: "string", description: "GitLab instance URL (optional)" },
|
|
17
|
+
},
|
|
18
|
+
required: ["project", "mergeRequestIid"],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: "extract_version_refs",
|
|
23
|
+
description: "Get diff version refs (head_sha, base_sha, start_sha) for a merge request",
|
|
24
|
+
inputSchema: {
|
|
25
|
+
type: "object",
|
|
26
|
+
properties: {
|
|
27
|
+
project: { type: ["string", "number"], description: "GitLab project ID or path" },
|
|
28
|
+
mergeRequestIid: { type: "number", description: "Merge request internal ID" },
|
|
29
|
+
gitlabToken: { type: "string", description: "GitLab API token (optional)" },
|
|
30
|
+
gitlabUrl: { type: "string", description: "GitLab instance URL (optional)" },
|
|
31
|
+
},
|
|
32
|
+
required: ["project", "mergeRequestIid"],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "extract_prior_discussions",
|
|
37
|
+
description: "Extract non-system discussion threads (both resolved and unresolved) from a merge request for deduplication during review. Each thread includes a 'resolved' boolean field.",
|
|
38
|
+
inputSchema: {
|
|
39
|
+
type: "object",
|
|
40
|
+
properties: {
|
|
41
|
+
project: { type: ["string", "number"], description: "GitLab project ID or path" },
|
|
42
|
+
mergeRequestIid: { type: "number", description: "Merge request internal ID" },
|
|
43
|
+
gitlabToken: { type: "string", description: "GitLab API token (optional)" },
|
|
44
|
+
gitlabUrl: { type: "string", description: "GitLab instance URL (optional)" },
|
|
45
|
+
},
|
|
46
|
+
required: ["project", "mergeRequestIid"],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "post_draft_notes",
|
|
51
|
+
description: "Post review findings as draft notes on a GitLab merge request. Accepts structured findings JSON with inline positioning. The caller is responsible for deduplication — this tool posts all findings as-is.",
|
|
52
|
+
inputSchema: {
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {
|
|
55
|
+
project: { type: ["string", "number"], description: "GitLab project ID or path" },
|
|
56
|
+
mergeRequestIid: { type: "number", description: "Merge request internal ID" },
|
|
57
|
+
headSha: { type: "string", description: "HEAD commit SHA for diff positioning" },
|
|
58
|
+
baseSha: { type: "string", description: "Base commit SHA for diff positioning" },
|
|
59
|
+
startSha: { type: "string", description: "Start commit SHA for diff positioning" },
|
|
60
|
+
findings: {
|
|
61
|
+
type: "object",
|
|
62
|
+
description: "Review findings object with comments array, summary, and verdict",
|
|
63
|
+
properties: {
|
|
64
|
+
comments: {
|
|
65
|
+
type: "array",
|
|
66
|
+
items: {
|
|
67
|
+
type: "object",
|
|
68
|
+
properties: {
|
|
69
|
+
file: { type: ["string", "null"], description: "File path" },
|
|
70
|
+
line: { type: ["number", "null"], description: "New-side line number" },
|
|
71
|
+
old_line: { type: ["number", "null"], description: "Old-side line number" },
|
|
72
|
+
changed: { type: "string", enum: ["new", "old", "context", "general"] },
|
|
73
|
+
blocking: { type: "boolean" },
|
|
74
|
+
note: { type: "string", description: "Markdown comment text" },
|
|
75
|
+
pipeline_catchable: { type: "boolean" },
|
|
76
|
+
},
|
|
77
|
+
required: ["note"],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
summary: { type: "string" },
|
|
81
|
+
verdict: { type: "string", enum: ["approve", "request_changes", "comment_only"] },
|
|
82
|
+
},
|
|
83
|
+
required: ["comments", "summary", "verdict"],
|
|
84
|
+
},
|
|
85
|
+
gitlabToken: { type: "string", description: "GitLab API token (optional)" },
|
|
86
|
+
gitlabUrl: { type: "string", description: "GitLab instance URL (optional)" },
|
|
87
|
+
},
|
|
88
|
+
required: ["project", "mergeRequestIid", "headSha", "baseSha", "startSha", "findings"],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "delete_draft_notes",
|
|
93
|
+
description: "Delete all draft notes from a GitLab merge request. Use this to clean up stale drafts from previous review runs before posting new ones.",
|
|
94
|
+
inputSchema: {
|
|
95
|
+
type: "object",
|
|
96
|
+
properties: {
|
|
97
|
+
project: { type: ["string", "number"], description: "GitLab project ID or path" },
|
|
98
|
+
mergeRequestIid: { type: "number", description: "Merge request internal ID" },
|
|
99
|
+
gitlabToken: { type: "string", description: "GitLab API token (optional)" },
|
|
100
|
+
gitlabUrl: { type: "string", description: "GitLab instance URL (optional)" },
|
|
101
|
+
},
|
|
102
|
+
required: ["project", "mergeRequestIid"],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "publish_review",
|
|
107
|
+
description: "Bulk-publish all draft notes, auto-resolve non-blocking threads, self-assign as reviewer, and apply the verdict (approve/request_changes/comment_only)",
|
|
108
|
+
inputSchema: {
|
|
109
|
+
type: "object",
|
|
110
|
+
properties: {
|
|
111
|
+
project: { type: ["string", "number"], description: "GitLab project ID or path" },
|
|
112
|
+
mergeRequestIid: { type: "number", description: "Merge request internal ID" },
|
|
113
|
+
findings: {
|
|
114
|
+
type: "object",
|
|
115
|
+
description: "Review findings object (same as post_draft_notes) used to determine verdict and resolve non-blocking threads",
|
|
116
|
+
properties: {
|
|
117
|
+
comments: { type: "array" },
|
|
118
|
+
summary: { type: "string" },
|
|
119
|
+
verdict: { type: "string", enum: ["approve", "request_changes", "comment_only"] },
|
|
120
|
+
},
|
|
121
|
+
required: ["comments", "verdict"],
|
|
122
|
+
},
|
|
123
|
+
gitlabToken: { type: "string", description: "GitLab API token (optional)" },
|
|
124
|
+
gitlabUrl: { type: "string", description: "GitLab instance URL (optional)" },
|
|
125
|
+
},
|
|
126
|
+
required: ["project", "mergeRequestIid", "findings"],
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
name: "fetch_and_categorize_todos",
|
|
131
|
+
description: "Fetch pending GitLab todos and categorize them into: done (merged/closed/draft/renovate), review (open MRs needing review), and skip (non-MR or unrecognized)",
|
|
132
|
+
inputSchema: {
|
|
133
|
+
type: "object",
|
|
134
|
+
properties: {
|
|
135
|
+
gitlabToken: { type: "string", description: "GitLab API token (optional)" },
|
|
136
|
+
gitlabUrl: { type: "string", description: "GitLab instance URL (optional)" },
|
|
137
|
+
},
|
|
138
|
+
required: [],
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: "mark_todos_done",
|
|
143
|
+
description: "Mark one or more GitLab todos as done by their IDs",
|
|
144
|
+
inputSchema: {
|
|
145
|
+
type: "object",
|
|
146
|
+
properties: {
|
|
147
|
+
todoIds: { type: "array", items: { type: "number" }, description: "Array of todo IDs to mark as done" },
|
|
148
|
+
gitlabToken: { type: "string", description: "GitLab API token (optional)" },
|
|
149
|
+
gitlabUrl: { type: "string", description: "GitLab instance URL (optional)" },
|
|
150
|
+
},
|
|
151
|
+
required: ["todoIds"],
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
];
|
|
155
|
+
//# sourceMappingURL=gitlab-tools.js.map
|
|
@@ -0,0 +1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W,EAAE,gCAAgC,EAAE;aAC7E;YACD,QAAQ,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,UAAU,CAAC;SACrD;KACF;IACD;QACE,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,+JAA+J;QAC5K,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE;gBAC3E,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;aAC7E;YACD,QAAQ,EAAE,EAAE;SACb;KACF;IACD;QACE,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,oDAAoD;QACjE,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,mCAAmC,EAAE;gBACvG,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE;gBAC3E,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;aAC7E;YACD,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB;KACF;CACF,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type Definitions for ai-code-review MCP servers
|
|
3
|
+
*
|
|
4
|
+
* Only review-related interfaces (no CLI types).
|
|
5
|
+
*/
|
|
6
|
+
/** A single review finding/comment */
|
|
7
|
+
export interface ReviewComment {
|
|
8
|
+
file?: string | null;
|
|
9
|
+
line?: number | null;
|
|
10
|
+
old_line?: number | null;
|
|
11
|
+
changed?: 'new' | 'old' | 'context' | 'general';
|
|
12
|
+
blocking?: boolean;
|
|
13
|
+
note: string;
|
|
14
|
+
pipeline_catchable?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/** Structured review findings */
|
|
17
|
+
export interface ReviewFindings {
|
|
18
|
+
comments: ReviewComment[];
|
|
19
|
+
summary: string;
|
|
20
|
+
verdict: 'approve' | 'request_changes' | 'comment_only';
|
|
21
|
+
}
|
|
22
|
+
/** Parameters for extract_mr_metadata */
|
|
23
|
+
export interface ExtractMrMetadataParams {
|
|
24
|
+
project: string | number;
|
|
25
|
+
mergeRequestIid: number;
|
|
26
|
+
gitlabToken?: string;
|
|
27
|
+
gitlabUrl?: string;
|
|
28
|
+
}
|
|
29
|
+
/** Parameters for extract_version_refs */
|
|
30
|
+
export interface ExtractVersionRefsParams {
|
|
31
|
+
project: string | number;
|
|
32
|
+
mergeRequestIid: number;
|
|
33
|
+
gitlabToken?: string;
|
|
34
|
+
gitlabUrl?: string;
|
|
35
|
+
}
|
|
36
|
+
/** Parameters for extract_prior_discussions */
|
|
37
|
+
export interface ExtractPriorDiscussionsParams {
|
|
38
|
+
project: string | number;
|
|
39
|
+
mergeRequestIid: number;
|
|
40
|
+
gitlabToken?: string;
|
|
41
|
+
gitlabUrl?: string;
|
|
42
|
+
}
|
|
43
|
+
/** Parameters for post_draft_notes */
|
|
44
|
+
export interface PostDraftNotesParams {
|
|
45
|
+
project: string | number;
|
|
46
|
+
mergeRequestIid: number;
|
|
47
|
+
headSha: string;
|
|
48
|
+
baseSha: string;
|
|
49
|
+
startSha: string;
|
|
50
|
+
findings: ReviewFindings;
|
|
51
|
+
gitlabToken?: string;
|
|
52
|
+
gitlabUrl?: string;
|
|
53
|
+
}
|
|
54
|
+
/** Parameters for delete_draft_notes */
|
|
55
|
+
export interface DeleteDraftNotesParams {
|
|
56
|
+
project: string | number;
|
|
57
|
+
mergeRequestIid: number;
|
|
58
|
+
gitlabToken?: string;
|
|
59
|
+
gitlabUrl?: string;
|
|
60
|
+
}
|
|
61
|
+
/** Parameters for publish_review */
|
|
62
|
+
export interface PublishReviewParams {
|
|
63
|
+
project: string | number;
|
|
64
|
+
mergeRequestIid: number;
|
|
65
|
+
findings: ReviewFindings;
|
|
66
|
+
gitlabToken?: string;
|
|
67
|
+
gitlabUrl?: string;
|
|
68
|
+
}
|
|
69
|
+
/** Parameters for fetch_and_categorize_todos */
|
|
70
|
+
export interface FetchAndCategorizeTodosParams {
|
|
71
|
+
gitlabToken?: string;
|
|
72
|
+
gitlabUrl?: string;
|
|
73
|
+
}
|
|
74
|
+
/** Parameters for mark_todos_done */
|
|
75
|
+
export interface MarkTodosDoneParams {
|
|
76
|
+
todoIds: number[];
|
|
77
|
+
gitlabToken?: string;
|
|
78
|
+
gitlabUrl?: string;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,OAAO,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,iCAAiC;AACjC,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,SAAS,GAAG,iBAAiB,GAAG,cAAc,CAAC;CACzD;AAED,yCAAyC;AACzC,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,eAAe,EAAE,MA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6B;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qCAAqC;AACrC,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@renfeng/ai-code-review",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "MCP servers for AI-assisted code review: git operations and GitLab API tools",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/bin/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"ai-code-review": "dist/bin/index.js"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [
|
|
11
|
+
"mcp",
|
|
12
|
+
"model-context-protocol",
|
|
13
|
+
"gitlab",
|
|
14
|
+
"code-review",
|
|
15
|
+
"git",
|
|
16
|
+
"merge-request"
|
|
17
|
+
],
|
|
18
|
+
"author": "Frank Ren",
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/renfeng/ai-code-review.git"
|
|
23
|
+
},
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=18.0.0"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"registry": "https://registry.npmjs.org"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist/",
|
|
32
|
+
"README.md",
|
|
33
|
+
"LICENSE"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"build": "tsc",
|
|
37
|
+
"prepublishOnly": "npm run build",
|
|
38
|
+
"type-check": "tsc --noEmit"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
42
|
+
"dotenv": "^17.2.3",
|
|
43
|
+
"simple-git": "^3.30.0"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@types/node": "^20.0.0",
|
|
47
|
+
"typescript": "^5.0.0"
|
|
48
|
+
}
|
|
49
|
+
}
|