octocode-mcp 7.0.12-alpha.2 → 7.0.12
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/dist/index.js +3 -3
- package/dist/src/constants.d.ts +8 -0
- package/dist/src/scheme/github_search_pull_requests.d.ts +36 -36
- package/dist/src/scheme/schemDescriptions.d.ts +180 -0
- package/dist/src/tools/descriptions.d.ts +7 -0
- package/dist/src/tools/hints.d.ts +29 -0
- package/dist/src/tools/utils.d.ts +1 -1
- package/package.json +3 -4
- package/dist/src/tools/toolMetadata.d.ts +0 -203
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const TOOL_NAMES: {
|
|
2
|
+
readonly GITHUB_FETCH_CONTENT: "githubGetFileContent";
|
|
3
|
+
readonly GITHUB_SEARCH_CODE: "githubSearchCode";
|
|
4
|
+
readonly GITHUB_SEARCH_PULL_REQUESTS: "githubSearchPullRequests";
|
|
5
|
+
readonly GITHUB_SEARCH_REPOSITORIES: "githubSearchRepositories";
|
|
6
|
+
readonly GITHUB_VIEW_REPO_STRUCTURE: "githubViewRepoStructure";
|
|
7
|
+
};
|
|
8
|
+
export type ToolName = (typeof TOOL_NAMES)[keyof typeof TOOL_NAMES];
|
|
@@ -67,23 +67,23 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
|
67
67
|
repo?: string | undefined;
|
|
68
68
|
sort?: "created" | "updated" | "best-match" | undefined;
|
|
69
69
|
head?: string | undefined;
|
|
70
|
-
|
|
70
|
+
'no-label'?: boolean | undefined;
|
|
71
|
+
'no-milestone'?: boolean | undefined;
|
|
72
|
+
'no-project'?: boolean | undefined;
|
|
73
|
+
'no-assignee'?: boolean | undefined;
|
|
74
|
+
'merged-at'?: string | undefined;
|
|
71
75
|
match?: ("title" | "body" | "comments")[] | undefined;
|
|
72
76
|
limit?: number | undefined;
|
|
73
77
|
merged?: boolean | undefined;
|
|
74
|
-
'merged-at'?: string | undefined;
|
|
75
78
|
author?: string | undefined;
|
|
76
79
|
mentions?: string | undefined;
|
|
77
80
|
commenter?: string | undefined;
|
|
78
81
|
involves?: string | undefined;
|
|
79
82
|
'reviewed-by'?: string | undefined;
|
|
80
83
|
'review-requested'?: string | undefined;
|
|
84
|
+
base?: string | undefined;
|
|
81
85
|
interactions?: string | number | undefined;
|
|
82
86
|
label?: string | string[] | undefined;
|
|
83
|
-
'no-assignee'?: boolean | undefined;
|
|
84
|
-
'no-label'?: boolean | undefined;
|
|
85
|
-
'no-milestone'?: boolean | undefined;
|
|
86
|
-
'no-project'?: boolean | undefined;
|
|
87
87
|
prNumber?: number | undefined;
|
|
88
88
|
withComments?: boolean | undefined;
|
|
89
89
|
withContent?: boolean | undefined;
|
|
@@ -104,23 +104,23 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
|
104
104
|
repo?: string | undefined;
|
|
105
105
|
sort?: "created" | "updated" | "best-match" | undefined;
|
|
106
106
|
head?: string | undefined;
|
|
107
|
-
|
|
107
|
+
'no-label'?: boolean | undefined;
|
|
108
|
+
'no-milestone'?: boolean | undefined;
|
|
109
|
+
'no-project'?: boolean | undefined;
|
|
110
|
+
'no-assignee'?: boolean | undefined;
|
|
111
|
+
'merged-at'?: string | undefined;
|
|
108
112
|
match?: ("title" | "body" | "comments")[] | undefined;
|
|
109
113
|
limit?: number | undefined;
|
|
110
114
|
merged?: boolean | undefined;
|
|
111
|
-
'merged-at'?: string | undefined;
|
|
112
115
|
author?: string | undefined;
|
|
113
116
|
mentions?: string | undefined;
|
|
114
117
|
commenter?: string | undefined;
|
|
115
118
|
involves?: string | undefined;
|
|
116
119
|
'reviewed-by'?: string | undefined;
|
|
117
120
|
'review-requested'?: string | undefined;
|
|
121
|
+
base?: string | undefined;
|
|
118
122
|
interactions?: string | number | undefined;
|
|
119
123
|
label?: string | string[] | undefined;
|
|
120
|
-
'no-assignee'?: boolean | undefined;
|
|
121
|
-
'no-label'?: boolean | undefined;
|
|
122
|
-
'no-milestone'?: boolean | undefined;
|
|
123
|
-
'no-project'?: boolean | undefined;
|
|
124
124
|
order?: "asc" | "desc" | undefined;
|
|
125
125
|
prNumber?: number | undefined;
|
|
126
126
|
withComments?: boolean | undefined;
|
|
@@ -184,23 +184,23 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
|
184
184
|
repo?: string | undefined;
|
|
185
185
|
sort?: "created" | "updated" | "best-match" | undefined;
|
|
186
186
|
head?: string | undefined;
|
|
187
|
-
|
|
187
|
+
'no-label'?: boolean | undefined;
|
|
188
|
+
'no-milestone'?: boolean | undefined;
|
|
189
|
+
'no-project'?: boolean | undefined;
|
|
190
|
+
'no-assignee'?: boolean | undefined;
|
|
191
|
+
'merged-at'?: string | undefined;
|
|
188
192
|
match?: ("title" | "body" | "comments")[] | undefined;
|
|
189
193
|
limit?: number | undefined;
|
|
190
194
|
merged?: boolean | undefined;
|
|
191
|
-
'merged-at'?: string | undefined;
|
|
192
195
|
author?: string | undefined;
|
|
193
196
|
mentions?: string | undefined;
|
|
194
197
|
commenter?: string | undefined;
|
|
195
198
|
involves?: string | undefined;
|
|
196
199
|
'reviewed-by'?: string | undefined;
|
|
197
200
|
'review-requested'?: string | undefined;
|
|
201
|
+
base?: string | undefined;
|
|
198
202
|
interactions?: string | number | undefined;
|
|
199
203
|
label?: string | string[] | undefined;
|
|
200
|
-
'no-assignee'?: boolean | undefined;
|
|
201
|
-
'no-label'?: boolean | undefined;
|
|
202
|
-
'no-milestone'?: boolean | undefined;
|
|
203
|
-
'no-project'?: boolean | undefined;
|
|
204
204
|
prNumber?: number | undefined;
|
|
205
205
|
withComments?: boolean | undefined;
|
|
206
206
|
withContent?: boolean | undefined;
|
|
@@ -221,23 +221,23 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
|
221
221
|
repo?: string | undefined;
|
|
222
222
|
sort?: "created" | "updated" | "best-match" | undefined;
|
|
223
223
|
head?: string | undefined;
|
|
224
|
-
|
|
224
|
+
'no-label'?: boolean | undefined;
|
|
225
|
+
'no-milestone'?: boolean | undefined;
|
|
226
|
+
'no-project'?: boolean | undefined;
|
|
227
|
+
'no-assignee'?: boolean | undefined;
|
|
228
|
+
'merged-at'?: string | undefined;
|
|
225
229
|
match?: ("title" | "body" | "comments")[] | undefined;
|
|
226
230
|
limit?: number | undefined;
|
|
227
231
|
merged?: boolean | undefined;
|
|
228
|
-
'merged-at'?: string | undefined;
|
|
229
232
|
author?: string | undefined;
|
|
230
233
|
mentions?: string | undefined;
|
|
231
234
|
commenter?: string | undefined;
|
|
232
235
|
involves?: string | undefined;
|
|
233
236
|
'reviewed-by'?: string | undefined;
|
|
234
237
|
'review-requested'?: string | undefined;
|
|
238
|
+
base?: string | undefined;
|
|
235
239
|
interactions?: string | number | undefined;
|
|
236
240
|
label?: string | string[] | undefined;
|
|
237
|
-
'no-assignee'?: boolean | undefined;
|
|
238
|
-
'no-label'?: boolean | undefined;
|
|
239
|
-
'no-milestone'?: boolean | undefined;
|
|
240
|
-
'no-project'?: boolean | undefined;
|
|
241
241
|
order?: "asc" | "desc" | undefined;
|
|
242
242
|
prNumber?: number | undefined;
|
|
243
243
|
withComments?: boolean | undefined;
|
|
@@ -262,23 +262,23 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
|
262
262
|
repo?: string | undefined;
|
|
263
263
|
sort?: "created" | "updated" | "best-match" | undefined;
|
|
264
264
|
head?: string | undefined;
|
|
265
|
-
|
|
265
|
+
'no-label'?: boolean | undefined;
|
|
266
|
+
'no-milestone'?: boolean | undefined;
|
|
267
|
+
'no-project'?: boolean | undefined;
|
|
268
|
+
'no-assignee'?: boolean | undefined;
|
|
269
|
+
'merged-at'?: string | undefined;
|
|
266
270
|
match?: ("title" | "body" | "comments")[] | undefined;
|
|
267
271
|
limit?: number | undefined;
|
|
268
272
|
merged?: boolean | undefined;
|
|
269
|
-
'merged-at'?: string | undefined;
|
|
270
273
|
author?: string | undefined;
|
|
271
274
|
mentions?: string | undefined;
|
|
272
275
|
commenter?: string | undefined;
|
|
273
276
|
involves?: string | undefined;
|
|
274
277
|
'reviewed-by'?: string | undefined;
|
|
275
278
|
'review-requested'?: string | undefined;
|
|
279
|
+
base?: string | undefined;
|
|
276
280
|
interactions?: string | number | undefined;
|
|
277
281
|
label?: string | string[] | undefined;
|
|
278
|
-
'no-assignee'?: boolean | undefined;
|
|
279
|
-
'no-label'?: boolean | undefined;
|
|
280
|
-
'no-milestone'?: boolean | undefined;
|
|
281
|
-
'no-project'?: boolean | undefined;
|
|
282
282
|
prNumber?: number | undefined;
|
|
283
283
|
withComments?: boolean | undefined;
|
|
284
284
|
withContent?: boolean | undefined;
|
|
@@ -301,23 +301,23 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
|
301
301
|
repo?: string | undefined;
|
|
302
302
|
sort?: "created" | "updated" | "best-match" | undefined;
|
|
303
303
|
head?: string | undefined;
|
|
304
|
-
|
|
304
|
+
'no-label'?: boolean | undefined;
|
|
305
|
+
'no-milestone'?: boolean | undefined;
|
|
306
|
+
'no-project'?: boolean | undefined;
|
|
307
|
+
'no-assignee'?: boolean | undefined;
|
|
308
|
+
'merged-at'?: string | undefined;
|
|
305
309
|
match?: ("title" | "body" | "comments")[] | undefined;
|
|
306
310
|
limit?: number | undefined;
|
|
307
311
|
merged?: boolean | undefined;
|
|
308
|
-
'merged-at'?: string | undefined;
|
|
309
312
|
author?: string | undefined;
|
|
310
313
|
mentions?: string | undefined;
|
|
311
314
|
commenter?: string | undefined;
|
|
312
315
|
involves?: string | undefined;
|
|
313
316
|
'reviewed-by'?: string | undefined;
|
|
314
317
|
'review-requested'?: string | undefined;
|
|
318
|
+
base?: string | undefined;
|
|
315
319
|
interactions?: string | number | undefined;
|
|
316
320
|
label?: string | string[] | undefined;
|
|
317
|
-
'no-assignee'?: boolean | undefined;
|
|
318
|
-
'no-label'?: boolean | undefined;
|
|
319
|
-
'no-milestone'?: boolean | undefined;
|
|
320
|
-
'no-project'?: boolean | undefined;
|
|
321
321
|
order?: "asc" | "desc" | undefined;
|
|
322
322
|
prNumber?: number | undefined;
|
|
323
323
|
withComments?: boolean | undefined;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
export declare const COMMON: {
|
|
2
|
+
scope: {
|
|
3
|
+
owner: string;
|
|
4
|
+
repo: string;
|
|
5
|
+
branch: string;
|
|
6
|
+
path: string;
|
|
7
|
+
};
|
|
8
|
+
processing: {
|
|
9
|
+
minify: string;
|
|
10
|
+
minified: string;
|
|
11
|
+
sanitize: string;
|
|
12
|
+
};
|
|
13
|
+
filters: {
|
|
14
|
+
stars: string;
|
|
15
|
+
created: string;
|
|
16
|
+
updated: string;
|
|
17
|
+
state: string;
|
|
18
|
+
extension: string;
|
|
19
|
+
filename: string;
|
|
20
|
+
};
|
|
21
|
+
users: {
|
|
22
|
+
author: string;
|
|
23
|
+
assignee: string;
|
|
24
|
+
commenter: string;
|
|
25
|
+
involves: string;
|
|
26
|
+
mentions: string;
|
|
27
|
+
};
|
|
28
|
+
git: {
|
|
29
|
+
head: string;
|
|
30
|
+
base: string;
|
|
31
|
+
merged: string;
|
|
32
|
+
draft: string;
|
|
33
|
+
};
|
|
34
|
+
sorting: {
|
|
35
|
+
sort: string;
|
|
36
|
+
order: string;
|
|
37
|
+
};
|
|
38
|
+
resultLimit: {
|
|
39
|
+
limit: string;
|
|
40
|
+
};
|
|
41
|
+
engagement: {
|
|
42
|
+
comments: string;
|
|
43
|
+
reactions: string;
|
|
44
|
+
interactions: string;
|
|
45
|
+
};
|
|
46
|
+
dates: {
|
|
47
|
+
closed: string;
|
|
48
|
+
'merged-at': string;
|
|
49
|
+
};
|
|
50
|
+
labels: {
|
|
51
|
+
label: string;
|
|
52
|
+
'no-label': string;
|
|
53
|
+
'no-milestone': string;
|
|
54
|
+
'no-project': string;
|
|
55
|
+
'no-assignee': string;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export declare const GITHUB_SEARCH_CODE: {
|
|
59
|
+
search: {
|
|
60
|
+
keywordsToSearch: string;
|
|
61
|
+
};
|
|
62
|
+
scope: {
|
|
63
|
+
owner: string;
|
|
64
|
+
repo: string;
|
|
65
|
+
};
|
|
66
|
+
filters: {
|
|
67
|
+
extension: string;
|
|
68
|
+
stars: string;
|
|
69
|
+
filename: string;
|
|
70
|
+
path: string;
|
|
71
|
+
match: string;
|
|
72
|
+
};
|
|
73
|
+
resultLimit: {
|
|
74
|
+
limit: string;
|
|
75
|
+
};
|
|
76
|
+
processing: {
|
|
77
|
+
minify: string;
|
|
78
|
+
sanitize: string;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
export declare const GITHUB_SEARCH_REPOS: {
|
|
82
|
+
search: {
|
|
83
|
+
keywordsToSearch: string;
|
|
84
|
+
topicsToSearch: string;
|
|
85
|
+
};
|
|
86
|
+
scope: {
|
|
87
|
+
owner: string;
|
|
88
|
+
};
|
|
89
|
+
filters: {
|
|
90
|
+
stars: string;
|
|
91
|
+
size: string;
|
|
92
|
+
created: string;
|
|
93
|
+
updated: string;
|
|
94
|
+
match: string;
|
|
95
|
+
};
|
|
96
|
+
sorting: {
|
|
97
|
+
sort: string;
|
|
98
|
+
};
|
|
99
|
+
resultLimit: {
|
|
100
|
+
limit: string;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
export declare const GITHUB_SEARCH_PULL_REQUESTS: {
|
|
104
|
+
search: {
|
|
105
|
+
query: string;
|
|
106
|
+
};
|
|
107
|
+
scope: {
|
|
108
|
+
prNumber: string;
|
|
109
|
+
owner: string;
|
|
110
|
+
repo: string;
|
|
111
|
+
};
|
|
112
|
+
filters: {
|
|
113
|
+
state: string;
|
|
114
|
+
assignee: string;
|
|
115
|
+
author: string;
|
|
116
|
+
commenter: string;
|
|
117
|
+
involves: string;
|
|
118
|
+
mentions: string;
|
|
119
|
+
'review-requested': string;
|
|
120
|
+
'reviewed-by': string;
|
|
121
|
+
label: string;
|
|
122
|
+
'no-label': string;
|
|
123
|
+
'no-milestone': string;
|
|
124
|
+
'no-project': string;
|
|
125
|
+
'no-assignee': string;
|
|
126
|
+
head: string;
|
|
127
|
+
base: string;
|
|
128
|
+
created: string;
|
|
129
|
+
updated: string;
|
|
130
|
+
closed: string;
|
|
131
|
+
'merged-at': string;
|
|
132
|
+
comments: string;
|
|
133
|
+
reactions: string;
|
|
134
|
+
interactions: string;
|
|
135
|
+
merged: string;
|
|
136
|
+
draft: string;
|
|
137
|
+
match: string;
|
|
138
|
+
};
|
|
139
|
+
sorting: {
|
|
140
|
+
sort: string;
|
|
141
|
+
order: string;
|
|
142
|
+
};
|
|
143
|
+
resultLimit: {
|
|
144
|
+
limit: string;
|
|
145
|
+
};
|
|
146
|
+
outputShaping: {
|
|
147
|
+
withComments: string;
|
|
148
|
+
withContent: string;
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
export declare const GITHUB_FETCH_CONTENT: {
|
|
152
|
+
scope: {
|
|
153
|
+
owner: string;
|
|
154
|
+
repo: string;
|
|
155
|
+
branch: string;
|
|
156
|
+
path: string;
|
|
157
|
+
};
|
|
158
|
+
processing: {
|
|
159
|
+
minified: string;
|
|
160
|
+
sanitize: string;
|
|
161
|
+
};
|
|
162
|
+
range: {
|
|
163
|
+
startLine: string;
|
|
164
|
+
endLine: string;
|
|
165
|
+
fullContent: string;
|
|
166
|
+
matchString: string;
|
|
167
|
+
matchStringContextLines: string;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
export declare const GITHUB_VIEW_REPO_STRUCTURE: {
|
|
171
|
+
scope: {
|
|
172
|
+
owner: string;
|
|
173
|
+
repo: string;
|
|
174
|
+
branch: string;
|
|
175
|
+
path: string;
|
|
176
|
+
};
|
|
177
|
+
range: {
|
|
178
|
+
depth: string;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const TOOL_HINTS: {
|
|
2
|
+
readonly base: {
|
|
3
|
+
readonly hasResults: readonly ["Validate results against researchGoal: do findings answer your question? If partial, identify gaps and continue", "Check result quality: verify dates, stars, last activity to ensure code is maintained and relevant", "Include referenced GitHub URLs in output for user navigation", "Got sufficient examples (3+)? Consider stopping to avoid over-research and token waste"];
|
|
4
|
+
readonly empty: readonly ["No results: Are keywords too specific? Try broader terms or related concepts from domain", "Test filters individually: remove one constraint at a time to identify what blocks results", "Split complex searches: separate concerns into multiple simpler queries"];
|
|
5
|
+
};
|
|
6
|
+
readonly githubSearchCode: {
|
|
7
|
+
readonly hasResults: readonly ["Extract text_matches locations and copy exact match text into FETCH_CONTENT matchString for full context", "Found implementation? Follow imports/dependencies with new searches to understand flow", "Multiple matches? Compare patterns across files to identify common approaches"];
|
|
8
|
+
readonly empty: readonly ["Current match mode not working? Try the opposite (file↔path) and compare", "Scoped search failed? Drop owner/repo to discover cross-repo patterns, then narrow down", "Apply semantic variants from your domain: expand abbreviations, try synonyms, related terms"];
|
|
9
|
+
};
|
|
10
|
+
readonly githubSearchRepositories: {
|
|
11
|
+
readonly hasResults: readonly ["Validate relevance: fetch README with FETCH_CONTENT to confirm repo matches researchGoal", "Quality check: stars + last_update + topics should align with your requirements", "Map architecture: use VIEW_REPO_STRUCTURE to understand layout, then SEARCH_CODE for implementations", "Multiple repos found? Compare patterns/dependencies/approaches and document key differences"];
|
|
12
|
+
readonly empty: readonly ["Filters too strict? Test one at a time: relax stars, then size, then dates to find blocking constraint", "Topics not matching? Try keywords search or vice versa - test both approaches", "Expand search terms with domain synonyms (e.g., \"server\"→\"provider\"/\"backend\", \"plugin\"→\"extension\"/\"addon\")", "Try name-only search: match=[\"name\"] can find repos when description search fails"];
|
|
13
|
+
};
|
|
14
|
+
readonly githubViewRepoStructure: {
|
|
15
|
+
readonly hasResults: readonly ["Identified key directories? Convert paths to SEARCH_CODE queries with path+extension filters for targeted search", "Document structure insight: note entry points, config locations, implementation directories, test organization", "Large codebase? Prioritize directories by name relevance to researchGoal (e.g., \"auth\" dir for authentication research)"];
|
|
16
|
+
readonly empty: readonly ["Path not found? Start at root (path=\"\", depth=1) to see top-level structure", "Monorepo? Check common patterns: packages/, apps/, libs/, modules/, workspaces/", "Verify repo exists: use SEARCH_CODE match=\"path\" to confirm repository accessibility"];
|
|
17
|
+
};
|
|
18
|
+
readonly githubGetFileContent: {
|
|
19
|
+
readonly hasResults: readonly ["Follow code flow: trace imports/dependencies with SEARCH_CODE, then fetch related files with matchString", "Large file result? Use matchString with specific function/class names to reduce tokens and get focused context", "Check if context is sufficient: do you understand the implementation? If not, widen matchStringContextLines or fetch related files"];
|
|
20
|
+
readonly empty: readonly ["Path invalid? Verify with VIEW_REPO_STRUCTURE or SEARCH_CODE match=\"path\" first", "Branch not found? Omit branch parameter to auto-detect default, or try main/master/develop", "Check path format: no leading slash, use exact case (e.g., \"src/api/auth.ts\" not \"/Src/API/auth.ts\")"];
|
|
21
|
+
};
|
|
22
|
+
readonly githubSearchPullRequests: {
|
|
23
|
+
readonly hasResults: readonly ["Extract implementation insights: examine discussions for rationale, diffs for patterns, review comments for gotchas", "Need code details? Extract changed files/functions and search with SEARCH_CODE or fetch with FETCH_CONTENT", "Token budget tight? Start without withContent/withComments, add only if discussions/diffs are critical", "Multiple PRs? Identify common patterns: same authors, related issues, similar file changes"];
|
|
24
|
+
readonly empty: readonly ["Search too narrow? Remove constraints progressively: state, then labels, then author, then merged", "Date range limiting results? Widen time window or remove date filters entirely", "Try different search angles: switch from query to author/label filters or vice versa", "Branch-specific work? Add head/base branch filters to find workstream PRs"];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export declare const GENERIC_ERROR_HINTS: readonly ["Check authentication token validity and required scopes", "Verify network connectivity and GitHub API status", "Review rate limits and retry after cooldown if exceeded", "Validate input parameters (owner, repo, path, branch) for correctness", "Check repository visibility (public vs private) and access permissions", "Retry the operation after a brief delay for transient errors"];
|
|
28
|
+
export declare function getToolHints(toolName: keyof typeof TOOL_HINTS, resultType: 'hasResults' | 'empty'): readonly string[];
|
|
29
|
+
export declare function getGenericErrorHints(): readonly string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GitHubAPIError } from '../github/githubAPI';
|
|
2
2
|
import type { ToolErrorResult, ToolSuccessResult } from '../types.js';
|
|
3
|
-
import { TOOL_NAMES } from '
|
|
3
|
+
import { TOOL_NAMES } from '../constants.js';
|
|
4
4
|
export declare function createErrorResult(query: {
|
|
5
5
|
mainResearchGoal?: string;
|
|
6
6
|
researchGoal?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "octocode-mcp",
|
|
3
|
-
"version": "7.0.12
|
|
3
|
+
"version": "7.0.12",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server for advanced GitHub repository analysis and code discovery. Provides AI assistants with powerful tools to search, analyze, and understand codebases across GitHub.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"mcp",
|
|
@@ -107,6 +107,5 @@
|
|
|
107
107
|
"type": "stdio",
|
|
108
108
|
"command": "octocode-mcp",
|
|
109
109
|
"args": []
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -1,203 +0,0 @@
|
|
|
1
|
-
export interface ToolMetadata {
|
|
2
|
-
name: string;
|
|
3
|
-
description: string;
|
|
4
|
-
schema: Record<string, string>;
|
|
5
|
-
hints: {
|
|
6
|
-
hasResults: readonly string[];
|
|
7
|
-
empty: readonly string[];
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export interface CompleteMetadata {
|
|
11
|
-
instructions: string;
|
|
12
|
-
toolNames: {
|
|
13
|
-
GITHUB_FETCH_CONTENT: 'githubGetFileContent';
|
|
14
|
-
GITHUB_SEARCH_CODE: 'githubSearchCode';
|
|
15
|
-
GITHUB_SEARCH_PULL_REQUESTS: 'githubSearchPullRequests';
|
|
16
|
-
GITHUB_SEARCH_REPOSITORIES: 'githubSearchRepositories';
|
|
17
|
-
GITHUB_VIEW_REPO_STRUCTURE: 'githubViewRepoStructure';
|
|
18
|
-
};
|
|
19
|
-
baseSchema: {
|
|
20
|
-
mainResearchGoal: string;
|
|
21
|
-
researchGoal: string;
|
|
22
|
-
reasoning: string;
|
|
23
|
-
bulkQuery: (toolName: string) => string;
|
|
24
|
-
};
|
|
25
|
-
tools: Record<string, ToolMetadata>;
|
|
26
|
-
baseHints: {
|
|
27
|
-
hasResults: readonly string[];
|
|
28
|
-
empty: readonly string[];
|
|
29
|
-
};
|
|
30
|
-
genericErrorHints: readonly string[];
|
|
31
|
-
}
|
|
32
|
-
export declare const INSTRUCTIONS: string;
|
|
33
|
-
export declare const TOOL_NAMES: {
|
|
34
|
-
GITHUB_FETCH_CONTENT: "githubGetFileContent";
|
|
35
|
-
GITHUB_SEARCH_CODE: "githubSearchCode";
|
|
36
|
-
GITHUB_SEARCH_PULL_REQUESTS: "githubSearchPullRequests";
|
|
37
|
-
GITHUB_SEARCH_REPOSITORIES: "githubSearchRepositories";
|
|
38
|
-
GITHUB_VIEW_REPO_STRUCTURE: "githubViewRepoStructure";
|
|
39
|
-
};
|
|
40
|
-
export type ToolName = (typeof TOOL_NAMES)[keyof typeof TOOL_NAMES];
|
|
41
|
-
export declare const BASE_SCHEMA: {
|
|
42
|
-
mainResearchGoal: string;
|
|
43
|
-
researchGoal: string;
|
|
44
|
-
reasoning: string;
|
|
45
|
-
bulkQuery: (toolName: string) => string;
|
|
46
|
-
};
|
|
47
|
-
export declare const GENERIC_ERROR_HINTS: readonly string[];
|
|
48
|
-
export declare function getCompleteMetadata(): Promise<CompleteMetadata>;
|
|
49
|
-
export declare function getToolsMetadata(): Promise<Record<string, ToolMetadata>>;
|
|
50
|
-
export declare function getToolMetadata(toolName: string): Promise<ToolMetadata | undefined>;
|
|
51
|
-
export declare function getToolDescription(toolName: string): Promise<string>;
|
|
52
|
-
export declare function getToolSchema(toolName: string): Promise<Record<string, string>>;
|
|
53
|
-
export declare function getToolHints(toolName: string, resultType: 'hasResults' | 'empty'): Promise<readonly string[]>;
|
|
54
|
-
export declare function getToolHintsSync(toolName: string, resultType: 'hasResults' | 'empty'): readonly string[];
|
|
55
|
-
export declare function getGenericErrorHints(): Promise<readonly string[]>;
|
|
56
|
-
export declare function getGenericErrorHintsSync(): readonly string[];
|
|
57
|
-
export declare function getBaseHints(): Promise<{
|
|
58
|
-
hasResults: readonly string[];
|
|
59
|
-
empty: readonly string[];
|
|
60
|
-
}>;
|
|
61
|
-
export declare function getDynamicHints(toolName: string, hintType: 'topicsHasResults' | 'topicsEmpty' | 'keywordsEmpty'): readonly string[];
|
|
62
|
-
export declare function getBulkOperationsInstructions(): {
|
|
63
|
-
base: string;
|
|
64
|
-
hasResults: string;
|
|
65
|
-
empty: string;
|
|
66
|
-
error: string;
|
|
67
|
-
};
|
|
68
|
-
export declare const DESCRIPTIONS: Record<string, string>;
|
|
69
|
-
export declare const TOOL_HINTS: Record<string, {
|
|
70
|
-
hasResults: readonly string[];
|
|
71
|
-
empty: readonly string[];
|
|
72
|
-
}> & {
|
|
73
|
-
base: {
|
|
74
|
-
hasResults: readonly string[];
|
|
75
|
-
empty: readonly string[];
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
export declare const GITHUB_FETCH_CONTENT: {
|
|
79
|
-
scope: {
|
|
80
|
-
owner: string;
|
|
81
|
-
repo: string;
|
|
82
|
-
branch: string;
|
|
83
|
-
path: string;
|
|
84
|
-
};
|
|
85
|
-
processing: {
|
|
86
|
-
minified: string;
|
|
87
|
-
sanitize: string;
|
|
88
|
-
};
|
|
89
|
-
range: {
|
|
90
|
-
startLine: string;
|
|
91
|
-
endLine: string;
|
|
92
|
-
fullContent: string;
|
|
93
|
-
matchString: string;
|
|
94
|
-
matchStringContextLines: string;
|
|
95
|
-
};
|
|
96
|
-
validation: {
|
|
97
|
-
parameterConflict: string;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
export declare const GITHUB_SEARCH_CODE: {
|
|
101
|
-
search: {
|
|
102
|
-
keywordsToSearch: string;
|
|
103
|
-
};
|
|
104
|
-
scope: {
|
|
105
|
-
owner: string;
|
|
106
|
-
repo: string;
|
|
107
|
-
};
|
|
108
|
-
filters: {
|
|
109
|
-
extension: string;
|
|
110
|
-
stars: string;
|
|
111
|
-
filename: string;
|
|
112
|
-
path: string;
|
|
113
|
-
match: string;
|
|
114
|
-
};
|
|
115
|
-
resultLimit: {
|
|
116
|
-
limit: string;
|
|
117
|
-
};
|
|
118
|
-
processing: {
|
|
119
|
-
minify: string;
|
|
120
|
-
sanitize: string;
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
export declare const GITHUB_SEARCH_REPOS: {
|
|
124
|
-
search: {
|
|
125
|
-
keywordsToSearch: string;
|
|
126
|
-
topicsToSearch: string;
|
|
127
|
-
};
|
|
128
|
-
scope: {
|
|
129
|
-
owner: string;
|
|
130
|
-
};
|
|
131
|
-
filters: {
|
|
132
|
-
stars: string;
|
|
133
|
-
size: string;
|
|
134
|
-
created: string;
|
|
135
|
-
updated: string;
|
|
136
|
-
match: string;
|
|
137
|
-
};
|
|
138
|
-
sorting: {
|
|
139
|
-
sort: string;
|
|
140
|
-
};
|
|
141
|
-
resultLimit: {
|
|
142
|
-
limit: string;
|
|
143
|
-
};
|
|
144
|
-
};
|
|
145
|
-
export declare const GITHUB_SEARCH_PULL_REQUESTS: {
|
|
146
|
-
search: {
|
|
147
|
-
query: string;
|
|
148
|
-
};
|
|
149
|
-
scope: {
|
|
150
|
-
prNumber: string;
|
|
151
|
-
owner: string;
|
|
152
|
-
repo: string;
|
|
153
|
-
};
|
|
154
|
-
filters: {
|
|
155
|
-
match: string;
|
|
156
|
-
created: string;
|
|
157
|
-
updated: string;
|
|
158
|
-
state: string;
|
|
159
|
-
assignee: string;
|
|
160
|
-
author: string;
|
|
161
|
-
commenter: string;
|
|
162
|
-
involves: string;
|
|
163
|
-
mentions: string;
|
|
164
|
-
"review-requested": string;
|
|
165
|
-
"reviewed-by": string;
|
|
166
|
-
label: string;
|
|
167
|
-
"no-label": string;
|
|
168
|
-
"no-milestone": string;
|
|
169
|
-
"no-project": string;
|
|
170
|
-
"no-assignee": string;
|
|
171
|
-
head: string;
|
|
172
|
-
base: string;
|
|
173
|
-
closed: string;
|
|
174
|
-
"merged-at": string;
|
|
175
|
-
comments: string;
|
|
176
|
-
reactions: string;
|
|
177
|
-
interactions: string;
|
|
178
|
-
merged: string;
|
|
179
|
-
draft: string;
|
|
180
|
-
};
|
|
181
|
-
sorting: {
|
|
182
|
-
sort: string;
|
|
183
|
-
order: string;
|
|
184
|
-
};
|
|
185
|
-
resultLimit: {
|
|
186
|
-
limit: string;
|
|
187
|
-
};
|
|
188
|
-
outputShaping: {
|
|
189
|
-
withComments: string;
|
|
190
|
-
withContent: string;
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
|
-
export declare const GITHUB_VIEW_REPO_STRUCTURE: {
|
|
194
|
-
scope: {
|
|
195
|
-
owner: string;
|
|
196
|
-
repo: string;
|
|
197
|
-
branch: string;
|
|
198
|
-
path: string;
|
|
199
|
-
};
|
|
200
|
-
range: {
|
|
201
|
-
depth: string;
|
|
202
|
-
};
|
|
203
|
-
};
|