@octocodeai/octocode-tools-core 18.1.2 → 18.2.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/README.md +113 -162
- package/dist/cacheMaintenance.d.ts +8 -0
- package/dist/direct.js +41 -51
- package/dist/github/client.d.ts +1 -1
- package/dist/github/codeSearch.d.ts +2 -2
- package/dist/github/commit.d.ts +48 -0
- package/dist/github/compare.d.ts +2 -2
- package/dist/github/directoryFetch/fetchDirectoryContents.d.ts +1 -1
- package/dist/github/directoryFetch/fetchFileContentToDisk.d.ts +1 -1
- package/dist/github/directoryFetch/refResolution.d.ts +6 -0
- package/dist/github/fileContent.d.ts +1 -1
- package/dist/github/fileContentRaw/fetch.d.ts +2 -2
- package/dist/github/githubAPI.d.ts +1 -2
- package/dist/github/history/commitFiles.d.ts +5 -0
- package/dist/github/history.d.ts +1 -1
- package/dist/github/issues/fetchers.d.ts +1 -1
- package/dist/github/issues/orchestrator.d.ts +1 -1
- package/dist/github/issues/types.d.ts +5 -0
- package/dist/github/prByNumber.d.ts +1 -1
- package/dist/github/prContentFetcher/commits.d.ts +1 -1
- package/dist/github/prContentFetcher/transform.d.ts +1 -1
- package/dist/github/pullRequestSearch.d.ts +1 -1
- package/dist/github/queryBuilders/codeAndRepo.d.ts +1 -1
- package/dist/github/repoSearch.d.ts +2 -2
- package/dist/github/repoStructure/contentResolution.d.ts +1 -1
- package/dist/github/repoStructure/fetchOrchestration.d.ts +2 -2
- package/dist/github/repoStructurePagination.d.ts +1 -1
- package/dist/graph/advancedOperations.d.ts +22 -0
- package/dist/{tools/local_dead_code/graphBuilder.d.ts → graph/buildFileGraph.d.ts} +6 -5
- package/dist/graph/cycleOperations.d.ts +12 -0
- package/dist/{tools/local_dead_code → graph}/importResolver.d.ts +1 -1
- package/dist/graph/operations.d.ts +7 -0
- package/dist/{tools/local_dead_code → graph}/reachability.d.ts +1 -1
- package/dist/{tools/local_dead_code → graph}/types.d.ts +11 -0
- package/dist/graph/workspacePackageResolver.d.ts +2 -0
- package/dist/index.d.ts +11 -30
- package/dist/index.js +45 -55
- package/dist/providers/github/githubContent.d.ts +1 -1
- package/dist/providers/github/githubPullRequests.d.ts +1 -1
- package/dist/providers/github/githubSearch.d.ts +1 -1
- package/dist/providers/github/githubStructure.d.ts +1 -1
- package/dist/providers/github/paginationMetadata.d.ts +4 -5
- package/dist/providers/providerQueries.d.ts +1 -3
- package/dist/providers/providerResults.d.ts +4 -0
- package/dist/providers/types.d.ts +1 -1
- package/dist/responses.d.ts +1 -1
- package/dist/schema.d.ts +2 -0
- package/dist/schema.js +13 -1
- package/dist/scheme/conditionalSchemas.d.ts +12 -0
- package/dist/scheme/fields.d.ts +2 -1
- package/dist/security/bridge.d.ts +7 -10
- package/dist/shared/credentials/index.js +2 -2
- package/dist/shared/paths.d.ts +1 -0
- package/dist/shared/paths.js +1 -1
- package/dist/shared/session/index.js +1 -1
- package/dist/toolContract/descriptions.d.ts +14 -0
- package/dist/toolContract/input/resources/global.d.ts +15 -0
- package/dist/toolContract/input/resources/toolRelations.d.ts +1 -0
- package/dist/toolContract/input/resources/toolVariants.d.ts +9 -0
- package/dist/toolContract/input/resources/tools/_toolkit.d.ts +75 -0
- package/dist/toolContract/input/resources/tools/ghCloneRepo.d.ts +12 -0
- package/dist/toolContract/input/resources/tools/ghGetFileContent.d.ts +30 -0
- package/dist/toolContract/input/resources/tools/ghSearch.d.ts +76 -0
- package/dist/toolContract/input/resources/tools/githubCodeOperation.d.ts +29 -0
- package/dist/toolContract/input/resources/tools/githubHistorySchema.d.ts +114 -0
- package/dist/toolContract/input/resources/tools/githubRepositoriesOperation.d.ts +54 -0
- package/dist/toolContract/input/resources/tools/githubTreeOperation.d.ts +26 -0
- package/dist/toolContract/input/resources/tools/historyCommitInput.d.ts +21 -0
- package/dist/toolContract/input/resources/tools/historyIssueInput.d.ts +59 -0
- package/dist/toolContract/input/resources/tools/historyPullRequestInput.d.ts +98 -0
- package/dist/toolContract/input/resources/tools/localAnalyzeGraph.d.ts +75 -0
- package/dist/toolContract/input/resources/tools/localFilesOperation.d.ts +70 -0
- package/dist/toolContract/input/resources/tools/localGetFileContent.d.ts +22 -0
- package/dist/toolContract/input/resources/tools/localSearch.d.ts +258 -0
- package/dist/toolContract/input/resources/tools/localTextOperation.d.ts +113 -0
- package/dist/toolContract/input/resources/tools/localTreeOperation.d.ts +44 -0
- package/dist/toolContract/input/resources/tools/lspGetSemantics.d.ts +37 -0
- package/dist/toolContract/input/resources/tools/npmSearch.d.ts +10 -0
- package/dist/toolContract/input/types/index.d.ts +24 -0
- package/dist/toolContract/metadata.d.ts +11 -0
- package/dist/toolContract/runtime.d.ts +11 -0
- package/dist/toolContract/schemas.d.ts +31 -0
- package/dist/toolContract/types.d.ts +11 -0
- package/dist/tools/directToolCatalog/toolCatalogDefinitions.d.ts +6 -16
- package/dist/tools/directToolCatalog/toolCatalogFormatters.d.ts +1 -1
- package/dist/tools/directToolCatalog/toolCommandPatternUnifiedSearchQueries.d.ts +6 -0
- package/dist/tools/directToolCatalog/toolInputPreparation.d.ts +2 -2
- package/dist/tools/directToolCatalog/toolSchemaIntrospection.d.ts +10 -0
- package/dist/tools/directToolCatalog/toolSchemaRelations.d.ts +9 -0
- package/dist/tools/directToolCatalog/toolSpecifications.d.ts +13 -0
- package/dist/tools/directToolCatalog.exec.d.ts +1 -1
- package/dist/tools/directToolCatalog.meta.d.ts +1 -0
- package/dist/tools/executionGuard.d.ts +1 -2
- package/dist/tools/github_clone_repo/cache.d.ts +1 -2
- package/dist/tools/github_clone_repo/cacheArtifacts.d.ts +3 -0
- package/dist/tools/github_clone_repo/cachePaths.d.ts +1 -1
- package/dist/tools/github_clone_repo/cloneRepo.d.ts +1 -1
- package/dist/tools/github_clone_repo/execution.d.ts +1 -1
- package/dist/tools/github_clone_repo/scheme.d.ts +24 -24
- package/dist/tools/github_fetch_content/execution.d.ts +1 -1
- package/dist/tools/github_fetch_content/finalizer/types.d.ts +19 -16
- package/dist/tools/github_fetch_content/scheme.d.ts +19 -16
- package/dist/tools/github_fetch_content/types.d.ts +4 -3
- package/dist/tools/github_search/execution.d.ts +4 -0
- package/dist/tools/github_search/finalizer.d.ts +3 -0
- package/dist/tools/github_search/scheme.d.ts +79 -0
- package/dist/tools/github_search_code/execution.d.ts +4 -2
- package/dist/tools/github_search_code/finalizer/groups.d.ts +3 -3
- package/dist/tools/github_search_code/finalizer/ranking.d.ts +1 -2
- package/dist/tools/github_search_code/scheme.d.ts +10 -16
- package/dist/tools/github_search_pull_requests/contentRequest.d.ts +1 -4
- package/dist/tools/github_search_pull_requests/contentResponse/commentsShaping.d.ts +8 -4
- package/dist/tools/github_search_pull_requests/contentResponse/fileSurfaces.d.ts +13 -10
- package/dist/tools/github_search_pull_requests/contentResponse/nextCalls.d.ts +3 -2
- package/dist/tools/github_search_pull_requests/contentResponse/pagination.d.ts +10 -3
- package/dist/tools/github_search_pull_requests/execution/commitsMode.d.ts +2 -2
- package/dist/tools/github_search_pull_requests/execution/issuesMode.d.ts +2 -2
- package/dist/tools/github_search_pull_requests/execution/pullRequestsMode.d.ts +1 -1
- package/dist/tools/github_search_pull_requests/execution.d.ts +1 -1
- package/dist/tools/github_search_pull_requests/historyContinuations.d.ts +15 -0
- package/dist/tools/github_search_pull_requests/historyExecutions.d.ts +6 -0
- package/dist/tools/github_search_pull_requests/historyPartialContinuations.d.ts +5 -0
- package/dist/tools/github_search_pull_requests/historySchemes.d.ts +58 -0
- package/dist/tools/github_search_pull_requests/historySearchPagination.d.ts +3 -0
- package/dist/tools/github_search_pull_requests/scheme.d.ts +14 -30
- package/dist/tools/github_search_pull_requests/splitExecutions.d.ts +1 -2
- package/dist/tools/github_search_pull_requests/splitSchemes.d.ts +197 -181
- package/dist/tools/github_search_repos/execution/pagination.d.ts +4 -4
- package/dist/tools/github_search_repos/execution/queryVariants.d.ts +3 -1
- package/dist/tools/github_search_repos/execution.d.ts +3 -1
- package/dist/tools/github_search_repos/scheme.d.ts +5 -7
- package/dist/tools/github_view_repo_structure/execution.d.ts +4 -2
- package/dist/tools/github_view_repo_structure/scheme.d.ts +2 -4
- package/dist/tools/github_view_repo_structure/types.d.ts +3 -0
- package/dist/tools/local_analyze_graph/analysisTypes.d.ts +46 -0
- package/dist/tools/local_analyze_graph/analyzeGraph.d.ts +3 -0
- package/dist/tools/{local_dead_code → local_analyze_graph}/deadCodeScan.d.ts +2 -1
- package/dist/tools/{local_dead_code → local_analyze_graph}/entrypoints.d.ts +1 -0
- package/dist/tools/local_analyze_graph/execution.d.ts +4 -0
- package/dist/tools/local_analyze_graph/pagination.d.ts +3 -0
- package/dist/tools/{local_dead_code → local_analyze_graph}/retention.d.ts +1 -1
- package/dist/tools/{local_dead_code → local_analyze_graph}/scheme.d.ts +31 -15
- package/dist/tools/local_fetch_content/execution.d.ts +1 -1
- package/dist/tools/local_fetch_content/scheme.d.ts +2 -4
- package/dist/tools/local_find_files/execution.d.ts +1 -1
- package/dist/tools/local_find_files/findFiles.d.ts +1 -1
- package/dist/tools/local_find_files/findFilesNext.d.ts +3 -3
- package/dist/tools/local_find_files/scheme.d.ts +6 -2
- package/dist/tools/local_ripgrep/captureBudget.d.ts +1 -0
- package/dist/tools/local_ripgrep/execution.d.ts +1 -1
- package/dist/tools/local_ripgrep/rankingProfile/rankingLexical.d.ts +20 -0
- package/dist/tools/local_ripgrep/rankingProfile/rankingResults.d.ts +1 -18
- package/dist/tools/local_ripgrep/rankingProfile.d.ts +5 -4
- package/dist/tools/local_ripgrep/ripgrepResultBuilder/searchNext.d.ts +4 -1
- package/dist/tools/local_ripgrep/scheme.d.ts +9 -7
- package/dist/tools/local_ripgrep/structuralSearch.d.ts +1 -1
- package/dist/tools/local_search/execution.d.ts +5 -0
- package/dist/tools/local_search/scheme.d.ts +260 -0
- package/dist/tools/local_view_structure/execution.d.ts +1 -1
- package/dist/tools/local_view_structure/scheme.d.ts +8 -5
- package/dist/tools/local_view_structure/viewStructureNext.d.ts +3 -3
- package/dist/tools/lsp/semantic_content/execution.d.ts +1 -1
- package/dist/tools/lsp/semantic_content/scheme.d.ts +4 -42
- package/dist/tools/lsp/semantic_content/semanticEnvelopes/envelopeHelpers.d.ts +1 -1
- package/dist/tools/lsp/semantic_content/semanticFileOps/anchor.d.ts +1 -1
- package/dist/tools/lsp/semantic_content/semanticPresentation.d.ts +0 -1
- package/dist/tools/lsp/shared/semanticTypes.d.ts +6 -3
- package/dist/tools/package_search/execution.d.ts +6 -13
- package/dist/tools/package_search/pagination.d.ts +21 -0
- package/dist/tools/package_search/queryHelpers.d.ts +3 -5
- package/dist/tools/package_search/scheme.d.ts +12 -7
- package/dist/tools/providerExecution.d.ts +3 -4
- package/dist/tools/providerMappers/codeSearch.d.ts +3 -4
- package/dist/tools/providerMappers/fileContent.d.ts +1 -2
- package/dist/tools/providerMappers/pullRequests.d.ts +6 -6
- package/dist/tools/providerMappers/repoSearch.d.ts +7 -4
- package/dist/tools/providerMappers/repoStructure.d.ts +2 -3
- package/dist/tools/toolCatalogFactory.d.ts +5 -6
- package/dist/tools/toolConfig.d.ts +6 -17
- package/dist/tools/toolMetadata/baseSchema.d.ts +1 -2
- package/dist/tools/toolMetadata/descriptions.d.ts +1 -1
- package/dist/tools/toolMetadata/names.d.ts +18 -2
- package/dist/tools/toolMetadata/state.d.ts +3 -3
- package/dist/tools/toolMetadata/types.d.ts +1 -1
- package/dist/tools/toolNames.d.ts +16 -3
- package/dist/tools/toolSchemaImports.d.ts +5 -4
- package/dist/tools/utils.d.ts +3 -6
- package/dist/types/bulk.d.ts +11 -1
- package/dist/types/execution.d.ts +6 -1
- package/dist/types/server.d.ts +0 -2
- package/dist/types/toolOutput.d.ts +10 -9
- package/dist/types/toolResults.d.ts +17 -1
- package/dist/utils/contextUtils.d.ts +4 -2
- package/dist/utils/file/toolHelpers.d.ts +1 -1
- package/dist/utils/http/cache/conditional.d.ts +9 -4
- package/dist/utils/http/cache/dataCache.d.ts +7 -2
- package/dist/utils/http/cache/diskStore.d.ts +30 -0
- package/dist/utils/http/cache/management.d.ts +5 -0
- package/dist/utils/http/cache/store.d.ts +1 -0
- package/dist/utils/http/cache/trace.d.ts +10 -0
- package/dist/utils/http/cache.d.ts +1 -0
- package/dist/utils/package/types.d.ts +5 -2
- package/dist/utils/pagination/charLimit.d.ts +0 -2
- package/dist/utils/response/bulk/pagination.d.ts +2 -1
- package/dist/utils/response/bulk/paginationDiagnostics.d.ts +2 -0
- package/dist/utils/response/bulk/queries.d.ts +0 -9
- package/dist/utils/response/bulk/response.d.ts +3 -2
- package/dist/utils/response/bulk.d.ts +1 -1
- package/dist/utils/response/callToolResult.d.ts +1 -1
- package/dist/utils/response/error.d.ts +3 -4
- package/dist/utils/response/groupedFinalizer.d.ts +2 -6
- package/dist/utils/response/normalizedError.d.ts +6 -0
- package/dist/utils/response/responseChannels.d.ts +4 -0
- package/package.json +7 -6
- package/dist/github/discussions.d.ts +0 -45
- package/dist/github/releases.d.ts +0 -45
- package/dist/scheme/responseEnvelope.d.ts +0 -88
- package/dist/tools/github_search_discussions/execution.d.ts +0 -15
- package/dist/tools/github_search_discussions/scheme.d.ts +0 -16
- package/dist/tools/github_search_pull_requests/execution/releasesMode.d.ts +0 -4
- package/dist/tools/local_dead_code/execution.d.ts +0 -4
- package/dist/tools/local_dead_code/local_dead_code.d.ts +0 -5
- package/dist/tools/local_find_files/pathPatternBraces.d.ts +0 -20
- package/dist/tools/toolMetadata/gateway.d.ts +0 -7
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GitHubSearchQuerySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
path: z.ZodOptional<z.ZodString>;
|
|
4
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
5
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
6
|
+
language: z.ZodOptional<z.ZodString>;
|
|
7
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
8
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
9
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
|
+
extension: z.ZodOptional<z.ZodString>;
|
|
11
|
+
filename: z.ZodOptional<z.ZodString>;
|
|
12
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
13
|
+
concise: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
match: z.ZodDefault<z.ZodEnum<{
|
|
15
|
+
file: "file";
|
|
16
|
+
path: "path";
|
|
17
|
+
}>>;
|
|
18
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
operation: z.ZodLiteral<"code">;
|
|
20
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
21
|
+
sort: z.ZodDefault<z.ZodEnum<{
|
|
22
|
+
updated: "updated";
|
|
23
|
+
"best-match": "best-match";
|
|
24
|
+
stars: "stars";
|
|
25
|
+
forks: "forks";
|
|
26
|
+
"help-wanted-issues": "help-wanted-issues";
|
|
27
|
+
}>>;
|
|
28
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
29
|
+
language: z.ZodOptional<z.ZodString>;
|
|
30
|
+
created: z.ZodOptional<z.ZodString>;
|
|
31
|
+
updated: z.ZodOptional<z.ZodString>;
|
|
32
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
33
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
34
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
36
|
+
concise: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
stars: z.ZodOptional<z.ZodString>;
|
|
38
|
+
forks: z.ZodOptional<z.ZodString>;
|
|
39
|
+
goodFirstIssues: z.ZodOptional<z.ZodString>;
|
|
40
|
+
size: z.ZodOptional<z.ZodString>;
|
|
41
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
43
|
+
public: "public";
|
|
44
|
+
private: "private";
|
|
45
|
+
}>>;
|
|
46
|
+
license: z.ZodOptional<z.ZodString>;
|
|
47
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
49
|
+
match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
50
|
+
name: "name";
|
|
51
|
+
description: "description";
|
|
52
|
+
readme: "readme";
|
|
53
|
+
}>>>;
|
|
54
|
+
operation: z.ZodLiteral<"repositories">;
|
|
55
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
56
|
+
path: z.ZodOptional<z.ZodString>;
|
|
57
|
+
owner: z.ZodString;
|
|
58
|
+
repo: z.ZodString;
|
|
59
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
60
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
61
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
62
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
63
|
+
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
include: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
65
|
+
sizes: "sizes";
|
|
66
|
+
languages: "languages";
|
|
67
|
+
contributors: "contributors";
|
|
68
|
+
branches: "branches";
|
|
69
|
+
tags: "tags";
|
|
70
|
+
}>>>;
|
|
71
|
+
operation: z.ZodLiteral<"tree">;
|
|
72
|
+
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
73
|
+
}, z.core.$strict>], "operation">;
|
|
74
|
+
export type GitHubSearchQuery = z.infer<typeof GitHubSearchQuerySchema>;
|
|
75
|
+
export declare const GitHubSearchBulkQuerySchema: z.ZodObject<{
|
|
76
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
77
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
78
|
+
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
79
|
+
}, z.core.$strict>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
2
2
|
import type { z } from 'zod';
|
|
3
|
-
import type { GitHubCodeSearchQuerySchema } from '
|
|
3
|
+
import type { GitHubCodeSearchQuerySchema } from '../../toolContract/schemas.js';
|
|
4
4
|
type GitHubCodeSearchQuery = z.infer<typeof GitHubCodeSearchQuerySchema>;
|
|
5
5
|
import type { ToolExecutionArgs, WithOptionalMeta } from '../../types/execution.js';
|
|
6
|
+
import type { ProcessedBulkResult } from '../../types/toolResults.js';
|
|
6
7
|
type PartialCodeSearchQuery = WithOptionalMeta<GitHubCodeSearchQuery>;
|
|
7
8
|
export declare function hasValidCodeSearchParams(query: PartialCodeSearchQuery): boolean;
|
|
8
9
|
export type RepoState = {
|
|
@@ -13,5 +14,6 @@ export type RepoState = {
|
|
|
13
14
|
kind: 'renamed';
|
|
14
15
|
fullName: string;
|
|
15
16
|
};
|
|
17
|
+
export declare function searchGitHubCode(query: PartialCodeSearchQuery, args: ToolExecutionArgs<PartialCodeSearchQuery>, getProviderContext?: () => import("../providerExecution.js").ProviderExecutionContext): Promise<ProcessedBulkResult>;
|
|
16
18
|
export declare function searchMultipleGitHubCode(args: ToolExecutionArgs<PartialCodeSearchQuery>): Promise<CallToolResult>;
|
|
17
19
|
export {};
|
|
@@ -2,7 +2,7 @@ import { type QueryWithPagination } from '../../../utils/response/groupedFinaliz
|
|
|
2
2
|
import type { ToolContinuation } from '../../../scheme/pagination.js';
|
|
3
3
|
import { type CodeSearchGroupedMatch, type CodeSearchGroupedResult, type CodeSearchPagination } from '../../providerMappers.js';
|
|
4
4
|
export type PerQueryGroups = {
|
|
5
|
-
|
|
5
|
+
index: number;
|
|
6
6
|
groups: CodeSearchGroupedResult[];
|
|
7
7
|
};
|
|
8
8
|
export type CodeSearchFileResult = {
|
|
@@ -12,12 +12,12 @@ export type CodeSearchFileResult = {
|
|
|
12
12
|
matches: Array<Omit<CodeSearchGroupedMatch, 'path'>>;
|
|
13
13
|
};
|
|
14
14
|
export type CodeSearchResultRecord = {
|
|
15
|
-
|
|
15
|
+
index: number;
|
|
16
16
|
data: {
|
|
17
17
|
files: CodeSearchFileResult[];
|
|
18
18
|
pagination?: CodeSearchPagination;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
21
|
export declare function mergeGroups(perQuery: readonly PerQueryGroups[]): CodeSearchGroupedResult[];
|
|
22
|
-
export declare function buildResultRecords(queries: readonly QueryWithPagination[], groups: readonly CodeSearchGroupedResult[], paginationByQuery: ReadonlyMap<
|
|
22
|
+
export declare function buildResultRecords(queries: readonly QueryWithPagination[], groups: readonly CodeSearchGroupedResult[], paginationByQuery: ReadonlyMap<number, CodeSearchPagination>): CodeSearchResultRecord[];
|
|
23
23
|
export declare function buildNextMap(resultRecords: readonly CodeSearchResultRecord[], queries: readonly QueryWithPagination[], allKeywords: readonly string[]): Record<string, ToolContinuation> | undefined;
|
|
@@ -2,9 +2,8 @@ import type { FlatQueryResult } from '../../../types/toolResults.js';
|
|
|
2
2
|
import { type QueryWithPagination } from '../../../utils/response/groupedFinalizer.js';
|
|
3
3
|
import type { RepoState } from '../execution.js';
|
|
4
4
|
import { type CodeSearchFlatResult, type CodeSearchGroupedResult } from '../../providerMappers.js';
|
|
5
|
-
export declare function queryById(queries: readonly QueryWithPagination[]): ReadonlyMap<string, QueryWithPagination>;
|
|
6
5
|
export declare function hasScopedGitHubQuery(emptyQueries: readonly {
|
|
7
|
-
|
|
6
|
+
index: number;
|
|
8
7
|
}[], queries: readonly QueryWithPagination[]): boolean;
|
|
9
8
|
export declare function readPerQueryFlat(result: FlatQueryResult): CodeSearchFlatResult & {
|
|
10
9
|
repoState?: RepoState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type { ItemPagination } from '../../scheme/pagination.js';
|
|
2
|
+
import type { ItemPagination, ToolContinuation } from '../../scheme/pagination.js';
|
|
3
3
|
import type { BulkToolOutput } from '../../types/toolOutput.js';
|
|
4
4
|
export declare const GitHubCodeSearchQueryLocalSchema: z.ZodObject<{
|
|
5
5
|
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -16,16 +16,14 @@ export declare const GitHubCodeSearchQueryLocalSchema: z.ZodObject<{
|
|
|
16
16
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
17
17
|
page: z.ZodDefault<z.ZodNumber>;
|
|
18
18
|
concise: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
-
|
|
20
|
-
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
21
|
-
researchGoal: z.ZodOptional<z.ZodString>;
|
|
19
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
22
20
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
23
21
|
}, z.core.$strip>;
|
|
24
22
|
export declare const GitHubCodeSearchBulkQueryLocalSchema: z.ZodObject<{
|
|
25
23
|
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
26
24
|
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
27
25
|
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
28
|
-
}, z.core.$
|
|
26
|
+
}, z.core.$strict>;
|
|
29
27
|
export interface CodeSearchPaginationLocal extends ItemPagination {
|
|
30
28
|
totalMatchesKind?: 'exact' | 'reported' | 'lowerBound';
|
|
31
29
|
totalMatchesCapped?: boolean;
|
|
@@ -44,22 +42,18 @@ export interface GitHubCodeSearchFile {
|
|
|
44
42
|
owner: string;
|
|
45
43
|
repo: string;
|
|
46
44
|
path: string;
|
|
47
|
-
|
|
45
|
+
queryIndex?: number;
|
|
48
46
|
matches: GitHubCodeSearchFileMatch[];
|
|
49
47
|
}
|
|
50
48
|
export interface GitHubCodeSearchData {
|
|
51
49
|
files: Array<string | GitHubCodeSearchFile>;
|
|
52
50
|
pagination?: CodeSearchPaginationLocal;
|
|
51
|
+
nonExistentScope?: true;
|
|
52
|
+
incompleteResults?: true;
|
|
53
|
+
next?: Record<string, ToolContinuation>;
|
|
53
54
|
}
|
|
54
|
-
export type GitHubCodeSearchOutputLocal = BulkToolOutput<GitHubCodeSearchData
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
nonExistentScope?: true;
|
|
58
|
-
incompleteResults?: true;
|
|
59
|
-
}>;
|
|
60
|
-
errors?: Array<{
|
|
61
|
-
id: string;
|
|
62
|
-
error: string;
|
|
63
|
-
}>;
|
|
55
|
+
export type GitHubCodeSearchOutputLocal = BulkToolOutput<GitHubCodeSearchData | {
|
|
56
|
+
error: string;
|
|
57
|
+
}> & {
|
|
64
58
|
[key: string]: unknown;
|
|
65
59
|
};
|
|
@@ -7,7 +7,7 @@ export type PrContentSelector = {
|
|
|
7
7
|
body?: boolean;
|
|
8
8
|
changedFiles?: boolean;
|
|
9
9
|
patches?: {
|
|
10
|
-
mode
|
|
10
|
+
mode: 'selected' | 'all';
|
|
11
11
|
files?: string[];
|
|
12
12
|
ranges?: PartialContentRange[];
|
|
13
13
|
};
|
|
@@ -19,13 +19,11 @@ export type PrContentSelector = {
|
|
|
19
19
|
};
|
|
20
20
|
reviews?: boolean;
|
|
21
21
|
commits?: {
|
|
22
|
-
list?: boolean;
|
|
23
22
|
includeFiles?: boolean;
|
|
24
23
|
};
|
|
25
24
|
};
|
|
26
25
|
export type PullRequestContentQuery = {
|
|
27
26
|
content?: PrContentSelector;
|
|
28
|
-
reviewMode?: 'full';
|
|
29
27
|
};
|
|
30
28
|
export type NormalizedPrContentRequest = {
|
|
31
29
|
body: boolean;
|
|
@@ -46,7 +44,6 @@ export type NormalizedPrContentRequest = {
|
|
|
46
44
|
list: boolean;
|
|
47
45
|
includeFiles: boolean;
|
|
48
46
|
};
|
|
49
|
-
reviewMode?: 'full';
|
|
50
47
|
};
|
|
51
48
|
export declare function normalizePullRequestContentRequest(query: PullRequestContentQuery): NormalizedPrContentRequest;
|
|
52
49
|
export declare function hasExpensiveContentRequest(request: NormalizedPrContentRequest): boolean;
|
|
@@ -2,7 +2,7 @@ import type { NormalizedPrContentRequest } from '../contentRequest.js';
|
|
|
2
2
|
import { type QueryLike } from './pagination.js';
|
|
3
3
|
export declare function shapeComments(pr: Record<string, unknown>, query: QueryLike, request: NormalizedPrContentRequest): {
|
|
4
4
|
comments?: undefined;
|
|
5
|
-
|
|
5
|
+
contentPagination?: undefined;
|
|
6
6
|
} | {
|
|
7
7
|
comments: ({
|
|
8
8
|
createdAt: unknown;
|
|
@@ -32,7 +32,9 @@ export declare function shapeComments(pr: Record<string, unknown>, query: QueryL
|
|
|
32
32
|
path: unknown;
|
|
33
33
|
line: unknown;
|
|
34
34
|
})[];
|
|
35
|
-
|
|
35
|
+
contentPagination: {
|
|
36
|
+
comments: import("./pagination.js").Pagination;
|
|
37
|
+
};
|
|
36
38
|
};
|
|
37
39
|
export declare function shapeReviews(pr: Record<string, unknown>, query: QueryLike, request: NormalizedPrContentRequest): {
|
|
38
40
|
reviews?: undefined;
|
|
@@ -55,7 +57,7 @@ export declare function shapeReviews(pr: Record<string, unknown>, query: QueryLi
|
|
|
55
57
|
};
|
|
56
58
|
export declare function shapeCommits(pr: Record<string, unknown>, query: QueryLike, request: NormalizedPrContentRequest): {
|
|
57
59
|
commits?: undefined;
|
|
58
|
-
|
|
60
|
+
contentPagination?: undefined;
|
|
59
61
|
} | {
|
|
60
62
|
commits: {
|
|
61
63
|
files?: any[];
|
|
@@ -64,5 +66,7 @@ export declare function shapeCommits(pr: Record<string, unknown>, query: QueryLi
|
|
|
64
66
|
author: unknown;
|
|
65
67
|
date: unknown;
|
|
66
68
|
}[];
|
|
67
|
-
|
|
69
|
+
contentPagination: {
|
|
70
|
+
commits: import("./pagination.js").Pagination;
|
|
71
|
+
};
|
|
68
72
|
};
|
|
@@ -16,22 +16,25 @@ export declare function shapeFileSurfaces(pr: Record<string, unknown>, query: Qu
|
|
|
16
16
|
additions: number;
|
|
17
17
|
deletions: number;
|
|
18
18
|
}[];
|
|
19
|
-
|
|
19
|
+
contentPagination: {
|
|
20
|
+
changedFiles: import("./pagination.js").Pagination;
|
|
21
|
+
filePaths?: undefined;
|
|
22
|
+
};
|
|
20
23
|
filePathsPreview?: undefined;
|
|
21
|
-
filePathsPagination?: undefined;
|
|
22
24
|
} | {
|
|
23
25
|
changedFiles?: undefined;
|
|
24
|
-
|
|
26
|
+
contentPagination?: undefined;
|
|
25
27
|
filePathsPreview?: undefined;
|
|
26
|
-
filePathsPagination?: undefined;
|
|
27
28
|
} | {
|
|
28
29
|
filePathsPreview: string[];
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
contentPagination: {
|
|
31
|
+
filePaths: {
|
|
32
|
+
nextFilePage?: number;
|
|
33
|
+
totalFiles: number;
|
|
34
|
+
filesPerPage: number;
|
|
35
|
+
hasMore: boolean;
|
|
36
|
+
};
|
|
37
|
+
changedFiles?: undefined;
|
|
34
38
|
};
|
|
35
39
|
changedFiles?: undefined;
|
|
36
|
-
filePagination?: undefined;
|
|
37
40
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NormalizedPrContentRequest } from '../contentRequest.js';
|
|
2
2
|
import { type QueryLike } from './pagination.js';
|
|
3
3
|
export declare function nextCalls(query: QueryLike, prNumber: number, request: NormalizedPrContentRequest, firstChangedFilePath?: string): {
|
|
4
|
-
fullReview
|
|
4
|
+
fullReview: Record<string, unknown>;
|
|
5
5
|
getCommits?: Record<string, unknown>;
|
|
6
6
|
getReviews?: Record<string, unknown>;
|
|
7
7
|
getComments?: Record<string, unknown>;
|
|
@@ -10,8 +10,9 @@ export declare function nextCalls(query: QueryLike, prNumber: number, request: N
|
|
|
10
10
|
getChangedFiles?: Record<string, unknown>;
|
|
11
11
|
getBody?: Record<string, unknown>;
|
|
12
12
|
target: {
|
|
13
|
+
operation: string;
|
|
13
14
|
owner: string;
|
|
14
15
|
repo: string;
|
|
15
|
-
|
|
16
|
+
number: number;
|
|
16
17
|
};
|
|
17
18
|
};
|
|
@@ -6,11 +6,13 @@ export type QueryLike = {
|
|
|
6
6
|
filePage?: number;
|
|
7
7
|
commentPage?: number;
|
|
8
8
|
commitPage?: number;
|
|
9
|
-
|
|
9
|
+
pageSize?: number;
|
|
10
10
|
charOffset?: number;
|
|
11
11
|
commentBodyOffset?: number;
|
|
12
12
|
charLength?: number;
|
|
13
13
|
matchString?: string;
|
|
14
|
+
content?: Record<string, unknown>;
|
|
15
|
+
type?: string;
|
|
14
16
|
};
|
|
15
17
|
export declare function matchStringNeedle(query: QueryLike): string | undefined;
|
|
16
18
|
export declare function containsNeedle(value: unknown, needle: string): boolean;
|
|
@@ -21,6 +23,11 @@ export type Pagination = {
|
|
|
21
23
|
totalItems: number;
|
|
22
24
|
hasMore: boolean;
|
|
23
25
|
nextPage?: number;
|
|
26
|
+
terminalLimit?: boolean;
|
|
27
|
+
continuationUnavailable?: {
|
|
28
|
+
reason: 'schemaPageLimit';
|
|
29
|
+
maxPage: number;
|
|
30
|
+
};
|
|
24
31
|
};
|
|
25
32
|
export type TextPagination = {
|
|
26
33
|
charOffset: number;
|
|
@@ -50,11 +57,11 @@ export declare function paginateText(value: string | undefined, charOffset?: num
|
|
|
50
57
|
};
|
|
51
58
|
export declare function compactBody(value: unknown, max?: number): string | undefined;
|
|
52
59
|
export declare function baseQuery(query: QueryLike, prNumber: number): {
|
|
60
|
+
operation: string;
|
|
53
61
|
owner: string;
|
|
54
62
|
repo: string;
|
|
55
|
-
|
|
63
|
+
number: number;
|
|
56
64
|
};
|
|
57
|
-
export declare function compactQuery(value: Record<string, unknown>): Record<string, unknown>;
|
|
58
65
|
export declare function continuationQuery(query: QueryLike, prNumber: number, patch: Record<string, unknown>): Record<string, unknown>;
|
|
59
66
|
export declare function textContinuationQuery(query: QueryLike, prNumber: number, content: Record<string, unknown>, pagination: TextPagination, extra?: Record<string, unknown>): Record<string, unknown> | undefined;
|
|
60
67
|
export declare function pageContinuationQuery(query: QueryLike, prNumber: number, content: Record<string, unknown>, pageKey: 'filePage' | 'commentPage' | 'commitPage', pagination: Pagination): Record<string, unknown> | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AuthInfo } from '@modelcontextprotocol/
|
|
1
|
+
import type { AuthInfo } from '@modelcontextprotocol/server';
|
|
2
2
|
import type { ProcessedBulkResult } from '../../../types/toolResults.js';
|
|
3
3
|
import type { GitHubPullRequestSearchInput, GitHubPullRequestSearchQuery } from './types.js';
|
|
4
|
-
export declare function handleCommitsMode(query: GitHubPullRequestSearchInput, parsedData: GitHubPullRequestSearchQuery | undefined, authInfo: AuthInfo | undefined): Promise<ProcessedBulkResult>;
|
|
4
|
+
export declare function handleCommitsMode(query: GitHubPullRequestSearchInput, parsedData: GitHubPullRequestSearchQuery | undefined, authInfo: AuthInfo | undefined, toolName?: string): Promise<ProcessedBulkResult>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AuthInfo } from '@modelcontextprotocol/
|
|
1
|
+
import type { AuthInfo } from '@modelcontextprotocol/server';
|
|
2
2
|
import type { ProcessedBulkResult } from '../../../types/toolResults.js';
|
|
3
3
|
import type { GitHubPullRequestSearchInput, GitHubPullRequestSearchQuery } from './types.js';
|
|
4
|
-
export declare function handleIssuesMode(query: GitHubPullRequestSearchInput, parsedData: GitHubPullRequestSearchQuery | undefined, authInfo: AuthInfo | undefined): Promise<ProcessedBulkResult>;
|
|
4
|
+
export declare function handleIssuesMode(query: GitHubPullRequestSearchInput, parsedData: GitHubPullRequestSearchQuery | undefined, authInfo: AuthInfo | undefined, toolName?: string): Promise<ProcessedBulkResult>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createLazyProviderContext } from '../../providerExecution.js';
|
|
2
2
|
import type { ProcessedBulkResult } from '../../../types/toolResults.js';
|
|
3
3
|
import type { GitHubPullRequestSearchInput, GitHubPullRequestSearchQuery } from './types.js';
|
|
4
|
-
export declare function handlePullRequestsMode(query: GitHubPullRequestSearchInput, parsedData: GitHubPullRequestSearchQuery | undefined, getProviderContext: ReturnType<typeof createLazyProviderContext
|
|
4
|
+
export declare function handlePullRequestsMode(query: GitHubPullRequestSearchInput, parsedData: GitHubPullRequestSearchQuery | undefined, getProviderContext: ReturnType<typeof createLazyProviderContext>, toolName?: string): Promise<ProcessedBulkResult>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
2
2
|
import type { ToolExecutionArgs } from '../../types/execution.js';
|
|
3
3
|
import type { GitHubPullRequestSearchInput } from './execution/types.js';
|
|
4
4
|
export declare function searchMultipleGitHubPullRequests(args: ToolExecutionArgs<GitHubPullRequestSearchInput>): Promise<CallToolResult>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type QueryRecord = Record<string, unknown>;
|
|
2
|
+
/** Rebuild a content selector using only fields accepted by the public schema. */
|
|
3
|
+
export declare function sanitizePullRequestContent(value: unknown): QueryRecord | undefined;
|
|
4
|
+
/** Build an executable pull-request continuation from an internal executor query. */
|
|
5
|
+
export declare function publicPullRequestContinuationQuery(query: QueryRecord, number: number, patch?: QueryRecord): QueryRecord;
|
|
6
|
+
/** Build an executable exact-commit continuation from transport-enriched input. */
|
|
7
|
+
export declare function publicCommitContinuationQuery(query: QueryRecord, patch?: QueryRecord): QueryRecord;
|
|
8
|
+
declare const SEARCH_FIELDS: {
|
|
9
|
+
readonly pullRequests: readonly ["keywords", "owner", "repo", "concise", "state", "assignee", "author", "commenter", "mentions", "review-requested", "reviewed-by", "label", "checks", "review", "head", "base", "created", "updated", "closed", "merged-at", "comments", "reactions", "draft", "match", "sort", "order", "archived", "minify", "pageSize"];
|
|
10
|
+
readonly issues: readonly ["owner", "repo", "keywords", "concise", "state", "author", "assignee", "commenter", "mentions", "label", "created", "updated", "closed", "comments", "reactions", "match", "sort", "order", "archived", "minify", "pageSize"];
|
|
11
|
+
readonly commits: readonly ["owner", "repo", "path", "since", "until", "branch", "author", "committer", "pageSize"];
|
|
12
|
+
};
|
|
13
|
+
/** Build one runnable next-page query without executor-only transport fields. */
|
|
14
|
+
export declare function publicSearchContinuationQuery(query: QueryRecord, operation: keyof typeof SEARCH_FIELDS, page: number): QueryRecord;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
2
|
+
import type { ToolExecutionArgs } from '../../types/execution.js';
|
|
3
|
+
type PublicArgs = ToolExecutionArgs<Record<string, unknown>>;
|
|
4
|
+
export declare function searchMultipleGitHubHistory(args: PublicArgs): Promise<CallToolResult>;
|
|
5
|
+
export declare function getMultipleGitHubHistoryItems(args: PublicArgs): Promise<CallToolResult>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ProcessedBulkResult } from '../../types/toolResults.js';
|
|
2
|
+
export declare function mergePartialReasons(value: unknown, reason: string): string[];
|
|
3
|
+
/** Promote formatter-private nextQuery values to public executable calls. */
|
|
4
|
+
export declare function withContentContinuations(result: ProcessedBulkResult, operation: 'pullRequest' | 'issue'): ProcessedBulkResult;
|
|
5
|
+
export declare function withTruncatedCommitContinuation(result: ProcessedBulkResult, query: Record<string, unknown>): ProcessedBulkResult;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GitHubSearchHistoryQueryLocalSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
|
+
readonly [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
4
|
+
readonly [x: number]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
5
|
+
operation: z.ZodLiteral<"pullRequests">;
|
|
6
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
7
|
+
readonly [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
8
|
+
readonly [x: number]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
9
|
+
operation: z.ZodLiteral<"issues">;
|
|
10
|
+
owner: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
11
|
+
repo: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
12
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
13
|
+
readonly [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
14
|
+
readonly [x: number]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
15
|
+
operation: z.ZodLiteral<"commits">;
|
|
16
|
+
owner: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
17
|
+
repo: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
18
|
+
}, z.core.$strict>], "operation">;
|
|
19
|
+
export declare const GitHubSearchHistoryBulkQueryLocalSchema: z.ZodObject<{
|
|
20
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
21
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
22
|
+
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
23
|
+
}, z.core.$strict>;
|
|
24
|
+
export declare const GitHubGetHistoryItemQueryLocalSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
25
|
+
readonly [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
26
|
+
readonly [x: number]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
27
|
+
operation: z.ZodLiteral<"pullRequest">;
|
|
28
|
+
owner: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
29
|
+
repo: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
30
|
+
number: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
31
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
32
|
+
readonly [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
33
|
+
readonly [x: number]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
34
|
+
operation: z.ZodLiteral<"issue">;
|
|
35
|
+
owner: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
36
|
+
repo: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
37
|
+
number: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
38
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
39
|
+
readonly [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
40
|
+
readonly [x: number]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
41
|
+
operation: z.ZodLiteral<"commit">;
|
|
42
|
+
owner: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
43
|
+
repo: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
44
|
+
ref: z.ZodString;
|
|
45
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
46
|
+
readonly [x: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
47
|
+
readonly [x: number]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
48
|
+
base: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
49
|
+
head: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
50
|
+
operation: z.ZodLiteral<"compare">;
|
|
51
|
+
owner: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
52
|
+
repo: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
53
|
+
}, z.core.$strict>], "operation">;
|
|
54
|
+
export declare const GitHubGetHistoryItemBulkQueryLocalSchema: z.ZodObject<{
|
|
55
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
56
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
57
|
+
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
58
|
+
}, z.core.$strict>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ProcessedBulkResult } from '../../types/toolResults.js';
|
|
2
|
+
export type SearchHistoryOperation = 'pullRequests' | 'issues' | 'commits';
|
|
3
|
+
export declare function withSearchPageContinuation(result: ProcessedBulkResult, query: Record<string, unknown>, operation: SearchHistoryOperation): ProcessedBulkResult;
|
|
@@ -12,8 +12,9 @@ export declare const GitHubPullRequestSearchQueryLocalSchema: z.ZodObject<{
|
|
|
12
12
|
branch: z.ZodOptional<z.ZodString>;
|
|
13
13
|
includeDiff: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
14
14
|
includeAssets: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
-
|
|
15
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16
16
|
prNumber: z.ZodOptional<z.ZodNumber>;
|
|
17
|
+
issueNumber: z.ZodOptional<z.ZodNumber>;
|
|
17
18
|
owner: z.ZodOptional<z.ZodString>;
|
|
18
19
|
repo: z.ZodOptional<z.ZodString>;
|
|
19
20
|
concise: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -27,40 +28,40 @@ export declare const GitHubPullRequestSearchQueryLocalSchema: z.ZodObject<{
|
|
|
27
28
|
committer: z.ZodOptional<z.ZodString>;
|
|
28
29
|
commenter: z.ZodOptional<z.ZodString>;
|
|
29
30
|
mentions: z.ZodOptional<z.ZodString>;
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
'review-requested': z.ZodOptional<z.ZodString>;
|
|
32
|
+
'reviewed-by': z.ZodOptional<z.ZodString>;
|
|
32
33
|
label: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
33
34
|
checks: z.ZodOptional<z.ZodEnum<{
|
|
34
35
|
success: "success";
|
|
35
|
-
failure: "failure";
|
|
36
36
|
pending: "pending";
|
|
37
|
+
failure: "failure";
|
|
37
38
|
}>>;
|
|
38
39
|
review: z.ZodOptional<z.ZodEnum<{
|
|
39
40
|
none: "none";
|
|
41
|
+
required: "required";
|
|
40
42
|
approved: "approved";
|
|
41
43
|
changes_requested: "changes_requested";
|
|
42
|
-
required: "required";
|
|
43
44
|
}>>;
|
|
44
45
|
head: z.ZodOptional<z.ZodString>;
|
|
45
46
|
base: z.ZodOptional<z.ZodString>;
|
|
46
47
|
created: z.ZodOptional<z.ZodString>;
|
|
47
48
|
updated: z.ZodOptional<z.ZodString>;
|
|
48
49
|
closed: z.ZodOptional<z.ZodString>;
|
|
49
|
-
|
|
50
|
+
'merged-at': z.ZodOptional<z.ZodString>;
|
|
50
51
|
comments: z.ZodOptional<z.ZodString>;
|
|
51
52
|
reactions: z.ZodOptional<z.ZodString>;
|
|
52
53
|
draft: z.ZodOptional<z.ZodBoolean>;
|
|
53
54
|
match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
54
|
-
comments: "comments";
|
|
55
|
-
title: "title";
|
|
56
55
|
body: "body";
|
|
56
|
+
title: "title";
|
|
57
|
+
comments: "comments";
|
|
57
58
|
}>>>;
|
|
58
59
|
sort: z.ZodOptional<z.ZodEnum<{
|
|
59
|
-
updated: "updated";
|
|
60
|
-
created: "created";
|
|
61
|
-
"best-match": "best-match";
|
|
62
60
|
comments: "comments";
|
|
63
61
|
reactions: "reactions";
|
|
62
|
+
created: "created";
|
|
63
|
+
updated: "updated";
|
|
64
|
+
"best-match": "best-match";
|
|
64
65
|
}>>;
|
|
65
66
|
order: z.ZodOptional<z.ZodEnum<{
|
|
66
67
|
asc: "asc";
|
|
@@ -72,7 +73,6 @@ export declare const GitHubPullRequestSearchQueryLocalSchema: z.ZodObject<{
|
|
|
72
73
|
filePage: z.ZodOptional<z.ZodNumber>;
|
|
73
74
|
commentPage: z.ZodOptional<z.ZodNumber>;
|
|
74
75
|
commitPage: z.ZodOptional<z.ZodNumber>;
|
|
75
|
-
itemsPerPage: z.ZodDefault<z.ZodNumber>;
|
|
76
76
|
reviewMode: z.ZodOptional<z.ZodLiteral<"full">>;
|
|
77
77
|
content: z.ZodOptional<z.ZodObject<{
|
|
78
78
|
metadata: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -111,16 +111,14 @@ export declare const GitHubPullRequestSearchQueryLocalSchema: z.ZodObject<{
|
|
|
111
111
|
none: "none";
|
|
112
112
|
standard: "standard";
|
|
113
113
|
}>>;
|
|
114
|
-
|
|
115
|
-
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
116
|
-
researchGoal: z.ZodOptional<z.ZodString>;
|
|
114
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
117
115
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
118
116
|
}, z.core.$strip>;
|
|
119
117
|
export declare const GitHubPullRequestSearchBulkQueryLocalSchema: z.ZodObject<{
|
|
120
118
|
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
121
119
|
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
122
120
|
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
123
|
-
}, z.core.$
|
|
121
|
+
}, z.core.$strict>;
|
|
124
122
|
export interface PRChangedFile {
|
|
125
123
|
path?: string;
|
|
126
124
|
status?: string;
|
|
@@ -164,14 +162,6 @@ export interface HistoryCommit {
|
|
|
164
162
|
};
|
|
165
163
|
[key: string]: unknown;
|
|
166
164
|
}
|
|
167
|
-
export interface HistoryRelease {
|
|
168
|
-
tagName?: string;
|
|
169
|
-
name?: string;
|
|
170
|
-
publishedAt?: string;
|
|
171
|
-
prerelease?: boolean;
|
|
172
|
-
latest?: boolean;
|
|
173
|
-
[key: string]: unknown;
|
|
174
|
-
}
|
|
175
165
|
export interface HistoryPagination {
|
|
176
166
|
currentPage?: number;
|
|
177
167
|
totalPages?: number;
|
|
@@ -190,12 +180,6 @@ export interface PullRequestsResultData {
|
|
|
190
180
|
totalCount?: number;
|
|
191
181
|
effectiveQuery?: string;
|
|
192
182
|
commits?: HistoryCommit[];
|
|
193
|
-
releases?: HistoryRelease[];
|
|
194
|
-
latest?: {
|
|
195
|
-
tagName?: string;
|
|
196
|
-
publishedAt?: string;
|
|
197
|
-
[key: string]: unknown;
|
|
198
|
-
};
|
|
199
183
|
pagination?: HistoryPagination;
|
|
200
184
|
next?: Record<string, ToolContinuation>;
|
|
201
185
|
[key: string]: unknown;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { CallToolResult } from '@modelcontextprotocol/
|
|
1
|
+
import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
2
2
|
import type { ToolExecutionArgs } from '../../types/execution.js';
|
|
3
3
|
type SplitArgs = ToolExecutionArgs<Record<string, unknown>>;
|
|
4
4
|
export declare function searchMultipleGitHubPullRequestsSplit(args: SplitArgs): Promise<CallToolResult>;
|
|
5
5
|
export declare function searchMultipleGitHubIssues(args: SplitArgs): Promise<CallToolResult>;
|
|
6
6
|
export declare function searchMultipleGitHubCommits(args: SplitArgs): Promise<CallToolResult>;
|
|
7
|
-
export declare function listMultipleGitHubReleases(args: SplitArgs): Promise<CallToolResult>;
|
|
8
7
|
export {};
|