octocode-mcp 7.0.3 → 7.0.4-alpha.2
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/README.md +587 -413
- package/dist/index.js +1 -1
- package/dist/src/prompts/kudos.d.ts +3 -0
- package/dist/src/prompts/prompts.d.ts +6 -0
- package/dist/src/prompts/research.d.ts +3 -0
- package/dist/src/prompts/use.d.ts +3 -0
- package/dist/src/resources.d.ts +1 -6
- package/dist/src/sampling.d.ts +4 -4
- package/dist/src/scheme/baseSchema.d.ts +3 -0
- package/dist/src/scheme/github_fetch_content.d.ts +8 -0
- package/dist/src/scheme/github_search_code.d.ts +20 -12
- package/dist/src/scheme/github_search_pull_requests.d.ts +26 -18
- package/dist/src/scheme/github_search_repos.d.ts +17 -12
- package/dist/src/scheme/github_view_repo_structure.d.ts +8 -0
- package/dist/src/scheme/schemDescriptions.d.ts +0 -6
- package/dist/src/security/withSecurityValidation.d.ts +29 -0
- package/dist/src/session.d.ts +7 -17
- package/dist/src/tools/github_fetch_content.d.ts +2 -1
- package/dist/src/tools/github_search_code.d.ts +2 -1
- package/dist/src/tools/github_search_pull_requests.d.ts +2 -1
- package/dist/src/tools/github_search_repos.d.ts +2 -1
- package/dist/src/tools/github_view_repo_structure.d.ts +2 -1
- package/dist/src/tools/hints.d.ts +1 -1
- package/dist/src/tools/toolConfig.d.ts +2 -1
- package/dist/src/tools/toolsManager.d.ts +4 -1
- package/dist/src/tools/utils.d.ts +2 -0
- package/dist/src/types.d.ts +23 -2
- package/dist/tests/security/withSecurityValidation.extractResearchFields.test.d.ts +1 -0
- package/dist/tests/tools/callback.test.d.ts +1 -0
- package/package.json +5 -3
- package/dist/src/prompts.d.ts +0 -11
- package/dist/src/systemPrompts.d.ts +0 -1
package/dist/src/resources.d.ts
CHANGED
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Register resource handlers with the MCP server
|
|
4
|
-
* @param server - The MCP server instance
|
|
5
|
-
*/
|
|
6
|
-
export declare function registerResources(server: McpServer): void;
|
|
1
|
+
//# sourceMappingURL=resources.d.ts.map
|
package/dist/src/sampling.d.ts
CHANGED
|
@@ -19,39 +19,39 @@ declare const SamplingRequestSchema: z.ZodObject<{
|
|
|
19
19
|
text: string;
|
|
20
20
|
}>;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
role: "user" | "assistant";
|
|
23
22
|
content: {
|
|
24
23
|
type: "text";
|
|
25
24
|
text: string;
|
|
26
25
|
};
|
|
27
|
-
}, {
|
|
28
26
|
role: "user" | "assistant";
|
|
27
|
+
}, {
|
|
29
28
|
content: {
|
|
30
29
|
type: "text";
|
|
31
30
|
text: string;
|
|
32
31
|
};
|
|
32
|
+
role: "user" | "assistant";
|
|
33
33
|
}>, "many">;
|
|
34
34
|
maxTokens: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
35
35
|
temperature: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
36
36
|
stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
37
37
|
}, "strip", z.ZodTypeAny, {
|
|
38
38
|
messages: {
|
|
39
|
-
role: "user" | "assistant";
|
|
40
39
|
content: {
|
|
41
40
|
type: "text";
|
|
42
41
|
text: string;
|
|
43
42
|
};
|
|
43
|
+
role: "user" | "assistant";
|
|
44
44
|
}[];
|
|
45
45
|
maxTokens: number;
|
|
46
46
|
temperature: number;
|
|
47
47
|
stopSequences?: string[] | undefined;
|
|
48
48
|
}, {
|
|
49
49
|
messages: {
|
|
50
|
-
role: "user" | "assistant";
|
|
51
50
|
content: {
|
|
52
51
|
type: "text";
|
|
53
52
|
text: string;
|
|
54
53
|
};
|
|
54
|
+
role: "user" | "assistant";
|
|
55
55
|
}[];
|
|
56
56
|
maxTokens?: number | undefined;
|
|
57
57
|
temperature?: number | undefined;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const BaseQuerySchema: z.ZodObject<{
|
|
3
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
3
4
|
researchGoal: z.ZodOptional<z.ZodString>;
|
|
4
5
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
5
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
mainResearchGoal?: string | undefined;
|
|
6
8
|
researchGoal?: string | undefined;
|
|
7
9
|
reasoning?: string | undefined;
|
|
8
10
|
}, {
|
|
11
|
+
mainResearchGoal?: string | undefined;
|
|
9
12
|
researchGoal?: string | undefined;
|
|
10
13
|
reasoning?: string | undefined;
|
|
11
14
|
}>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const FileContentQuerySchema: z.ZodObject<{
|
|
3
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
3
4
|
researchGoal: z.ZodOptional<z.ZodString>;
|
|
4
5
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
5
6
|
} & {
|
|
@@ -22,6 +23,7 @@ export declare const FileContentQuerySchema: z.ZodObject<{
|
|
|
22
23
|
minified: boolean;
|
|
23
24
|
fullContent: boolean;
|
|
24
25
|
matchStringContextLines: number;
|
|
26
|
+
mainResearchGoal?: string | undefined;
|
|
25
27
|
researchGoal?: string | undefined;
|
|
26
28
|
reasoning?: string | undefined;
|
|
27
29
|
branch?: string | undefined;
|
|
@@ -32,6 +34,7 @@ export declare const FileContentQuerySchema: z.ZodObject<{
|
|
|
32
34
|
path: string;
|
|
33
35
|
owner: string;
|
|
34
36
|
repo: string;
|
|
37
|
+
mainResearchGoal?: string | undefined;
|
|
35
38
|
researchGoal?: string | undefined;
|
|
36
39
|
reasoning?: string | undefined;
|
|
37
40
|
sanitize?: boolean | undefined;
|
|
@@ -45,6 +48,7 @@ export declare const FileContentQuerySchema: z.ZodObject<{
|
|
|
45
48
|
}>;
|
|
46
49
|
export declare const FileContentBulkQuerySchema: z.ZodObject<{
|
|
47
50
|
queries: z.ZodArray<z.ZodObject<{
|
|
51
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
48
52
|
researchGoal: z.ZodOptional<z.ZodString>;
|
|
49
53
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
50
54
|
} & {
|
|
@@ -67,6 +71,7 @@ export declare const FileContentBulkQuerySchema: z.ZodObject<{
|
|
|
67
71
|
minified: boolean;
|
|
68
72
|
fullContent: boolean;
|
|
69
73
|
matchStringContextLines: number;
|
|
74
|
+
mainResearchGoal?: string | undefined;
|
|
70
75
|
researchGoal?: string | undefined;
|
|
71
76
|
reasoning?: string | undefined;
|
|
72
77
|
branch?: string | undefined;
|
|
@@ -77,6 +82,7 @@ export declare const FileContentBulkQuerySchema: z.ZodObject<{
|
|
|
77
82
|
path: string;
|
|
78
83
|
owner: string;
|
|
79
84
|
repo: string;
|
|
85
|
+
mainResearchGoal?: string | undefined;
|
|
80
86
|
researchGoal?: string | undefined;
|
|
81
87
|
reasoning?: string | undefined;
|
|
82
88
|
sanitize?: boolean | undefined;
|
|
@@ -97,6 +103,7 @@ export declare const FileContentBulkQuerySchema: z.ZodObject<{
|
|
|
97
103
|
minified: boolean;
|
|
98
104
|
fullContent: boolean;
|
|
99
105
|
matchStringContextLines: number;
|
|
106
|
+
mainResearchGoal?: string | undefined;
|
|
100
107
|
researchGoal?: string | undefined;
|
|
101
108
|
reasoning?: string | undefined;
|
|
102
109
|
branch?: string | undefined;
|
|
@@ -109,6 +116,7 @@ export declare const FileContentBulkQuerySchema: z.ZodObject<{
|
|
|
109
116
|
path: string;
|
|
110
117
|
owner: string;
|
|
111
118
|
repo: string;
|
|
119
|
+
mainResearchGoal?: string | undefined;
|
|
112
120
|
researchGoal?: string | undefined;
|
|
113
121
|
reasoning?: string | undefined;
|
|
114
122
|
sanitize?: boolean | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const GitHubCodeSearchQuerySchema: z.ZodObject<{
|
|
3
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
3
4
|
researchGoal: z.ZodOptional<z.ZodString>;
|
|
4
5
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
5
6
|
} & {
|
|
@@ -19,10 +20,11 @@ export declare const GitHubCodeSearchQuerySchema: z.ZodObject<{
|
|
|
19
20
|
minify: boolean;
|
|
20
21
|
sanitize: boolean;
|
|
21
22
|
path?: string | undefined;
|
|
22
|
-
|
|
23
|
-
repo?: string | undefined;
|
|
23
|
+
mainResearchGoal?: string | undefined;
|
|
24
24
|
researchGoal?: string | undefined;
|
|
25
25
|
reasoning?: string | undefined;
|
|
26
|
+
owner?: string | undefined;
|
|
27
|
+
repo?: string | undefined;
|
|
26
28
|
stars?: string | undefined;
|
|
27
29
|
extension?: string | undefined;
|
|
28
30
|
filename?: string | undefined;
|
|
@@ -31,10 +33,11 @@ export declare const GitHubCodeSearchQuerySchema: z.ZodObject<{
|
|
|
31
33
|
}, {
|
|
32
34
|
keywordsToSearch: string[];
|
|
33
35
|
path?: string | undefined;
|
|
34
|
-
|
|
35
|
-
repo?: string | undefined;
|
|
36
|
+
mainResearchGoal?: string | undefined;
|
|
36
37
|
researchGoal?: string | undefined;
|
|
37
38
|
reasoning?: string | undefined;
|
|
39
|
+
owner?: string | undefined;
|
|
40
|
+
repo?: string | undefined;
|
|
38
41
|
stars?: string | undefined;
|
|
39
42
|
extension?: string | undefined;
|
|
40
43
|
filename?: string | undefined;
|
|
@@ -45,6 +48,7 @@ export declare const GitHubCodeSearchQuerySchema: z.ZodObject<{
|
|
|
45
48
|
}>;
|
|
46
49
|
export declare const GitHubCodeSearchBulkQuerySchema: z.ZodObject<{
|
|
47
50
|
queries: z.ZodArray<z.ZodObject<{
|
|
51
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
48
52
|
researchGoal: z.ZodOptional<z.ZodString>;
|
|
49
53
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
50
54
|
} & {
|
|
@@ -64,10 +68,11 @@ export declare const GitHubCodeSearchBulkQuerySchema: z.ZodObject<{
|
|
|
64
68
|
minify: boolean;
|
|
65
69
|
sanitize: boolean;
|
|
66
70
|
path?: string | undefined;
|
|
67
|
-
|
|
68
|
-
repo?: string | undefined;
|
|
71
|
+
mainResearchGoal?: string | undefined;
|
|
69
72
|
researchGoal?: string | undefined;
|
|
70
73
|
reasoning?: string | undefined;
|
|
74
|
+
owner?: string | undefined;
|
|
75
|
+
repo?: string | undefined;
|
|
71
76
|
stars?: string | undefined;
|
|
72
77
|
extension?: string | undefined;
|
|
73
78
|
filename?: string | undefined;
|
|
@@ -76,10 +81,11 @@ export declare const GitHubCodeSearchBulkQuerySchema: z.ZodObject<{
|
|
|
76
81
|
}, {
|
|
77
82
|
keywordsToSearch: string[];
|
|
78
83
|
path?: string | undefined;
|
|
79
|
-
|
|
80
|
-
repo?: string | undefined;
|
|
84
|
+
mainResearchGoal?: string | undefined;
|
|
81
85
|
researchGoal?: string | undefined;
|
|
82
86
|
reasoning?: string | undefined;
|
|
87
|
+
owner?: string | undefined;
|
|
88
|
+
repo?: string | undefined;
|
|
83
89
|
stars?: string | undefined;
|
|
84
90
|
extension?: string | undefined;
|
|
85
91
|
filename?: string | undefined;
|
|
@@ -94,10 +100,11 @@ export declare const GitHubCodeSearchBulkQuerySchema: z.ZodObject<{
|
|
|
94
100
|
minify: boolean;
|
|
95
101
|
sanitize: boolean;
|
|
96
102
|
path?: string | undefined;
|
|
97
|
-
|
|
98
|
-
repo?: string | undefined;
|
|
103
|
+
mainResearchGoal?: string | undefined;
|
|
99
104
|
researchGoal?: string | undefined;
|
|
100
105
|
reasoning?: string | undefined;
|
|
106
|
+
owner?: string | undefined;
|
|
107
|
+
repo?: string | undefined;
|
|
101
108
|
stars?: string | undefined;
|
|
102
109
|
extension?: string | undefined;
|
|
103
110
|
filename?: string | undefined;
|
|
@@ -108,10 +115,11 @@ export declare const GitHubCodeSearchBulkQuerySchema: z.ZodObject<{
|
|
|
108
115
|
queries: {
|
|
109
116
|
keywordsToSearch: string[];
|
|
110
117
|
path?: string | undefined;
|
|
111
|
-
|
|
112
|
-
repo?: string | undefined;
|
|
118
|
+
mainResearchGoal?: string | undefined;
|
|
113
119
|
researchGoal?: string | undefined;
|
|
114
120
|
reasoning?: string | undefined;
|
|
121
|
+
owner?: string | undefined;
|
|
122
|
+
repo?: string | undefined;
|
|
115
123
|
stars?: string | undefined;
|
|
116
124
|
extension?: string | undefined;
|
|
117
125
|
filename?: string | undefined;
|
|
@@ -11,6 +11,7 @@ export declare const DateRangeSchema: z.ZodObject<{
|
|
|
11
11
|
updated?: string | undefined;
|
|
12
12
|
}>;
|
|
13
13
|
export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
14
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
14
15
|
researchGoal: z.ZodOptional<z.ZodString>;
|
|
15
16
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
16
17
|
} & {
|
|
@@ -50,10 +51,7 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
|
50
51
|
withContent: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
51
52
|
}, "strip", z.ZodTypeAny, {
|
|
52
53
|
order: "asc" | "desc";
|
|
53
|
-
sort?: "created" | "updated" | "best-match" | undefined;
|
|
54
54
|
query?: string | undefined;
|
|
55
|
-
owner?: string | undefined;
|
|
56
|
-
repo?: string | undefined;
|
|
57
55
|
state?: "open" | "closed" | undefined;
|
|
58
56
|
draft?: boolean | undefined;
|
|
59
57
|
assignee?: string | undefined;
|
|
@@ -62,8 +60,12 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
|
62
60
|
closed?: string | undefined;
|
|
63
61
|
created?: string | undefined;
|
|
64
62
|
updated?: string | undefined;
|
|
63
|
+
mainResearchGoal?: string | undefined;
|
|
65
64
|
researchGoal?: string | undefined;
|
|
66
65
|
reasoning?: string | undefined;
|
|
66
|
+
owner?: string | undefined;
|
|
67
|
+
repo?: string | undefined;
|
|
68
|
+
sort?: "created" | "updated" | "best-match" | undefined;
|
|
67
69
|
head?: string | undefined;
|
|
68
70
|
'no-label'?: boolean | undefined;
|
|
69
71
|
'no-milestone'?: boolean | undefined;
|
|
@@ -86,10 +88,7 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
|
86
88
|
withComments?: boolean | undefined;
|
|
87
89
|
withContent?: boolean | undefined;
|
|
88
90
|
}, {
|
|
89
|
-
sort?: "created" | "updated" | "best-match" | undefined;
|
|
90
91
|
query?: string | undefined;
|
|
91
|
-
owner?: string | undefined;
|
|
92
|
-
repo?: string | undefined;
|
|
93
92
|
state?: "open" | "closed" | undefined;
|
|
94
93
|
draft?: boolean | undefined;
|
|
95
94
|
assignee?: string | undefined;
|
|
@@ -98,8 +97,12 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
|
98
97
|
closed?: string | undefined;
|
|
99
98
|
created?: string | undefined;
|
|
100
99
|
updated?: string | undefined;
|
|
100
|
+
mainResearchGoal?: string | undefined;
|
|
101
101
|
researchGoal?: string | undefined;
|
|
102
102
|
reasoning?: string | undefined;
|
|
103
|
+
owner?: string | undefined;
|
|
104
|
+
repo?: string | undefined;
|
|
105
|
+
sort?: "created" | "updated" | "best-match" | undefined;
|
|
103
106
|
head?: string | undefined;
|
|
104
107
|
'no-label'?: boolean | undefined;
|
|
105
108
|
'no-milestone'?: boolean | undefined;
|
|
@@ -125,6 +128,7 @@ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
|
|
|
125
128
|
}>;
|
|
126
129
|
export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
127
130
|
queries: z.ZodArray<z.ZodObject<{
|
|
131
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
128
132
|
researchGoal: z.ZodOptional<z.ZodString>;
|
|
129
133
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
130
134
|
} & {
|
|
@@ -164,10 +168,7 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
|
164
168
|
withContent: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
165
169
|
}, "strip", z.ZodTypeAny, {
|
|
166
170
|
order: "asc" | "desc";
|
|
167
|
-
sort?: "created" | "updated" | "best-match" | undefined;
|
|
168
171
|
query?: string | undefined;
|
|
169
|
-
owner?: string | undefined;
|
|
170
|
-
repo?: string | undefined;
|
|
171
172
|
state?: "open" | "closed" | undefined;
|
|
172
173
|
draft?: boolean | undefined;
|
|
173
174
|
assignee?: string | undefined;
|
|
@@ -176,8 +177,12 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
|
176
177
|
closed?: string | undefined;
|
|
177
178
|
created?: string | undefined;
|
|
178
179
|
updated?: string | undefined;
|
|
180
|
+
mainResearchGoal?: string | undefined;
|
|
179
181
|
researchGoal?: string | undefined;
|
|
180
182
|
reasoning?: string | undefined;
|
|
183
|
+
owner?: string | undefined;
|
|
184
|
+
repo?: string | undefined;
|
|
185
|
+
sort?: "created" | "updated" | "best-match" | undefined;
|
|
181
186
|
head?: string | undefined;
|
|
182
187
|
'no-label'?: boolean | undefined;
|
|
183
188
|
'no-milestone'?: boolean | undefined;
|
|
@@ -200,10 +205,7 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
|
200
205
|
withComments?: boolean | undefined;
|
|
201
206
|
withContent?: boolean | undefined;
|
|
202
207
|
}, {
|
|
203
|
-
sort?: "created" | "updated" | "best-match" | undefined;
|
|
204
208
|
query?: string | undefined;
|
|
205
|
-
owner?: string | undefined;
|
|
206
|
-
repo?: string | undefined;
|
|
207
209
|
state?: "open" | "closed" | undefined;
|
|
208
210
|
draft?: boolean | undefined;
|
|
209
211
|
assignee?: string | undefined;
|
|
@@ -212,8 +214,12 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
|
212
214
|
closed?: string | undefined;
|
|
213
215
|
created?: string | undefined;
|
|
214
216
|
updated?: string | undefined;
|
|
217
|
+
mainResearchGoal?: string | undefined;
|
|
215
218
|
researchGoal?: string | undefined;
|
|
216
219
|
reasoning?: string | undefined;
|
|
220
|
+
owner?: string | undefined;
|
|
221
|
+
repo?: string | undefined;
|
|
222
|
+
sort?: "created" | "updated" | "best-match" | undefined;
|
|
217
223
|
head?: string | undefined;
|
|
218
224
|
'no-label'?: boolean | undefined;
|
|
219
225
|
'no-milestone'?: boolean | undefined;
|
|
@@ -240,10 +246,7 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
|
240
246
|
}, "strip", z.ZodTypeAny, {
|
|
241
247
|
queries: {
|
|
242
248
|
order: "asc" | "desc";
|
|
243
|
-
sort?: "created" | "updated" | "best-match" | undefined;
|
|
244
249
|
query?: string | undefined;
|
|
245
|
-
owner?: string | undefined;
|
|
246
|
-
repo?: string | undefined;
|
|
247
250
|
state?: "open" | "closed" | undefined;
|
|
248
251
|
draft?: boolean | undefined;
|
|
249
252
|
assignee?: string | undefined;
|
|
@@ -252,8 +255,12 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
|
252
255
|
closed?: string | undefined;
|
|
253
256
|
created?: string | undefined;
|
|
254
257
|
updated?: string | undefined;
|
|
258
|
+
mainResearchGoal?: string | undefined;
|
|
255
259
|
researchGoal?: string | undefined;
|
|
256
260
|
reasoning?: string | undefined;
|
|
261
|
+
owner?: string | undefined;
|
|
262
|
+
repo?: string | undefined;
|
|
263
|
+
sort?: "created" | "updated" | "best-match" | undefined;
|
|
257
264
|
head?: string | undefined;
|
|
258
265
|
'no-label'?: boolean | undefined;
|
|
259
266
|
'no-milestone'?: boolean | undefined;
|
|
@@ -278,10 +285,7 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
|
278
285
|
}[];
|
|
279
286
|
}, {
|
|
280
287
|
queries: {
|
|
281
|
-
sort?: "created" | "updated" | "best-match" | undefined;
|
|
282
288
|
query?: string | undefined;
|
|
283
|
-
owner?: string | undefined;
|
|
284
|
-
repo?: string | undefined;
|
|
285
289
|
state?: "open" | "closed" | undefined;
|
|
286
290
|
draft?: boolean | undefined;
|
|
287
291
|
assignee?: string | undefined;
|
|
@@ -290,8 +294,12 @@ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
|
|
|
290
294
|
closed?: string | undefined;
|
|
291
295
|
created?: string | undefined;
|
|
292
296
|
updated?: string | undefined;
|
|
297
|
+
mainResearchGoal?: string | undefined;
|
|
293
298
|
researchGoal?: string | undefined;
|
|
294
299
|
reasoning?: string | undefined;
|
|
300
|
+
owner?: string | undefined;
|
|
301
|
+
repo?: string | undefined;
|
|
302
|
+
sort?: "created" | "updated" | "best-match" | undefined;
|
|
295
303
|
head?: string | undefined;
|
|
296
304
|
'no-label'?: boolean | undefined;
|
|
297
305
|
'no-milestone'?: boolean | undefined;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const GitHubReposSearchQuerySchema: z.ZodObject<{
|
|
3
3
|
queries: z.ZodArray<z.ZodObject<{
|
|
4
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
4
5
|
researchGoal: z.ZodOptional<z.ZodString>;
|
|
5
6
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
6
7
|
} & {
|
|
@@ -15,58 +16,62 @@ export declare const GitHubReposSearchQuerySchema: z.ZodObject<{
|
|
|
15
16
|
sort: z.ZodOptional<z.ZodEnum<["forks", "stars", "updated", "best-match"]>>;
|
|
16
17
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
17
18
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
|
|
19
|
-
owner?: string | undefined;
|
|
20
19
|
created?: string | undefined;
|
|
21
20
|
updated?: string | undefined;
|
|
21
|
+
mainResearchGoal?: string | undefined;
|
|
22
22
|
researchGoal?: string | undefined;
|
|
23
23
|
reasoning?: string | undefined;
|
|
24
|
+
owner?: string | undefined;
|
|
24
25
|
stars?: string | undefined;
|
|
26
|
+
sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
|
|
25
27
|
keywordsToSearch?: string[] | undefined;
|
|
26
|
-
match?: ("
|
|
28
|
+
match?: ("name" | "description" | "readme")[] | undefined;
|
|
27
29
|
limit?: number | undefined;
|
|
28
30
|
size?: string | undefined;
|
|
29
31
|
topicsToSearch?: string[] | undefined;
|
|
30
32
|
}, {
|
|
31
|
-
sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
|
|
32
|
-
owner?: string | undefined;
|
|
33
33
|
created?: string | undefined;
|
|
34
34
|
updated?: string | undefined;
|
|
35
|
+
mainResearchGoal?: string | undefined;
|
|
35
36
|
researchGoal?: string | undefined;
|
|
36
37
|
reasoning?: string | undefined;
|
|
38
|
+
owner?: string | undefined;
|
|
37
39
|
stars?: string | undefined;
|
|
40
|
+
sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
|
|
38
41
|
keywordsToSearch?: string[] | undefined;
|
|
39
|
-
match?: ("
|
|
42
|
+
match?: ("name" | "description" | "readme")[] | undefined;
|
|
40
43
|
limit?: number | undefined;
|
|
41
44
|
size?: string | undefined;
|
|
42
45
|
topicsToSearch?: string[] | undefined;
|
|
43
46
|
}>, "many">;
|
|
44
47
|
}, "strip", z.ZodTypeAny, {
|
|
45
48
|
queries: {
|
|
46
|
-
sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
|
|
47
|
-
owner?: string | undefined;
|
|
48
49
|
created?: string | undefined;
|
|
49
50
|
updated?: string | undefined;
|
|
51
|
+
mainResearchGoal?: string | undefined;
|
|
50
52
|
researchGoal?: string | undefined;
|
|
51
53
|
reasoning?: string | undefined;
|
|
54
|
+
owner?: string | undefined;
|
|
52
55
|
stars?: string | undefined;
|
|
56
|
+
sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
|
|
53
57
|
keywordsToSearch?: string[] | undefined;
|
|
54
|
-
match?: ("
|
|
58
|
+
match?: ("name" | "description" | "readme")[] | undefined;
|
|
55
59
|
limit?: number | undefined;
|
|
56
60
|
size?: string | undefined;
|
|
57
61
|
topicsToSearch?: string[] | undefined;
|
|
58
62
|
}[];
|
|
59
63
|
}, {
|
|
60
64
|
queries: {
|
|
61
|
-
sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
|
|
62
|
-
owner?: string | undefined;
|
|
63
65
|
created?: string | undefined;
|
|
64
66
|
updated?: string | undefined;
|
|
67
|
+
mainResearchGoal?: string | undefined;
|
|
65
68
|
researchGoal?: string | undefined;
|
|
66
69
|
reasoning?: string | undefined;
|
|
70
|
+
owner?: string | undefined;
|
|
67
71
|
stars?: string | undefined;
|
|
72
|
+
sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
|
|
68
73
|
keywordsToSearch?: string[] | undefined;
|
|
69
|
-
match?: ("
|
|
74
|
+
match?: ("name" | "description" | "readme")[] | undefined;
|
|
70
75
|
limit?: number | undefined;
|
|
71
76
|
size?: string | undefined;
|
|
72
77
|
topicsToSearch?: string[] | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const GitHubViewRepoStructureQuerySchema: z.ZodObject<{
|
|
3
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
3
4
|
researchGoal: z.ZodOptional<z.ZodString>;
|
|
4
5
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
5
6
|
} & {
|
|
@@ -13,6 +14,7 @@ export declare const GitHubViewRepoStructureQuerySchema: z.ZodObject<{
|
|
|
13
14
|
repo: string;
|
|
14
15
|
branch: string;
|
|
15
16
|
path?: string | undefined;
|
|
17
|
+
mainResearchGoal?: string | undefined;
|
|
16
18
|
researchGoal?: string | undefined;
|
|
17
19
|
reasoning?: string | undefined;
|
|
18
20
|
depth?: number | undefined;
|
|
@@ -21,12 +23,14 @@ export declare const GitHubViewRepoStructureQuerySchema: z.ZodObject<{
|
|
|
21
23
|
repo: string;
|
|
22
24
|
branch: string;
|
|
23
25
|
path?: string | undefined;
|
|
26
|
+
mainResearchGoal?: string | undefined;
|
|
24
27
|
researchGoal?: string | undefined;
|
|
25
28
|
reasoning?: string | undefined;
|
|
26
29
|
depth?: number | undefined;
|
|
27
30
|
}>;
|
|
28
31
|
export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
|
|
29
32
|
queries: z.ZodArray<z.ZodObject<{
|
|
33
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
30
34
|
researchGoal: z.ZodOptional<z.ZodString>;
|
|
31
35
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
32
36
|
} & {
|
|
@@ -40,6 +44,7 @@ export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
|
|
|
40
44
|
repo: string;
|
|
41
45
|
branch: string;
|
|
42
46
|
path?: string | undefined;
|
|
47
|
+
mainResearchGoal?: string | undefined;
|
|
43
48
|
researchGoal?: string | undefined;
|
|
44
49
|
reasoning?: string | undefined;
|
|
45
50
|
depth?: number | undefined;
|
|
@@ -48,6 +53,7 @@ export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
|
|
|
48
53
|
repo: string;
|
|
49
54
|
branch: string;
|
|
50
55
|
path?: string | undefined;
|
|
56
|
+
mainResearchGoal?: string | undefined;
|
|
51
57
|
researchGoal?: string | undefined;
|
|
52
58
|
reasoning?: string | undefined;
|
|
53
59
|
depth?: number | undefined;
|
|
@@ -58,6 +64,7 @@ export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
|
|
|
58
64
|
repo: string;
|
|
59
65
|
branch: string;
|
|
60
66
|
path?: string | undefined;
|
|
67
|
+
mainResearchGoal?: string | undefined;
|
|
61
68
|
researchGoal?: string | undefined;
|
|
62
69
|
reasoning?: string | undefined;
|
|
63
70
|
depth?: number | undefined;
|
|
@@ -68,6 +75,7 @@ export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
|
|
|
68
75
|
repo: string;
|
|
69
76
|
branch: string;
|
|
70
77
|
path?: string | undefined;
|
|
78
|
+
mainResearchGoal?: string | undefined;
|
|
71
79
|
researchGoal?: string | undefined;
|
|
72
80
|
reasoning?: string | undefined;
|
|
73
81
|
depth?: number | undefined;
|
|
@@ -14,6 +14,35 @@ export declare function withSecurityValidation<T extends Record<string, unknown>
|
|
|
14
14
|
* For tools that don't need user context
|
|
15
15
|
*/
|
|
16
16
|
export declare function withBasicSecurityValidation<T extends Record<string, unknown>>(toolHandler: (sanitizedArgs: T) => Promise<CallToolResult>): (args: unknown) => Promise<CallToolResult>;
|
|
17
|
+
/**
|
|
18
|
+
* Extracts research-related fields from tool parameters for logging purposes.
|
|
19
|
+
*
|
|
20
|
+
* Supports both bulk operations (queries array) and single operations (direct params).
|
|
21
|
+
* Consolidates research fields from multiple queries, prioritizing non-empty values.
|
|
22
|
+
*
|
|
23
|
+
* @param params - The tool parameters containing research information
|
|
24
|
+
* @returns Object with mainResearchGoal, researchGoal, and reasoning fields
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* // Single query
|
|
28
|
+
* extractResearchFields({ queries: [{ mainResearchGoal: "Find auth", reasoning: "Security" }] })
|
|
29
|
+
* // Returns: { mainResearchGoal: "Find auth", reasoning: "Security" }
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* // Multiple queries - consolidates unique values
|
|
33
|
+
* extractResearchFields({
|
|
34
|
+
* queries: [
|
|
35
|
+
* { mainResearchGoal: "Auth", researchGoal: "Find login" },
|
|
36
|
+
* { mainResearchGoal: "Auth", researchGoal: "Find logout" }
|
|
37
|
+
* ]
|
|
38
|
+
* })
|
|
39
|
+
* // Returns: { mainResearchGoal: "Auth", researchGoal: "Find login; Find logout" }
|
|
40
|
+
*/
|
|
41
|
+
export declare function extractResearchFields(params: Record<string, unknown>): {
|
|
42
|
+
mainResearchGoal?: string;
|
|
43
|
+
researchGoal?: string;
|
|
44
|
+
reasoning?: string;
|
|
45
|
+
};
|
|
17
46
|
/**
|
|
18
47
|
* Extracts repository identifiers from tool parameters for logging purposes.
|
|
19
48
|
*
|
package/dist/src/session.d.ts
CHANGED
|
@@ -13,7 +13,11 @@ declare class SessionManager {
|
|
|
13
13
|
/**
|
|
14
14
|
* Log tool call
|
|
15
15
|
*/
|
|
16
|
-
logToolCall(toolName: string, repos: string[]): Promise<void>;
|
|
16
|
+
logToolCall(toolName: string, repos: string[], mainResearchGoal?: string, researchGoal?: string, reasoning?: string): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Log prompt call
|
|
19
|
+
*/
|
|
20
|
+
logPromptCall(promptName: string): Promise<void>;
|
|
17
21
|
/**
|
|
18
22
|
* Log error
|
|
19
23
|
*/
|
|
@@ -27,24 +31,10 @@ declare class SessionManager {
|
|
|
27
31
|
* Initialize the session manager
|
|
28
32
|
*/
|
|
29
33
|
export declare function initializeSession(): SessionManager;
|
|
30
|
-
/**
|
|
31
|
-
* Get the current session manager instance
|
|
32
|
-
*/
|
|
33
34
|
export declare function getSessionManager(): SessionManager | null;
|
|
34
|
-
/**
|
|
35
|
-
* Log session initialization
|
|
36
|
-
*/
|
|
37
35
|
export declare function logSessionInit(): Promise<void>;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*/
|
|
41
|
-
export declare function logToolCall(toolName: string, repos: string[]): Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
* Log error
|
|
44
|
-
*/
|
|
36
|
+
export declare function logToolCall(toolName: string, repos: string[], mainResearchGoal?: string, researchGoal?: string, reasoning?: string): Promise<void>;
|
|
37
|
+
export declare function logPromptCall(promptName: string): Promise<void>;
|
|
45
38
|
export declare function logSessionError(error: string): Promise<void>;
|
|
46
|
-
/**
|
|
47
|
-
* Reset session manager (for testing purposes)
|
|
48
|
-
*/
|
|
49
39
|
export declare function resetSessionManager(): void;
|
|
50
40
|
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
|
|
2
|
+
import type { ToolInvocationCallback } from '../types.js';
|
|
3
|
+
export declare function registerFetchGitHubFileContentTool(server: McpServer, callback?: ToolInvocationCallback): import("@modelcontextprotocol/sdk/server/mcp.js").RegisteredTool;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
|
|
2
|
+
import type { ToolInvocationCallback } from '../types.js';
|
|
3
|
+
export declare function registerGitHubSearchCodeTool(server: McpServer, callback?: ToolInvocationCallback): import("@modelcontextprotocol/sdk/server/mcp.js").RegisteredTool;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
|
|
2
|
+
import type { ToolInvocationCallback } from '../types.js';
|
|
3
|
+
export declare function registerSearchGitHubPullRequestsTool(server: McpServer, callback?: ToolInvocationCallback): import("@modelcontextprotocol/sdk/server/mcp.js").RegisteredTool;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
|
|
2
|
+
import type { ToolInvocationCallback } from '../types.js';
|
|
3
|
+
export declare function registerSearchGitHubReposTool(server: McpServer, callback?: ToolInvocationCallback): import("@modelcontextprotocol/sdk/server/mcp.js").RegisteredTool;
|