@octocodeai/octocode-tools-core 18.3.0 → 19.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.
- package/README.md +19 -19
- package/dist/chunks/direct/chunk-3AA4F3QO.js +10 -0
- package/dist/chunks/direct/chunk-43RVQWTG.js +8 -0
- package/dist/chunks/direct/chunk-7DYE654A.js +8 -0
- package/dist/chunks/direct/chunk-A4WMBDEC.js +8 -0
- package/dist/chunks/direct/chunk-AWZG43MA.js +8 -0
- package/dist/chunks/direct/chunk-BICVXQ5F.js +8 -0
- package/dist/chunks/direct/chunk-BMM5H6QF.js +11 -0
- package/dist/chunks/direct/chunk-C6HFNIDL.js +8 -0
- package/dist/chunks/direct/chunk-CBCZVCTZ.js +8 -0
- package/dist/chunks/direct/chunk-CBIKUVP6.js +11 -0
- package/dist/chunks/direct/chunk-CKB2ME2J.js +8 -0
- package/dist/chunks/direct/chunk-DBI23PBG.js +9 -0
- package/dist/chunks/direct/chunk-DBSQWRFS.js +9 -0
- package/dist/chunks/direct/chunk-DKGYPFGX.js +8 -0
- package/dist/chunks/direct/chunk-EOLHXX5I.js +8 -0
- package/dist/chunks/direct/chunk-IFPXDKUV.js +8 -0
- package/dist/chunks/direct/chunk-J3WYA3IJ.js +8 -0
- package/dist/chunks/direct/chunk-MCMOWPYL.js +8 -0
- package/dist/chunks/direct/chunk-MPTAIBY7.js +8 -0
- package/dist/chunks/direct/chunk-NQRDACK3.js +8 -0
- package/dist/chunks/direct/chunk-O5ETB2W5.js +8 -0
- package/dist/chunks/direct/chunk-OA6NU4KO.js +8 -0
- package/dist/chunks/direct/chunk-QKDE2HIF.js +10 -0
- package/dist/chunks/direct/chunk-RRSY2ZPX.js +13 -0
- package/dist/chunks/direct/chunk-UKQLRZEW.js +8 -0
- package/dist/chunks/direct/chunk-USZL65FN.js +8 -0
- package/dist/chunks/direct/chunk-WH6GL3J2.js +8 -0
- package/dist/chunks/direct/chunk-Y5OCKUQX.js +9 -0
- package/dist/chunks/direct/chunk-ZO44CZN5.js +8 -0
- package/dist/chunks/direct/chunk-ZSXRT7JL.js +12 -0
- package/dist/chunks/direct/chunk-ZUNPQVMO.js +8 -0
- package/dist/chunks/direct/execution-3T4B776P.js +9 -0
- package/dist/chunks/direct/execution-5BJNS7D7.js +8 -0
- package/dist/chunks/direct/execution-5O6QHKBR.js +8 -0
- package/dist/chunks/direct/execution-A4NK3BQO.js +8 -0
- package/dist/chunks/direct/execution-K4UOPXRQ.js +9 -0
- package/dist/chunks/direct/execution-SWWZOOA7.js +13 -0
- package/dist/chunks/direct/execution-X4MUJL4L.js +8 -0
- package/dist/chunks/direct/execution-XA6PXPRB.js +8 -0
- package/dist/chunks/direct/historyExecutions-6F3AA5PY.js +14 -0
- package/dist/direct.d.ts +6 -1
- package/dist/direct.js +2 -46
- package/dist/github/canonicalRepo.d.ts +2 -1
- package/dist/github/client.d.ts +3 -8
- package/dist/github/codeSearch/compactFragment.d.ts +7 -0
- package/dist/github/codeSearch.d.ts +2 -3
- package/dist/github/commit.d.ts +8 -0
- package/dist/github/commitDetail.d.ts +20 -0
- package/dist/github/commitSearch.d.ts +17 -0
- package/dist/github/compare.d.ts +15 -0
- package/dist/github/directoryFetch/cacheMetadata.d.ts +25 -0
- package/dist/github/directoryFetch/helpers.d.ts +1 -3
- package/dist/github/directoryFetch/snapshot.d.ts +10 -0
- package/dist/github/fileContentProcess.d.ts +0 -1
- package/dist/github/fileContentRaw/cache.d.ts +9 -0
- package/dist/github/fileContentRaw/fetch.d.ts +1 -1
- package/dist/github/githubAPI.d.ts +19 -2
- package/dist/github/history/commitFiles.d.ts +12 -0
- package/dist/github/issues/fetchers.d.ts +1 -1
- package/dist/github/issues/types.d.ts +3 -1
- package/dist/github/prContentFetcher/collectionPaging.d.ts +27 -0
- package/dist/github/prContentFetcher/comments.d.ts +7 -5
- package/dist/github/prContentFetcher/commits.d.ts +13 -14
- package/dist/github/prContentFetcher/flags.d.ts +0 -1
- package/dist/github/prContentFetcher/transform.d.ts +1 -1
- package/dist/github/prTransformation.d.ts +3 -1
- package/dist/github/queryBuilders/codeAndRepo.d.ts +2 -1
- package/dist/github/repoSearch.d.ts +2 -1
- package/dist/github/repoStructure/fetchOrchestration.d.ts +1 -1
- package/dist/github/repoStructurePagination.d.ts +1 -1
- package/dist/github/repoStructureTree.d.ts +4 -2
- package/dist/graph/advancedOperations.d.ts +2 -2
- package/dist/graph/buildFileGraph.d.ts +8 -13
- package/dist/graph/coverage.d.ts +6 -0
- package/dist/graph/diagnosticSnapshot.d.ts +10 -0
- package/dist/graph/fileImportLinker.d.ts +28 -0
- package/dist/graph/importResolver.d.ts +1 -1
- package/dist/graph/languageImportResolver.d.ts +5 -0
- package/dist/graph/metadataImports.d.ts +7 -0
- package/dist/graph/packageExportTargets.d.ts +11 -0
- package/dist/graph/rustCargoMetadata.d.ts +31 -0
- package/dist/graph/rustCargoProcess.d.ts +16 -0
- package/dist/graph/rustModules.d.ts +7 -0
- package/dist/graph/rustWorkspace.d.ts +5 -0
- package/dist/graph/types.d.ts +94 -3
- package/dist/graph/workspacePackageResolver.d.ts +7 -2
- package/dist/index.d.ts +46 -19
- package/dist/index.js +36 -45
- package/dist/providers/github/GitHubProvider.d.ts +3 -1
- package/dist/providers/github/githubContent.d.ts +3 -2
- package/dist/providers/github/githubPullRequests.d.ts +3 -2
- package/dist/providers/github/githubSearch.d.ts +6 -3
- package/dist/providers/github/githubStructure.d.ts +3 -2
- package/dist/providers/providerQueries.d.ts +4 -0
- package/dist/providers/providerResults.d.ts +29 -1
- package/dist/providers/types.d.ts +0 -2
- package/dist/schema.d.ts +9 -3
- package/dist/schema.js +4 -12
- package/dist/scheme/fields.d.ts +8 -8
- package/dist/scheme/pagination.d.ts +1 -0
- package/dist/serverConfig.d.ts +1 -1
- package/dist/shared/session/index.d.ts +1 -1
- package/dist/shared/session/index.js +1 -1
- package/dist/shared/session/storage.d.ts +0 -1
- package/dist/toolContract/descriptions.d.ts +6 -6
- package/dist/toolContract/input/resources/tools/ghSearch.d.ts +21 -20
- package/dist/toolContract/input/resources/tools/githubHistorySchema.d.ts +14 -6
- package/dist/toolContract/input/resources/tools/githubRepositoriesOperation.d.ts +3 -3
- package/dist/toolContract/input/resources/tools/githubTreeOperation.d.ts +4 -2
- package/dist/toolContract/input/resources/tools/historyCommitInput.d.ts +9 -0
- package/dist/toolContract/input/resources/tools/historyIssueInput.d.ts +4 -4
- package/dist/toolContract/input/resources/tools/historyPullRequestInput.d.ts +13 -5
- package/dist/toolContract/input/resources/tools/localAnalyzeGraph.d.ts +74 -32
- package/dist/toolContract/input/resources/tools/localFilesOperation.d.ts +1 -1
- package/dist/toolContract/input/resources/tools/localSearch.d.ts +43 -43
- package/dist/toolContract/input/resources/tools/localTextOperation.d.ts +1 -1
- package/dist/toolContract/input/resources/tools/localTreeOperation.d.ts +2 -2
- package/dist/toolContract/input/resources/tools/lspGetSemantics.d.ts +11 -2
- package/dist/toolContract/input/resources/tools/npmSearch.d.ts +2 -1
- package/dist/toolContract/metadata.d.ts +1 -1
- package/dist/toolContract/runtime.d.ts +1 -1
- package/dist/toolContract/types.d.ts +0 -1
- package/dist/tools/directToolCatalog/toolCatalogDefinitions.d.ts +2 -4
- package/dist/tools/directToolCatalog/toolInputPreparation.d.ts +2 -5
- package/dist/tools/directToolCatalog.exec.d.ts +10 -7
- package/dist/tools/github_clone_repo/cache.d.ts +0 -2
- package/dist/tools/github_clone_repo/cacheArtifacts.d.ts +3 -1
- package/dist/tools/github_clone_repo/cachePaths.d.ts +3 -2
- package/dist/tools/github_clone_repo/gitCheckout.d.ts +5 -0
- package/dist/tools/github_clone_repo/scheme.d.ts +3 -3
- package/dist/tools/github_clone_repo/types.d.ts +6 -1
- package/dist/tools/github_fetch_content/finalizer/types.d.ts +10 -2
- package/dist/tools/github_fetch_content/scheme.d.ts +3 -4
- package/dist/tools/github_fetch_content/types.d.ts +4 -3
- package/dist/tools/github_search/scheme.d.ts +24 -23
- package/dist/tools/github_search_code/execution.d.ts +1 -1
- package/dist/tools/github_search_code/finalizer/groups.d.ts +1 -1
- package/dist/tools/github_search_code/finalizer/ranking.d.ts +1 -1
- package/dist/tools/github_search_code/scheme.d.ts +3 -3
- package/dist/tools/github_search_pull_requests/contentResponse/commentsShaping.d.ts +4 -1
- package/dist/tools/github_search_pull_requests/contentResponse/contentView.d.ts +3 -0
- package/dist/tools/github_search_pull_requests/contentResponse/fileSurfaces.d.ts +30 -2
- package/dist/tools/github_search_pull_requests/contentResponse/nextCalls.d.ts +1 -7
- package/dist/tools/github_search_pull_requests/contentResponse/pagination.d.ts +14 -2
- package/dist/tools/github_search_pull_requests/historyContinuations.d.ts +1 -1
- package/dist/tools/github_search_pull_requests/historyDiffContinuations.d.ts +2 -0
- package/dist/tools/github_search_pull_requests/historySchemes.d.ts +23 -22
- package/dist/tools/github_search_pull_requests/scheme.d.ts +17 -9
- package/dist/tools/github_search_pull_requests/splitSchemes.d.ts +35 -26
- package/dist/tools/github_search_pull_requests/types.d.ts +5 -0
- package/dist/tools/github_search_repos/execution/pagination.d.ts +0 -17
- package/dist/tools/github_search_repos/execution/queryVariants.d.ts +1 -23
- package/dist/tools/github_search_repos/execution.d.ts +0 -1
- package/dist/tools/github_search_repos/scheme.d.ts +6 -6
- package/dist/tools/github_view_repo_structure/execution.d.ts +1 -1
- package/dist/tools/github_view_repo_structure/scheme.d.ts +6 -5
- package/dist/tools/local_analyze_graph/analysisTypes.d.ts +16 -3
- package/dist/tools/local_analyze_graph/analyzeGraph.d.ts +1 -1
- package/dist/tools/local_analyze_graph/completeness.d.ts +3 -0
- package/dist/tools/local_analyze_graph/deadCodeScan.d.ts +9 -5
- package/dist/tools/local_analyze_graph/rootInference.d.ts +2 -0
- package/dist/tools/local_analyze_graph/scheme.d.ts +13 -25
- package/dist/tools/local_fetch_content/fetchContent/pagination.d.ts +7 -0
- package/dist/tools/local_fetch_content/scheme.d.ts +3 -3
- package/dist/tools/local_find_files/findFiles.d.ts +1 -1
- package/dist/tools/local_find_files/scheme.d.ts +4 -4
- package/dist/tools/local_ripgrep/execution.d.ts +0 -1
- package/dist/tools/local_ripgrep/rankingProfile/rankingProfiles.d.ts +1 -2
- package/dist/tools/local_ripgrep/rankingProfile/rankingResults.d.ts +2 -2
- package/dist/tools/local_ripgrep/rankingProfile/rankingScoring.d.ts +1 -3
- package/dist/tools/local_ripgrep/ripgrepResultBuilder/buildResult.d.ts +0 -4
- package/dist/tools/local_ripgrep/ripgrepResultBuilder/searchNext.d.ts +1 -0
- package/dist/tools/local_ripgrep/scheme.d.ts +13 -5
- package/dist/tools/local_ripgrep/structuralCompleteness.d.ts +9 -0
- package/dist/tools/local_search/execution.d.ts +0 -1
- package/dist/tools/local_search/scheme.d.ts +46 -46
- package/dist/tools/local_view_structure/scheme.d.ts +5 -5
- package/dist/tools/lsp/semantic_content/scheme.d.ts +29 -7
- package/dist/tools/lsp/semantic_content/semanticAnchored.d.ts +2 -9
- package/dist/tools/lsp/semantic_content/semanticEnvelopes/callEnvelopes.d.ts +2 -2
- package/dist/tools/lsp/semantic_content/semanticEnvelopes/envelopeHelpers.d.ts +2 -1
- package/dist/tools/lsp/semantic_content/semanticEnvelopes/locationEnvelopes.d.ts +2 -3
- package/dist/tools/lsp/semantic_content/semanticFileOps/anchor.d.ts +0 -1
- package/dist/tools/lsp/semantic_content/semanticPresentation.d.ts +1 -0
- package/dist/tools/lsp/semantic_content/semanticSnapshot.d.ts +16 -0
- package/dist/tools/lsp/shared/callHierarchyTraversal.d.ts +2 -1
- package/dist/tools/lsp/shared/semanticTypes.d.ts +19 -10
- package/dist/tools/package_search/execution.d.ts +3 -4
- package/dist/tools/package_search/pagination.d.ts +1 -0
- package/dist/tools/package_search/scheme.d.ts +5 -4
- package/dist/tools/providerMappers/codeSearch.d.ts +2 -9
- package/dist/tools/providerMappers/fileContent.d.ts +1 -1
- package/dist/tools/providerMappers/pullRequests.d.ts +24 -4
- package/dist/tools/providerMappers/repoSearch.d.ts +4 -4
- package/dist/tools/providerMappers/repoStructure.d.ts +4 -3
- package/dist/tools/toolAvailability.d.ts +19 -0
- package/dist/tools/toolConfig.d.ts +1 -3
- package/dist/types/toolResults.d.ts +1 -0
- package/dist/utils/contextUtils.d.ts +1 -1
- package/dist/utils/core/types.d.ts +0 -2
- package/dist/utils/exec/npm.d.ts +2 -0
- package/dist/utils/file/byteOffset.d.ts +1 -1
- package/dist/utils/package/common.d.ts +0 -3
- package/dist/utils/package/npm/npmDeprecation.d.ts +1 -2
- package/dist/utils/package/npm/npmDetailsFetchers.d.ts +3 -15
- package/dist/utils/package/npm/npmMappers.d.ts +0 -4
- package/dist/utils/package/npm/npmRegistry.d.ts +9 -1
- package/dist/utils/package/npm/npmSearchStrategies.d.ts +2 -5
- package/dist/utils/package/types.d.ts +3 -0
- package/dist/utils/pagination/types.d.ts +1 -0
- package/dist/utils/response/callToolResult.d.ts +3 -1
- package/package.json +19 -15
- package/dist/errors/pathUtils.d.ts +0 -1
- package/dist/github/directoryFetch.d.ts +0 -3
- package/dist/github/fileContentRaw.d.ts +0 -2
- package/dist/github/issues.d.ts +0 -3
- package/dist/github/prContentFetcher.d.ts +0 -2
- package/dist/github/queryBuilders.d.ts +0 -4
- package/dist/github/repoStructure.d.ts +0 -1
- package/dist/shared/index.d.ts +0 -6
- package/dist/shared/languageSelectors.d.ts +0 -3
- package/dist/toolContract/schemas.d.ts +0 -31
- package/dist/tools/directToolCatalog.d.ts +0 -15
- package/dist/tools/directToolCatalog.meta.d.ts +0 -28
- package/dist/tools/github_search_code/finalizer.d.ts +0 -2
- package/dist/tools/github_search_repos/execution/ranking.d.ts +0 -4
- package/dist/tools/local_ripgrep/rankingProfile.d.ts +0 -35
- package/dist/tools/local_ripgrep/ripgrepResultBuilder.d.ts +0 -2
- package/dist/tools/lsp/semantic_content/index.d.ts +0 -3
- package/dist/tools/lsp/semantic_content/semanticEnvelopes.d.ts +0 -3
- package/dist/tools/lsp/semantic_content/semanticFileOps.d.ts +0 -8
- package/dist/tools/providerMappers.d.ts +0 -11
- package/dist/tools/toolMetadata/baseSchema.d.ts +0 -1
- package/dist/tools/toolMetadata/descriptions.d.ts +0 -1
- package/dist/tools/toolMetadata/proxies.d.ts +0 -4
- package/dist/tools/toolSchemaImports.d.ts +0 -16
- package/dist/utils/exec/spawn.d.ts +0 -2
- package/dist/utils/file/filters.d.ts +0 -2
- package/dist/utils/http/cache.d.ts +0 -5
- package/dist/utils/package/npm.d.ts +0 -2
- package/dist/utils/response/bulk.d.ts +0 -2
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { RepoSearchVariantExecution, RepoSearchVariantLabel, SuccessfulRepoSearchVariant } from './queryVariants.js';
|
|
2
1
|
export declare function buildResultPagination(pagination: {
|
|
3
2
|
currentPage: number;
|
|
4
3
|
totalPages?: number;
|
|
@@ -21,19 +20,3 @@ export declare function buildResultPagination(pagination: {
|
|
|
21
20
|
totalPages?: number;
|
|
22
21
|
currentPage: number;
|
|
23
22
|
};
|
|
24
|
-
export type EffectivePagination = {
|
|
25
|
-
currentPage: number;
|
|
26
|
-
totalPages?: number;
|
|
27
|
-
hasMore: boolean;
|
|
28
|
-
entriesPerPage?: number;
|
|
29
|
-
totalMatches?: number;
|
|
30
|
-
reportedTotalMatches?: number;
|
|
31
|
-
reachableTotalMatches?: number;
|
|
32
|
-
totalMatchesKind?: 'exact' | 'reported' | 'lowerBound';
|
|
33
|
-
totalMatchesCapped?: boolean;
|
|
34
|
-
};
|
|
35
|
-
export declare function buildPartialFailureWarnings(failedVariants: readonly {
|
|
36
|
-
label: RepoSearchVariantLabel;
|
|
37
|
-
}[]): string[] | undefined;
|
|
38
|
-
export declare function buildMergedPagination(variants: SuccessfulRepoSearchVariant[], dedupedCount: number): EffectivePagination | undefined;
|
|
39
|
-
export declare function sumVariantRawResponseChars(variants: RepoSearchVariantExecution[]): number;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type { GitHubReposSearchSingleQuerySchema } from '../../../toolContract/
|
|
3
|
-
import type { RepoSearchResult as ProviderRepoSearchResult } from '../../../providers/types.js';
|
|
4
|
-
import type { ProviderOperationResult } from '../../providerExecution.js';
|
|
2
|
+
import type { GitHubReposSearchSingleQuerySchema } from '../../../toolContract/input/resources/tools/githubRepositoriesOperation.js';
|
|
5
3
|
import type { WithOptionalMeta } from '../../../types/execution.js';
|
|
6
4
|
type GitHubReposSearchSingleQuery = z.infer<typeof GitHubReposSearchSingleQuerySchema>;
|
|
7
5
|
export type RepositorySearchExtraFields = {
|
|
@@ -14,27 +12,7 @@ export type RepositorySearchExtraFields = {
|
|
|
14
12
|
size?: string;
|
|
15
13
|
};
|
|
16
14
|
export type PartialReposSearchQuery = WithOptionalMeta<GitHubReposSearchSingleQuery> & RepositorySearchExtraFields;
|
|
17
|
-
export type RepoSearchVariantLabel = 'combined' | 'topics' | 'keywords';
|
|
18
|
-
export interface RepoSearchVariant {
|
|
19
|
-
label: RepoSearchVariantLabel;
|
|
20
|
-
query: PartialReposSearchQuery;
|
|
21
|
-
}
|
|
22
|
-
export interface RepoSearchVariantExecution {
|
|
23
|
-
label: RepoSearchVariantLabel;
|
|
24
|
-
query: PartialReposSearchQuery;
|
|
25
|
-
response: ProviderOperationResult<RepoSearchVariant, ProviderRepoSearchResult>['response'];
|
|
26
|
-
}
|
|
27
|
-
export type SuccessfulRepoSearchVariant = RepoSearchVariantExecution & {
|
|
28
|
-
response: Extract<ProviderOperationResult<RepoSearchVariant, ProviderRepoSearchResult>, {
|
|
29
|
-
response: {
|
|
30
|
-
data: ProviderRepoSearchResult;
|
|
31
|
-
};
|
|
32
|
-
}>['response'] & {
|
|
33
|
-
data: ProviderRepoSearchResult;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
15
|
export declare function hasValidTopics(query: PartialReposSearchQuery): boolean;
|
|
37
16
|
export declare function hasValidKeywords(query: PartialReposSearchQuery): boolean;
|
|
38
17
|
export declare function hasValidRepositorySearchParams(query: PartialReposSearchQuery): boolean;
|
|
39
|
-
export declare function createSearchVariants(query: PartialReposSearchQuery): RepoSearchVariant[];
|
|
40
18
|
export {};
|
|
@@ -2,6 +2,5 @@ import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
|
2
2
|
import type { ToolExecutionArgs } from '../../types/execution.js';
|
|
3
3
|
import type { ProcessedBulkResult } from '../../types/toolResults.js';
|
|
4
4
|
import { type PartialReposSearchQuery } from './execution/queryVariants.js';
|
|
5
|
-
export { buildMergedPagination, buildPartialFailureWarnings, buildResultPagination, } from './execution/pagination.js';
|
|
6
5
|
export declare function searchGitHubRepos(query: PartialReposSearchQuery, args: ToolExecutionArgs<PartialReposSearchQuery>, getProviderContext?: () => import("../providerExecution.js").ProviderExecutionContext): Promise<ProcessedBulkResult>;
|
|
7
6
|
export declare function searchMultipleGitHubRepos(args: ToolExecutionArgs<PartialReposSearchQuery>): Promise<CallToolResult>;
|
|
@@ -13,16 +13,16 @@ export declare const GitHubReposSearchSingleQueryLocalSchema: z.ZodObject<{
|
|
|
13
13
|
created: z.ZodOptional<z.ZodString>;
|
|
14
14
|
size: z.ZodOptional<z.ZodString>;
|
|
15
15
|
match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
16
|
-
name: "name";
|
|
17
16
|
description: "description";
|
|
17
|
+
name: "name";
|
|
18
18
|
readme: "readme";
|
|
19
19
|
}>>>;
|
|
20
20
|
sort: z.ZodDefault<z.ZodEnum<{
|
|
21
|
-
updated: "updated";
|
|
22
|
-
"best-match": "best-match";
|
|
23
21
|
stars: "stars";
|
|
22
|
+
updated: "updated";
|
|
24
23
|
forks: "forks";
|
|
25
24
|
"help-wanted-issues": "help-wanted-issues";
|
|
25
|
+
"best-match": "best-match";
|
|
26
26
|
}>>;
|
|
27
27
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
28
28
|
page: z.ZodDefault<z.ZodNumber>;
|
|
@@ -37,9 +37,9 @@ export declare const GitHubReposSearchSingleQueryLocalSchema: z.ZodObject<{
|
|
|
37
37
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
38
38
|
}, z.core.$strip>;
|
|
39
39
|
export declare const GitHubReposSearchBulkQueryLocalSchema: z.ZodObject<{
|
|
40
|
-
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
41
|
-
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
42
|
-
queries: z.ZodArray<z.
|
|
40
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
41
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
42
|
+
queries: z.ZodArray<z.ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
43
43
|
}, z.core.$strict>;
|
|
44
44
|
export interface LocalRepositoryDetail {
|
|
45
45
|
owner: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
2
2
|
import type { z } from 'zod';
|
|
3
|
-
import type { GitHubViewRepoStructureQuerySchema } from '../../toolContract/
|
|
3
|
+
import type { GitHubViewRepoStructureQuerySchema } from '../../toolContract/input/resources/tools/githubTreeOperation.js';
|
|
4
4
|
import type { GitHubRepoStructureDirectoryEntry } from '@octocodeai/octocode-core/extra-types';
|
|
5
5
|
type GitHubViewRepoStructureQuery = z.infer<typeof GitHubViewRepoStructureQuerySchema>;
|
|
6
6
|
import type { WithOptionalMeta } from '../../types/execution.js';
|
|
@@ -7,21 +7,22 @@ export declare const GitHubViewRepoStructureQueryLocalSchema: import("zod").ZodO
|
|
|
7
7
|
path: import("zod").ZodOptional<import("zod").ZodString>;
|
|
8
8
|
maxDepth: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
9
9
|
page: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
10
|
+
metadataPage: import("zod").ZodOptional<import("zod").ZodDefault<import("zod").ZodNumber>>;
|
|
10
11
|
itemsPerPage: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
11
12
|
include: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodEnum<{
|
|
12
|
-
sizes: "sizes";
|
|
13
|
-
languages: "languages";
|
|
14
13
|
contributors: "contributors";
|
|
15
14
|
branches: "branches";
|
|
16
15
|
tags: "tags";
|
|
16
|
+
languages: "languages";
|
|
17
|
+
sizes: "sizes";
|
|
17
18
|
}>>>;
|
|
18
19
|
goal: import("zod").ZodOptional<import("zod").ZodString>;
|
|
19
20
|
reasoning: import("zod").ZodOptional<import("zod").ZodString>;
|
|
20
21
|
}, import("zod/v4/core").$strip>;
|
|
21
22
|
export declare const GitHubViewRepoStructureBulkQueryLocalSchema: import("zod").ZodObject<{
|
|
22
|
-
responseCharOffset: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodNumber>>;
|
|
23
|
-
responseCharLength: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodNumber>>;
|
|
24
|
-
queries: import("zod").ZodArray<import("zod").
|
|
23
|
+
responseCharOffset: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodNumber, unknown>>;
|
|
24
|
+
responseCharLength: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodNumber, unknown>>;
|
|
25
|
+
queries: import("zod").ZodArray<import("zod").ZodTypeAny<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>>;
|
|
25
26
|
}, import("zod/v4/core").$strict>;
|
|
26
27
|
export interface StructureDirEntry {
|
|
27
28
|
dir?: string;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { WalkResult } from '../../graph/buildFileGraph.js';
|
|
2
|
+
import type { GraphCoverage } from '../../graph/types.js';
|
|
2
3
|
export type GraphOperation = 'deadCode' | 'cycles' | 'dependencies' | 'dependents' | 'path' | 'reachability';
|
|
3
4
|
export interface AnalyzeGraphQuery {
|
|
4
5
|
operation: GraphOperation;
|
|
5
|
-
|
|
6
|
+
/** Absolute repo/package root to scan. Inferred from `file` when omitted and `file` is absolute. */
|
|
7
|
+
path?: string;
|
|
6
8
|
file?: string;
|
|
7
9
|
target?: string;
|
|
8
10
|
depth?: number;
|
|
@@ -13,6 +15,10 @@ export interface AnalyzeGraphQuery {
|
|
|
13
15
|
limit?: number;
|
|
14
16
|
page?: number;
|
|
15
17
|
pageSize?: number;
|
|
18
|
+
diagnosticPage?: number;
|
|
19
|
+
diagnosticPageSize?: number;
|
|
20
|
+
diagnosticSnapshot?: string;
|
|
21
|
+
rustWorkspace?: 'syntax' | 'cargo';
|
|
16
22
|
}
|
|
17
23
|
export interface AnalyzeGraphOutput {
|
|
18
24
|
status?: 'empty' | 'error';
|
|
@@ -24,7 +30,14 @@ export interface AnalyzeGraphOutput {
|
|
|
24
30
|
filesSkipped?: number;
|
|
25
31
|
truncated?: boolean;
|
|
26
32
|
terminalLimit?: boolean;
|
|
27
|
-
|
|
33
|
+
completeness?: {
|
|
34
|
+
results: 'complete' | 'pageable' | 'truncated';
|
|
35
|
+
graph: 'complete' | 'scan-truncated' | 'coverage-incomplete';
|
|
36
|
+
diagnostics: 'complete' | 'pageable' | 'truncated';
|
|
37
|
+
coverageGapReasons?: Array<'parseRecovery' | 'unresolvedImports' | 'unsupportedLinking'>;
|
|
38
|
+
};
|
|
39
|
+
partialReasons?: Array<'maxFiles' | 'limit' | 'filesSkipped' | 'parseRecovery' | 'unresolvedImports' | 'unsupportedLinking' | 'diagnosticPage'>;
|
|
40
|
+
coverage?: GraphCoverage;
|
|
28
41
|
totalAvailable?: number;
|
|
29
42
|
results: Array<Record<string, unknown>>;
|
|
30
43
|
summary?: Record<string, unknown>;
|
|
@@ -42,5 +55,5 @@ export interface AnalyzeGraphOutput {
|
|
|
42
55
|
[key: string]: unknown;
|
|
43
56
|
}
|
|
44
57
|
export interface AnalyzeGraphContext {
|
|
45
|
-
getGraph?: (path: string, excludeDir: string[], maxFiles: number) => WalkResult | Promise<WalkResult>;
|
|
58
|
+
getGraph?: (path: string, excludeDir: string[], maxFiles: number, rustWorkspace?: 'syntax' | 'cargo') => WalkResult | Promise<WalkResult>;
|
|
46
59
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AnalyzeGraphContext, AnalyzeGraphOutput, AnalyzeGraphQuery } from './analysisTypes.js';
|
|
2
2
|
export declare function summarizeEntrypoints(entrypoints: string[]): Record<string, unknown>;
|
|
3
|
-
export declare function analyzeGraph(
|
|
3
|
+
export declare function analyzeGraph(rawQuery: AnalyzeGraphQuery, context?: AnalyzeGraphContext): Promise<AnalyzeGraphOutput>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { type WalkResult } from '../../graph/buildFileGraph.js';
|
|
2
|
-
import type { DeadClusterOutput, DeadExportOutput,
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { DeadClusterOutput, DeadExportOutput, AnalyzeGraphQuery } from './scheme.js';
|
|
3
|
+
type DeadCodeScanOptions = Partial<Pick<Extract<AnalyzeGraphQuery, {
|
|
4
|
+
operation: 'deadCode';
|
|
5
|
+
}>, 'excludeDir' | 'maxFiles' | 'rustWorkspace' | 'entrypoints' | 'includeTests'>>;
|
|
5
6
|
export interface DeadCodeScanResult {
|
|
6
7
|
filesScanned: number;
|
|
7
8
|
filesSkipped: number;
|
|
@@ -11,7 +12,7 @@ export interface DeadCodeScanResult {
|
|
|
11
12
|
warnings: string[];
|
|
12
13
|
/**
|
|
13
14
|
* Present (and always `"low"`) when the scan's reachability base is shaky, so
|
|
14
|
-
* the raw candidate count should not be trusted as-is.
|
|
15
|
+
* the raw candidate count should not be trusted as-is. Triggers, each
|
|
15
16
|
* with its own explanatory `warnings` entry:
|
|
16
17
|
* - `entrypointsResolved` came entirely from the test-file heuristic (no
|
|
17
18
|
* package.json main/exports/bin matched and no explicit `entrypoints`),
|
|
@@ -20,8 +21,11 @@ export interface DeadCodeScanResult {
|
|
|
20
21
|
* - one or more resolved entrypoints parsed to zero edges (a native
|
|
21
22
|
* extractor parse failure on that file), so reachability can't leave them
|
|
22
23
|
* and files they should reach show as false "unreachable-file".
|
|
24
|
+
* - The scan was capped, files were skipped, or coverage diagnostics report
|
|
25
|
+
* parse recovery or unsupported/unresolved import linking. Missing edges
|
|
26
|
+
* can hide live paths even when entrypoints contain valid declarations.
|
|
23
27
|
*/
|
|
24
28
|
confidence?: 'low';
|
|
25
29
|
}
|
|
26
|
-
export declare function scanForDeadCode(rootAbsolutePath: string, query:
|
|
30
|
+
export declare function scanForDeadCode(rootAbsolutePath: string, query: DeadCodeScanOptions, builtGraph?: WalkResult): Promise<DeadCodeScanResult>;
|
|
27
31
|
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { LocalItemPagination, ToolContinuation } from '../../scheme/pagination.js';
|
|
3
|
-
import { LocalAnalyzeGraphQuerySchema } from '../../toolContract/
|
|
3
|
+
import { LocalAnalyzeGraphQuerySchema } from '../../toolContract/input/resources/tools/localAnalyzeGraph.js';
|
|
4
|
+
import type { GraphCoverage } from '../../graph/types.js';
|
|
4
5
|
export { LocalAnalyzeGraphQuerySchema };
|
|
5
6
|
export type AnalyzeGraphQuery = z.infer<typeof LocalAnalyzeGraphQuerySchema>;
|
|
6
7
|
export declare const LocalAnalyzeGraphBulkQuerySchema: z.ZodObject<{
|
|
7
|
-
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
8
|
-
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
9
|
-
queries: z.ZodArray<z.
|
|
8
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
9
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
10
|
+
queries: z.ZodArray<z.ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
10
11
|
}, z.core.$strict>;
|
|
11
12
|
export type GraphOperation = AnalyzeGraphQuery['operation'];
|
|
12
13
|
export type DeadCodeReason = 'unreachable-file' | 'unreferenced-export' | 'dead-cluster';
|
|
@@ -25,6 +26,7 @@ export interface DeadClusterOutput {
|
|
|
25
26
|
reason: string;
|
|
26
27
|
}
|
|
27
28
|
export interface AnalyzeGraphOutput {
|
|
29
|
+
coverage?: GraphCoverage;
|
|
28
30
|
status?: 'empty' | 'error';
|
|
29
31
|
error?: string;
|
|
30
32
|
errorCode?: string;
|
|
@@ -35,7 +37,13 @@ export interface AnalyzeGraphOutput {
|
|
|
35
37
|
filesSkipped?: number;
|
|
36
38
|
truncated?: boolean;
|
|
37
39
|
terminalLimit?: boolean;
|
|
38
|
-
|
|
40
|
+
completeness?: {
|
|
41
|
+
results: 'complete' | 'pageable' | 'truncated';
|
|
42
|
+
graph: 'complete' | 'scan-truncated' | 'coverage-incomplete';
|
|
43
|
+
diagnostics: 'complete' | 'pageable' | 'truncated';
|
|
44
|
+
coverageGapReasons?: Array<'parseRecovery' | 'unresolvedImports' | 'unsupportedLinking'>;
|
|
45
|
+
};
|
|
46
|
+
partialReasons?: Array<'maxFiles' | 'limit' | 'filesSkipped' | 'parseRecovery' | 'unresolvedImports' | 'unsupportedLinking' | 'diagnosticPage'>;
|
|
39
47
|
totalAvailable?: number;
|
|
40
48
|
results?: Array<Record<string, unknown>>;
|
|
41
49
|
summary?: Record<string, unknown>;
|
|
@@ -45,23 +53,3 @@ export interface AnalyzeGraphOutput {
|
|
|
45
53
|
confidence?: 'low';
|
|
46
54
|
[key: string]: unknown;
|
|
47
55
|
}
|
|
48
|
-
export type FindDeadCodeQuery = Extract<AnalyzeGraphQuery, {
|
|
49
|
-
operation: 'deadCode';
|
|
50
|
-
}> extends infer T ? T extends object ? Omit<T, 'operation'> : never : never;
|
|
51
|
-
export interface FindDeadCodeOutput {
|
|
52
|
-
status?: 'empty' | 'error';
|
|
53
|
-
error?: string;
|
|
54
|
-
errorCode?: string;
|
|
55
|
-
rawResponseChars?: number;
|
|
56
|
-
path?: string;
|
|
57
|
-
filesScanned?: number;
|
|
58
|
-
filesSkipped?: number;
|
|
59
|
-
entrypointsResolved?: string[];
|
|
60
|
-
deadExports?: DeadExportOutput[];
|
|
61
|
-
deadClusters?: DeadClusterOutput[];
|
|
62
|
-
pagination?: LocalItemPagination;
|
|
63
|
-
next?: Record<string, ToolContinuation>;
|
|
64
|
-
confidence?: 'low';
|
|
65
|
-
warnings?: string[];
|
|
66
|
-
[key: string]: unknown;
|
|
67
|
-
}
|
|
@@ -4,6 +4,13 @@ import type { FetchContentQuery } from '../scheme.js';
|
|
|
4
4
|
import { type FileStats } from './validation.js';
|
|
5
5
|
import type { ExtractionState } from './extraction.js';
|
|
6
6
|
export type ContentView = 'none' | 'standard' | 'symbols';
|
|
7
|
+
/** Sanitize a complete extracted view before character offsets are assigned. */
|
|
8
|
+
export declare function sanitizeReturnedText(text: string, queryPath: string): {
|
|
9
|
+
text: string;
|
|
10
|
+
warning?: string;
|
|
11
|
+
limited: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare function buildSecurityLimitResult(query: FetchContentQuery, totalLines: number, firstSelectedLine?: number): LocalGetFileContentToolResult;
|
|
7
14
|
export interface ContentWindow {
|
|
8
15
|
/** The windowed (paginated) slice of the input content. */
|
|
9
16
|
windowedContent: string;
|
|
@@ -25,9 +25,9 @@ export type FetchContentQuery = z.infer<typeof LocalFetchContentQuerySchema> & {
|
|
|
25
25
|
minify?: MinifyMode;
|
|
26
26
|
};
|
|
27
27
|
export declare const LocalFetchContentBulkQuerySchema: z.ZodObject<{
|
|
28
|
-
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
29
|
-
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
30
|
-
queries: z.ZodArray<z.
|
|
28
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
29
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
30
|
+
queries: z.ZodArray<z.ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
31
31
|
}, z.core.$strict>;
|
|
32
32
|
export interface FileContentMatchRange {
|
|
33
33
|
start: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type { FindFilesQuerySchema } from '../../toolContract/
|
|
2
|
+
import type { FindFilesQuerySchema } from '../../toolContract/input/resources/tools/localFilesOperation.js';
|
|
3
3
|
import type { LocalFindFilesToolResult } from '@octocodeai/octocode-core/extra-types';
|
|
4
4
|
type UpstreamFindFilesQuery = z.infer<typeof FindFilesQuerySchema>;
|
|
5
5
|
import type { WithOptionalMeta } from '../../types/execution.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { FindFilesQuerySchema as CoreFindFilesQuerySchema } from '../../toolContract/
|
|
2
|
+
import { FindFilesQuerySchema as CoreFindFilesQuerySchema } from '../../toolContract/input/resources/tools/localFilesOperation.js';
|
|
3
3
|
import type { LocalItemPagination, ToolContinuation } from '../../scheme/pagination.js';
|
|
4
4
|
import type { BulkToolOutput } from '../../types/toolOutput.js';
|
|
5
5
|
export type FindFilesQuery = Omit<z.infer<typeof CoreFindFilesQuerySchema>, 'regexType'>;
|
|
6
6
|
export declare const LocalFindFilesQuerySchema: z.ZodType<FindFilesQuery>;
|
|
7
7
|
export declare const LocalFindFilesBulkQuerySchema: z.ZodObject<{
|
|
8
|
-
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
9
|
-
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
10
|
-
queries: z.ZodArray<z.
|
|
8
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
9
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
10
|
+
queries: z.ZodArray<z.ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
11
11
|
}, z.core.$strict>;
|
|
12
12
|
export interface LocalFindFilesEntryOutput {
|
|
13
13
|
name?: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
2
2
|
import { type RipgrepQuery } from './scheme.js';
|
|
3
3
|
import type { ToolExecutionArgs } from '../../types/execution.js';
|
|
4
|
-
export { finalizeRipgrepResult } from './ripgrepResultBuilder.js';
|
|
5
4
|
export declare function executeRipgrepSearch(args: ToolExecutionArgs<RipgrepQuery>): Promise<CallToolResult>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Ranking profile data/config — language profile tables, path-role
|
|
3
3
|
* classification, and the tunable weight policy. See
|
|
4
|
-
* `.octocode/RANKING-ARCHITECTURE.md`
|
|
5
|
-
* `../rankingProfile.ts` (the public barrel) for the full contract.
|
|
4
|
+
* `.octocode/RANKING-ARCHITECTURE.md` for the ranking contract.
|
|
6
5
|
*
|
|
7
6
|
* This module owns *what* a profile is and *where* a path lives (its role);
|
|
8
7
|
* `rankingScoring.ts` owns *how much* each signal is worth in a score.
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* `rankFiles` composes the scoring engine (`scoreFileWithRarity`,
|
|
7
7
|
* `buildCandidateTermRarity`) over the whole candidate set: it applies the
|
|
8
8
|
* candidate cap, builds candidate-local term rarity once, scores every file,
|
|
9
|
-
* and produces a total, deterministic order
|
|
10
|
-
*
|
|
9
|
+
* and produces a total, deterministic order: score descending, match count
|
|
10
|
+
* descending, then path ascending. Equal inputs always produce equal rankings.
|
|
11
11
|
*/
|
|
12
12
|
import type { LocalSearchCodeFile } from '@octocodeai/octocode-core/types';
|
|
13
13
|
import type { RankSort } from './rankingProfiles.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* order they are computed. Do not reorder the calls inside
|
|
7
7
|
* `scoreFileWithRarity` or `bestLineScore`.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
9
|
+
* Weight policy and profile selection live in rankingProfiles.ts.
|
|
10
10
|
*/
|
|
11
11
|
import type { LocalSearchCodeFile } from '@octocodeai/octocode-core/types';
|
|
12
12
|
import { type PathRole, type RankingProfileId } from './rankingProfiles.js';
|
|
@@ -36,6 +36,4 @@ type CandidateTermRarity = {
|
|
|
36
36
|
};
|
|
37
37
|
export declare function buildCandidateTermRarity(files: LocalSearchCodeFile[], ctx: RankContext): CandidateTermRarity | undefined;
|
|
38
38
|
export declare function scoreFileWithRarity(file: LocalSearchCodeFile, ctx: RankContext, rarity?: CandidateTermRarity): FileScore;
|
|
39
|
-
/** Score one file. Pure and deterministic. */
|
|
40
|
-
export declare function scoreFile(file: LocalSearchCodeFile, ctx: RankContext): FileScore;
|
|
41
39
|
export {};
|
|
@@ -4,7 +4,3 @@ import type { SearchStats } from '../../../utils/core/types.js';
|
|
|
4
4
|
import type { RipgrepQuery } from '../scheme.js';
|
|
5
5
|
export type LocalSearchEngine = 'rg' | 'structural';
|
|
6
6
|
export declare function buildSearchResult(parsedFiles: LocalSearchCodeFile[], configuredQuery: RipgrepQuery, searchEngine: LocalSearchEngine, warnings: string[], stats?: SearchStats): Promise<LocalSearchCodeToolResult>;
|
|
7
|
-
export declare function finalizeRipgrepResult(result: LocalSearchCodeToolResult, _query: RipgrepQuery, _totals: {
|
|
8
|
-
totalMatches: number;
|
|
9
|
-
totalFiles: number;
|
|
10
|
-
}): LocalSearchCodeToolResult;
|
|
@@ -35,6 +35,7 @@ export declare function buildSearchNextMap(files: LocalSearchCodeFile[], query:
|
|
|
35
35
|
matchPage: number;
|
|
36
36
|
matchesPerPage: number;
|
|
37
37
|
hasFileWithMoreMatches: boolean;
|
|
38
|
+
scanCapReached?: boolean;
|
|
38
39
|
}): SearchNextMap;
|
|
39
40
|
export type InferredLspSymbol = {
|
|
40
41
|
symbol: string;
|
|
@@ -49,8 +49,8 @@ export declare const LocalRipgrepQuerySchema: z.ZodObject<{
|
|
|
49
49
|
}>>;
|
|
50
50
|
sortReverse: z.ZodOptional<z.ZodBoolean>;
|
|
51
51
|
rankingProfile: z.ZodDefault<z.ZodEnum<{
|
|
52
|
-
typescript: "typescript";
|
|
53
52
|
auto: "auto";
|
|
53
|
+
typescript: "typescript";
|
|
54
54
|
javascript: "javascript";
|
|
55
55
|
rust: "rust";
|
|
56
56
|
python: "python";
|
|
@@ -86,9 +86,9 @@ export declare const LocalRipgrepQuerySchema: z.ZodObject<{
|
|
|
86
86
|
}, z.core.$strip>;
|
|
87
87
|
export type RipgrepQuery = z.infer<typeof LocalRipgrepQuerySchema>;
|
|
88
88
|
export declare const LocalRipgrepBulkQuerySchema: z.ZodObject<{
|
|
89
|
-
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
90
|
-
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
91
|
-
queries: z.ZodArray<z.
|
|
89
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
90
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
91
|
+
queries: z.ZodArray<z.ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
92
92
|
}, z.core.$strict>;
|
|
93
93
|
export interface LocalSearchMatch {
|
|
94
94
|
line: number;
|
|
@@ -146,6 +146,14 @@ export interface LocalSearchCodeData {
|
|
|
146
146
|
next?: Record<string, ToolContinuation>;
|
|
147
147
|
terminalLimit?: boolean;
|
|
148
148
|
truncated?: boolean;
|
|
149
|
-
partialReasons?: Array<'maxFiles'>;
|
|
149
|
+
partialReasons?: Array<'maxFiles' | 'structuralLimit' | 'skippedFiles'>;
|
|
150
|
+
diagnostics?: Array<{
|
|
151
|
+
code: string;
|
|
152
|
+
severity: string;
|
|
153
|
+
stage: string;
|
|
154
|
+
message: string;
|
|
155
|
+
path?: string;
|
|
156
|
+
recovery?: string;
|
|
157
|
+
}>;
|
|
150
158
|
}
|
|
151
159
|
export type LocalSearchCodeOutput = BulkToolOutput<LocalSearchCodeData>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { LocalSearchCodeToolResult } from '@octocodeai/octocode-core/extra-types';
|
|
2
|
+
import type { StructuralDiagnostic, StructuralSearchFilesResult } from '@octocodeai/octocode-engine';
|
|
3
|
+
import type { LocalSearchCodeData } from './scheme.js';
|
|
4
|
+
type StructuralToolResult = LocalSearchCodeToolResult & Pick<LocalSearchCodeData, 'truncated' | 'terminalLimit' | 'partialReasons' | 'diagnostics'>;
|
|
5
|
+
export declare function isIncomplete(result: StructuralSearchFilesResult): boolean;
|
|
6
|
+
export declare function withCompleteness(result: LocalSearchCodeToolResult, status: string, diagnostics: StructuralDiagnostic[]): StructuralToolResult;
|
|
7
|
+
export declare function executionLimitDiagnostic(message: string, path: string): StructuralDiagnostic | undefined;
|
|
8
|
+
export declare function rewrittenQueryDiagnostic(requestedPattern: string | undefined, executedPattern: string | undefined, path: string): StructuralDiagnostic | undefined;
|
|
9
|
+
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
2
2
|
import type { ToolExecutionArgs } from '../../types/execution.js';
|
|
3
3
|
import { type LocalSearchQuery } from './scheme.js';
|
|
4
|
-
export { LOCAL_SEARCH_TOOL_NAME } from '../toolNames.js';
|
|
5
4
|
export declare function executeLocalSearch(args: ToolExecutionArgs<LocalSearchQuery>): Promise<CallToolResult>;
|