octocode-mcp 8.0.0 → 8.1.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.
@@ -1,9 +1,9 @@
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>;
5
- researchGoal: z.ZodOptional<z.ZodString>;
6
- reasoning: z.ZodOptional<z.ZodString>;
4
+ mainResearchGoal: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
7
  } & {
8
8
  keywordsToSearch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
9
9
  topicsToSearch: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -16,11 +16,11 @@ export declare const GitHubReposSearchQuerySchema: z.ZodObject<{
16
16
  sort: z.ZodOptional<z.ZodEnum<["forks", "stars", "updated", "best-match"]>>;
17
17
  limit: z.ZodOptional<z.ZodNumber>;
18
18
  }, "strip", z.ZodTypeAny, {
19
+ mainResearchGoal: string;
20
+ researchGoal: string;
21
+ reasoning: string;
19
22
  created?: string | undefined;
20
23
  updated?: string | undefined;
21
- mainResearchGoal?: string | undefined;
22
- researchGoal?: string | undefined;
23
- reasoning?: string | undefined;
24
24
  owner?: string | undefined;
25
25
  stars?: string | undefined;
26
26
  sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
@@ -30,11 +30,11 @@ export declare const GitHubReposSearchQuerySchema: z.ZodObject<{
30
30
  size?: string | undefined;
31
31
  topicsToSearch?: string[] | undefined;
32
32
  }, {
33
+ mainResearchGoal: string;
34
+ researchGoal: string;
35
+ reasoning: string;
33
36
  created?: string | undefined;
34
37
  updated?: string | undefined;
35
- mainResearchGoal?: string | undefined;
36
- researchGoal?: string | undefined;
37
- reasoning?: string | undefined;
38
38
  owner?: string | undefined;
39
39
  stars?: string | undefined;
40
40
  sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
@@ -46,11 +46,11 @@ export declare const GitHubReposSearchQuerySchema: z.ZodObject<{
46
46
  }>, "many">;
47
47
  }, "strip", z.ZodTypeAny, {
48
48
  queries: {
49
+ mainResearchGoal: string;
50
+ researchGoal: string;
51
+ reasoning: string;
49
52
  created?: string | undefined;
50
53
  updated?: string | undefined;
51
- mainResearchGoal?: string | undefined;
52
- researchGoal?: string | undefined;
53
- reasoning?: string | undefined;
54
54
  owner?: string | undefined;
55
55
  stars?: string | undefined;
56
56
  sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
@@ -62,11 +62,11 @@ export declare const GitHubReposSearchQuerySchema: z.ZodObject<{
62
62
  }[];
63
63
  }, {
64
64
  queries: {
65
+ mainResearchGoal: string;
66
+ researchGoal: string;
67
+ reasoning: string;
65
68
  created?: string | undefined;
66
69
  updated?: string | undefined;
67
- mainResearchGoal?: string | undefined;
68
- researchGoal?: string | undefined;
69
- reasoning?: string | undefined;
70
70
  owner?: string | undefined;
71
71
  stars?: string | undefined;
72
72
  sort?: "updated" | "best-match" | "forks" | "stars" | undefined;
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
2
  export declare const GitHubViewRepoStructureQuerySchema: z.ZodObject<{
3
- mainResearchGoal: z.ZodOptional<z.ZodString>;
4
- researchGoal: z.ZodOptional<z.ZodString>;
5
- reasoning: z.ZodOptional<z.ZodString>;
3
+ mainResearchGoal: z.ZodString;
4
+ researchGoal: z.ZodString;
5
+ reasoning: z.ZodString;
6
6
  } & {
7
7
  owner: z.ZodString;
8
8
  repo: z.ZodString;
@@ -10,29 +10,29 @@ export declare const GitHubViewRepoStructureQuerySchema: z.ZodObject<{
10
10
  path: z.ZodOptional<z.ZodDefault<z.ZodString>>;
11
11
  depth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
12
12
  }, "strip", z.ZodTypeAny, {
13
+ mainResearchGoal: string;
14
+ researchGoal: string;
15
+ reasoning: string;
13
16
  owner: string;
14
17
  repo: string;
15
18
  branch: string;
16
19
  path?: string | undefined;
17
- mainResearchGoal?: string | undefined;
18
- researchGoal?: string | undefined;
19
- reasoning?: string | undefined;
20
20
  depth?: number | undefined;
21
21
  }, {
22
+ mainResearchGoal: string;
23
+ researchGoal: string;
24
+ reasoning: string;
22
25
  owner: string;
23
26
  repo: string;
24
27
  branch: string;
25
28
  path?: string | undefined;
26
- mainResearchGoal?: string | undefined;
27
- researchGoal?: string | undefined;
28
- reasoning?: string | undefined;
29
29
  depth?: number | undefined;
30
30
  }>;
31
31
  export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
32
32
  queries: z.ZodArray<z.ZodObject<{
33
- mainResearchGoal: z.ZodOptional<z.ZodString>;
34
- researchGoal: z.ZodOptional<z.ZodString>;
35
- reasoning: z.ZodOptional<z.ZodString>;
33
+ mainResearchGoal: z.ZodString;
34
+ researchGoal: z.ZodString;
35
+ reasoning: z.ZodString;
36
36
  } & {
37
37
  owner: z.ZodString;
38
38
  repo: z.ZodString;
@@ -40,44 +40,44 @@ export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
40
40
  path: z.ZodOptional<z.ZodDefault<z.ZodString>>;
41
41
  depth: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
42
42
  }, "strip", z.ZodTypeAny, {
43
+ mainResearchGoal: string;
44
+ researchGoal: string;
45
+ reasoning: string;
43
46
  owner: string;
44
47
  repo: string;
45
48
  branch: string;
46
49
  path?: string | undefined;
47
- mainResearchGoal?: string | undefined;
48
- researchGoal?: string | undefined;
49
- reasoning?: string | undefined;
50
50
  depth?: number | undefined;
51
51
  }, {
52
+ mainResearchGoal: string;
53
+ researchGoal: string;
54
+ reasoning: string;
52
55
  owner: string;
53
56
  repo: string;
54
57
  branch: string;
55
58
  path?: string | undefined;
56
- mainResearchGoal?: string | undefined;
57
- researchGoal?: string | undefined;
58
- reasoning?: string | undefined;
59
59
  depth?: number | undefined;
60
60
  }>, "many">;
61
61
  }, "strip", z.ZodTypeAny, {
62
62
  queries: {
63
+ mainResearchGoal: string;
64
+ researchGoal: string;
65
+ reasoning: string;
63
66
  owner: string;
64
67
  repo: string;
65
68
  branch: string;
66
69
  path?: string | undefined;
67
- mainResearchGoal?: string | undefined;
68
- researchGoal?: string | undefined;
69
- reasoning?: string | undefined;
70
70
  depth?: number | undefined;
71
71
  }[];
72
72
  }, {
73
73
  queries: {
74
+ mainResearchGoal: string;
75
+ researchGoal: string;
76
+ reasoning: string;
74
77
  owner: string;
75
78
  repo: string;
76
79
  branch: string;
77
80
  path?: string | undefined;
78
- mainResearchGoal?: string | undefined;
79
- researchGoal?: string | undefined;
80
- reasoning?: string | undefined;
81
81
  depth?: number | undefined;
82
82
  }[];
83
83
  }>;
@@ -52,12 +52,6 @@ export declare function isToolAvailableSync(toolName: string): boolean;
52
52
  export declare function getToolHintsSync(toolName: string, resultType: 'hasResults' | 'empty'): readonly string[];
53
53
  export declare function getGenericErrorHintsSync(): readonly string[];
54
54
  export declare function getDynamicHints(toolName: string, hintType: 'topicsHasResults' | 'topicsEmpty' | 'keywordsEmpty'): readonly string[];
55
- export declare function getBulkOperationsInstructions(): {
56
- base: string;
57
- hasResults: string;
58
- empty: string;
59
- error: string;
60
- };
61
55
  export declare const DESCRIPTIONS: Record<string, string>;
62
56
  export declare const TOOL_HINTS: Record<string, {
63
57
  hasResults: readonly string[];
@@ -181,7 +175,9 @@ export declare const GITHUB_SEARCH_PULL_REQUESTS: {
181
175
  };
182
176
  outputShaping: {
183
177
  withComments: string;
184
- withContent: string;
178
+ withCommits: string;
179
+ type: string;
180
+ partialContentMetadata: string;
185
181
  };
186
182
  };
187
183
  export declare const GITHUB_VIEW_REPO_STRUCTURE: {
@@ -12,10 +12,12 @@ export declare function createSuccessResult<T>(query: {
12
12
  reasoning?: string;
13
13
  }, data: T, hasContent: boolean, _toolName: keyof typeof TOOL_NAMES, customHints?: string[]): ToolSuccessResult<T extends Record<string, unknown> ? T : never> & T;
14
14
  export declare function handleApiError(apiResult: unknown, query: {
15
+ mainResearchGoal?: string;
15
16
  researchGoal?: string;
16
17
  reasoning?: string;
17
18
  }): ToolErrorResult | null;
18
19
  export declare function handleCatchError(error: unknown, query: {
20
+ mainResearchGoal?: string;
19
21
  researchGoal?: string;
20
22
  reasoning?: string;
21
23
  }, contextMessage?: string): ToolErrorResult;
@@ -225,7 +225,13 @@ export interface GitHubPullRequestSearchQuery {
225
225
  order?: 'asc' | 'desc';
226
226
  limit?: number;
227
227
  withComments?: boolean;
228
- withContent?: boolean;
228
+ withCommits?: boolean;
229
+ type?: 'metadata' | 'fullContent' | 'partialContent';
230
+ partialContentMetadata?: {
231
+ file: string;
232
+ additions?: number[];
233
+ deletions?: number[];
234
+ }[];
229
235
  mainResearchGoal?: string;
230
236
  researchGoal?: string;
231
237
  reasoning?: string;
@@ -300,9 +306,23 @@ export interface PullRequestInfo {
300
306
  status: string;
301
307
  additions: number;
302
308
  deletions: number;
303
- changes: number;
309
+ changes?: number;
304
310
  patch?: string;
305
311
  }>;
312
+ commit_details?: Array<{
313
+ sha: string;
314
+ message: string;
315
+ author: string;
316
+ date: string;
317
+ files: Array<{
318
+ filename: string;
319
+ status: string;
320
+ additions: number;
321
+ deletions: number;
322
+ changes?: number;
323
+ patch?: string;
324
+ }>;
325
+ }>;
306
326
  }
307
327
  /** Pull request search result data */
308
328
  export interface PullRequestSearchResultData {
@@ -332,8 +352,7 @@ export interface ProcessedBulkResult<TData = Record<string, unknown>, TQuery = o
332
352
  [key: string]: unknown;
333
353
  }
334
354
  /** Flattened query result for bulk operations */
335
- export interface FlatQueryResult<TQuery = object> {
336
- query: TQuery;
355
+ export interface FlatQueryResult {
337
356
  status: QueryStatus;
338
357
  data: Record<string, unknown>;
339
358
  mainResearchGoal?: string;
@@ -0,0 +1,8 @@
1
+ export interface PatchLine {
2
+ originalLineNumber: number | null;
3
+ newLineNumber: number | null;
4
+ content: string;
5
+ type: 'context' | 'addition' | 'deletion';
6
+ }
7
+ export declare function parsePatch(patch: string): PatchLine[];
8
+ export declare function filterPatch(patch: string, additions?: number[], deletions?: number[]): string;
@@ -21,6 +21,11 @@ export interface FetchWithRetriesOptions {
21
21
  * @default 'GET'
22
22
  */
23
23
  method?: string;
24
+ /**
25
+ * Whether to include the package version as a query parameter
26
+ * @default false
27
+ */
28
+ includeVersion?: boolean;
24
29
  }
25
30
  /**
26
31
  * Fetches a URL with automatic retries and exponential backoff.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "octocode-mcp",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
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",
@@ -27,19 +27,9 @@
27
27
  ],
28
28
  "author": "Guy Bary <bgauryy@octocodeai.com>",
29
29
  "homepage": "https://octocode.ai",
30
- "repository": {
31
- "type": "git",
32
- "url": "git+https://github.com/bgauryy/octocode-mcp.git"
33
- },
30
+ "repository": "bgauryy/octocode-mcp.git",
34
31
  "bugs": "https://github.com/bgauryy/octocode-mcp/issues",
35
32
  "license": "PolyForm-Small-Business-1.0.0",
36
- "mcpName": "io.github.bgauryy/octocode-mcp",
37
- "exports": {
38
- ".": {
39
- "types": "./dist/src/index.d.ts",
40
- "import": "./dist/index.js"
41
- }
42
- },
43
33
  "bin": {
44
34
  "octocode-mcp": "dist/index.js",
45
35
  "octocode-mcp-beta": "dist/index.js"
@@ -54,7 +44,7 @@
54
44
  "dotenv": "^17.2.3",
55
45
  "express": "^5.1.0",
56
46
  "node-cache": "^5.1.2",
57
- "octocode-utils": "latest",
47
+ "octocode-utils": "^6.0.0",
58
48
  "octokit": "^5.0.5",
59
49
  "uuid": "^13.0.0",
60
50
  "zod": "^3.23.8"
@@ -65,11 +55,18 @@
65
55
  "prettier": "^3.5.3",
66
56
  "rollup": "^4.46.2",
67
57
  "rollup-plugin-string": "^3.0.0",
58
+ "typescript": "^5.9.2",
68
59
  "vitest": "^4.0.13"
69
60
  },
70
61
  "engines": {
71
62
  "node": ">=20.0.0"
72
63
  },
64
+ "exports": {
65
+ ".": {
66
+ "types": "./dist/src/index.d.ts",
67
+ "import": "./dist/index.js"
68
+ }
69
+ },
73
70
  "files": [
74
71
  "dist/index.js",
75
72
  "dist/**/*.d.ts",
@@ -78,12 +75,17 @@
78
75
  "LICENSE"
79
76
  ],
80
77
  "main": "dist/index.js",
81
- "types": "dist/src/index.d.ts",
78
+ "mcp": {
79
+ "type": "stdio",
80
+ "command": "octocode-mcp",
81
+ "args": []
82
+ },
83
+ "mcpName": "io.github.bgauryy/octocode-mcp",
82
84
  "scripts": {
83
85
  "build": "yarn lint && yarn clean && tsc -p tsconfig.build.json && rollup -c",
84
86
  "build:dev": "yarn clean && rollup -c",
85
- "clean": "rm -rf dist/",
86
87
  "build:watch": "rollup -c --watch",
88
+ "clean": "rm -rf dist/",
87
89
  "debug": "npx @modelcontextprotocol/inspector node dist/index.js",
88
90
  "dxt:pack": "yarn build && dxt pack . octocode-mcp.dxt",
89
91
  "dxt:release": "yarn build && dxt pack . octocode-mcp.dxt && dxt sign octocode-mcp.dxt --self-signed && dxt verify octocode-mcp.dxt",
@@ -95,15 +97,11 @@
95
97
  "prepack": "yarn build",
96
98
  "prepublishOnly": "yarn lint && yarn test && rollup -c",
97
99
  "test": "vitest run --coverage",
98
- "test:quiet": "vitest run --reporter=dot --silent",
99
100
  "test:coverage": "vitest run --coverage",
101
+ "test:quiet": "vitest run --reporter=dot --silent",
100
102
  "test:ui": "vitest --ui",
101
103
  "test:watch": "vitest --watch"
102
104
  },
103
105
  "type": "module",
104
- "mcp": {
105
- "type": "stdio",
106
- "command": "octocode-mcp",
107
- "args": []
108
- }
106
+ "types": "dist/src/index.d.ts"
109
107
  }
@@ -1 +0,0 @@
1
- export {};