@octocodeai/octocode-tools-core 18.2.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 +2 -2
- package/dist/toolContract/input/resources/tools/localSearch.d.ts +44 -44
- 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 +47 -47
- 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 +23 -19
- 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,15 +1,8 @@
|
|
|
1
|
-
import type { CodeSearchResult } from '../../providers/
|
|
1
|
+
import type { CodeSearchResult } from '../../providers/providerResults.js';
|
|
2
2
|
import type { z } from 'zod';
|
|
3
|
-
import type { GitHubCodeSearchQuerySchema } from '../../toolContract/
|
|
3
|
+
import type { GitHubCodeSearchQuerySchema } from '../../toolContract/input/resources/tools/githubCodeOperation.js';
|
|
4
4
|
import type { WithOptionalMeta } from '../../types/execution.js';
|
|
5
5
|
type GitHubCodeSearchQuery = z.infer<typeof GitHubCodeSearchQuerySchema>;
|
|
6
|
-
/**
|
|
7
|
-
* Char-boundary truncation mirroring the Rust engine's `truncate_unicode`:
|
|
8
|
-
* keeps at most `maxChars` Unicode scalars and appends `...` when it cuts.
|
|
9
|
-
* Never slices UTF-8 mid-codepoint or mid-token — the single data-layer bound
|
|
10
|
-
* for GitHub code-search match fragments (the render layer must not re-trim).
|
|
11
|
-
*/
|
|
12
|
-
export declare function truncateSnippetChars(value: string, maxChars?: number): string;
|
|
13
6
|
export declare function mapCodeSearchToolQuery(query: WithOptionalMeta<GitHubCodeSearchQuery>): {
|
|
14
7
|
keywords: string[];
|
|
15
8
|
projectId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FileContentResult as ProviderFileContentResult } from '../../providers/
|
|
1
|
+
import type { FileContentResult as ProviderFileContentResult } from '../../providers/providerResults.js';
|
|
2
2
|
import type { z } from 'zod';
|
|
3
3
|
import type { WithOptionalMeta } from '../../types/execution.js';
|
|
4
4
|
import { FileContentQueryLocalSchema } from '../github_fetch_content/scheme.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PullRequestSearchResult as ProviderPullRequestSearchResult } from '../../providers/
|
|
1
|
+
import type { PullRequestSearchResult as ProviderPullRequestSearchResult } from '../../providers/providerResults.js';
|
|
2
2
|
import type { z } from 'zod';
|
|
3
3
|
import type { GitHubPullRequestSearchQueryLocalSchema } from '../github_search_pull_requests/scheme.js';
|
|
4
4
|
import type { WithOptionalMeta } from '../../types/execution.js';
|
|
@@ -27,7 +27,7 @@ export declare function mapPullRequestToolQuery(query: PartialPRQuery): {
|
|
|
27
27
|
comments: string;
|
|
28
28
|
reactions: string;
|
|
29
29
|
draft: boolean;
|
|
30
|
-
match: ("
|
|
30
|
+
match: ("title" | "comments" | "body")[];
|
|
31
31
|
checks: "success" | "pending" | "failure";
|
|
32
32
|
review: "none" | "required" | "approved" | "changes_requested";
|
|
33
33
|
archived: boolean | undefined;
|
|
@@ -35,6 +35,14 @@ export declare function mapPullRequestToolQuery(query: PartialPRQuery): {
|
|
|
35
35
|
filePage: number;
|
|
36
36
|
commentPage: number;
|
|
37
37
|
commitPage: number;
|
|
38
|
+
reviewPage: number;
|
|
39
|
+
collectionPages: {
|
|
40
|
+
changedFiles?: number;
|
|
41
|
+
discussion?: number;
|
|
42
|
+
inline?: number;
|
|
43
|
+
reviews?: number;
|
|
44
|
+
commits?: number;
|
|
45
|
+
};
|
|
38
46
|
itemsPerPage: number;
|
|
39
47
|
sort: "created" | "updated" | "best-match" | "comments" | "reactions" | undefined;
|
|
40
48
|
order: "asc" | "desc" | undefined;
|
|
@@ -58,6 +66,7 @@ export declare function mapPullRequestProviderResultData(data: ProviderPullReque
|
|
|
58
66
|
patch?: string;
|
|
59
67
|
}[];
|
|
60
68
|
reviewSummary: {
|
|
69
|
+
countScope?: string;
|
|
61
70
|
totalComments: number;
|
|
62
71
|
inlineComments: number;
|
|
63
72
|
discussionComments: number;
|
|
@@ -68,10 +77,19 @@ export declare function mapPullRequestProviderResultData(data: ProviderPullReque
|
|
|
68
77
|
themes: string[];
|
|
69
78
|
};
|
|
70
79
|
commits: {
|
|
80
|
+
filesCollectionState?: import("../../github/prContentFetcher/collectionPaging.js").CollectionState;
|
|
71
81
|
sha: string;
|
|
72
82
|
message: string;
|
|
73
83
|
author: string;
|
|
74
84
|
date: string;
|
|
85
|
+
files?: Array<{
|
|
86
|
+
filename: string;
|
|
87
|
+
status: string;
|
|
88
|
+
additions: number;
|
|
89
|
+
deletions: number;
|
|
90
|
+
changes?: number;
|
|
91
|
+
patch?: string;
|
|
92
|
+
}>;
|
|
75
93
|
}[];
|
|
76
94
|
reviews: {
|
|
77
95
|
id: string;
|
|
@@ -99,7 +117,7 @@ export declare function mapPullRequestProviderResultData(data: ProviderPullReque
|
|
|
99
117
|
line?: number;
|
|
100
118
|
in_reply_to_id?: number;
|
|
101
119
|
}[];
|
|
102
|
-
state: "
|
|
120
|
+
state: "closed" | "open" | "merged";
|
|
103
121
|
draft: boolean;
|
|
104
122
|
author: string;
|
|
105
123
|
assignees: string[];
|
|
@@ -123,9 +141,11 @@ export declare function mapPullRequestProviderResultData(data: ProviderPullReque
|
|
|
123
141
|
hasMore: boolean;
|
|
124
142
|
nextCharOffset?: number;
|
|
125
143
|
};
|
|
126
|
-
number: number;
|
|
127
144
|
title: string;
|
|
128
145
|
body: string;
|
|
146
|
+
providerLimits?: import("../../github/githubAPI.js").PRProviderLimit[];
|
|
147
|
+
collectionStates?: Partial<Record<import("../../github/prContentFetcher/collectionPaging.js").CollectionSurface, import("../../github/prContentFetcher/collectionPaging.js").CollectionState>>;
|
|
148
|
+
number: number;
|
|
129
149
|
}[];
|
|
130
150
|
resultData: Record<string, unknown>;
|
|
131
151
|
pagination: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RepoSearchResult as ProviderRepoSearchResult } from '../../providers/
|
|
1
|
+
import type { RepoSearchResult as ProviderRepoSearchResult } from '../../providers/providerResults.js';
|
|
2
2
|
import type { z } from 'zod';
|
|
3
|
-
import type { GitHubReposSearchSingleQuerySchema } from '../../toolContract/
|
|
3
|
+
import type { GitHubReposSearchSingleQuerySchema } from '../../toolContract/input/resources/tools/githubRepositoriesOperation.js';
|
|
4
4
|
import type { GitHubRepositoryOutput } from '@octocodeai/octocode-core/extra-types';
|
|
5
5
|
import type { WithOptionalMeta } from '../../types/execution.js';
|
|
6
6
|
type GitHubReposSearchSingleQuery = z.infer<typeof GitHubReposSearchSingleQuerySchema>;
|
|
@@ -18,8 +18,8 @@ export declare function mapRepoSearchToolQuery(query: WithOptionalMeta<GitHubRep
|
|
|
18
18
|
license: string | undefined;
|
|
19
19
|
forks: string | undefined;
|
|
20
20
|
goodFirstIssues: string | undefined;
|
|
21
|
-
match: ("
|
|
22
|
-
sort: "
|
|
21
|
+
match: ("description" | "name" | "readme")[];
|
|
22
|
+
sort: "stars" | "updated" | "forks" | "help-wanted-issues" | "best-match";
|
|
23
23
|
limit: number | undefined;
|
|
24
24
|
page: number;
|
|
25
25
|
goal: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RepoStructureResult as ProviderRepoStructureResult } from '../../providers/
|
|
1
|
+
import type { RepoStructureResult as ProviderRepoStructureResult } from '../../providers/providerResults.js';
|
|
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 { WithOptionalMeta } from '../../types/execution.js';
|
|
5
5
|
type GitHubViewRepoStructureQuery = z.infer<typeof GitHubViewRepoStructureQuerySchema>;
|
|
6
6
|
type PartialRepoStructureQuery = WithOptionalMeta<GitHubViewRepoStructureQuery>;
|
|
@@ -16,8 +16,9 @@ export declare function mapRepoStructureToolQuery(query: PartialRepoStructureQue
|
|
|
16
16
|
includeContributors: boolean;
|
|
17
17
|
includeBranches: boolean;
|
|
18
18
|
includeTags: boolean;
|
|
19
|
+
metadataPage: number;
|
|
19
20
|
goal: string;
|
|
20
21
|
reasoning: string;
|
|
21
22
|
};
|
|
22
|
-
export declare function mapRepoStructureProviderResult(data: ProviderRepoStructureResult,
|
|
23
|
+
export declare function mapRepoStructureProviderResult(data: ProviderRepoStructureResult, query: PartialRepoStructureQuery, filteredStructure: ProviderRepoStructureResult['structure'], resolvedBranch: string): Record<string, unknown>;
|
|
23
24
|
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type AvailabilityConfig = {
|
|
2
|
+
local: {
|
|
3
|
+
enabled: boolean;
|
|
4
|
+
enableClone: boolean;
|
|
5
|
+
};
|
|
6
|
+
storage: {
|
|
7
|
+
mode: string;
|
|
8
|
+
};
|
|
9
|
+
tools: {
|
|
10
|
+
enabled?: string[] | null;
|
|
11
|
+
disabled?: string[] | null;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
/** Shared by discovery and executable follow-ups; importing it needs no engine. */
|
|
15
|
+
export declare function getToolAvailability(name: string, config?: AvailabilityConfig): {
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
envVar?: string;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { type ToolConfig
|
|
2
|
-
export type { ToolConfig, ToolDirectExecutionConfig, ToolDirectSecurity };
|
|
3
|
-
export type { ToolInvocationCallback } from '../types/toolResults.js';
|
|
1
|
+
import { type ToolConfig } from './toolCatalogFactory.js';
|
|
4
2
|
export declare const GITHUB_SEARCH: ToolConfig;
|
|
5
3
|
export declare const GITHUB_FETCH_CONTENT: ToolConfig;
|
|
6
4
|
export declare const GITHUB_SEARCH_HISTORY: ToolConfig;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type * as NativeContextUtils from '@octocodeai/octocode-engine';
|
|
2
|
-
export type { ExtractMatchingLinesOptions, ExtractMatchingLinesResult, FilterPatchOptions, FileSystemEntry, FileSystemQueryOptions, FileSystemQueryResult, GraphFactCapability, GraphFactCall, GraphFactDeclaration, GraphFactEdge, GraphFactExport, GraphFactImport, GraphFacts, GraphFactsScanEntry, GraphFactsScanOptions, GraphFactsScanResult, GraphReferenceCount, LineDiffOp, MinifyResult, JsonInput, RipgrepParseOptions, RipgrepParseResult, RipgrepSearchOptions, SliceContentOptions, SliceContentResult, StructuralMatch, YamlConversionConfig, } from '@octocodeai/octocode-engine';
|
|
3
2
|
type NativeContextUtilsModule = typeof NativeContextUtils;
|
|
4
3
|
type NativeLoader = () => NativeContextUtilsModule;
|
|
5
4
|
export declare class ContextUtilsLoadError extends Error {
|
|
@@ -73,3 +72,4 @@ export declare const contextUtils: {
|
|
|
73
72
|
sliceContent(content: string, charOffset: number, charLength: number, options?: NativeContextUtils.SliceContentOptions | null): NativeContextUtils.SliceContentResult;
|
|
74
73
|
readonly SIGNATURES_ONLY_HINT: string;
|
|
75
74
|
};
|
|
75
|
+
export {};
|
|
@@ -19,8 +19,6 @@ export interface ExecOptions {
|
|
|
19
19
|
*/
|
|
20
20
|
tolerateOutputLimit?: boolean;
|
|
21
21
|
}
|
|
22
|
-
/** Canonical pagination type — single source in types/toolResults.ts. */
|
|
23
|
-
export type { PaginationInfo } from '../../types/toolResults.js';
|
|
24
22
|
export interface SearchStats {
|
|
25
23
|
totalOccurrences?: number;
|
|
26
24
|
totalStructuralMatches?: number;
|
package/dist/utils/exec/npm.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Locate npm's builtin configuration without invoking or reading credentials. */
|
|
2
|
+
export declare function resolveNpmConfigRoot(): string;
|
|
1
3
|
declare const ALLOWED_NPM_COMMANDS: readonly ["view", "search", "ping", "config", "whoami"];
|
|
2
4
|
type NpmCommand = (typeof ALLOWED_NPM_COMMANDS)[number];
|
|
3
5
|
type NpmExecOptions = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { SliceContentOptions, SliceContentResult } from '@octocodeai/octocode-engine';
|
|
2
2
|
export declare function byteSlice(content: string, byteStart: number, byteEnd: number): string;
|
|
3
3
|
export declare function byteToCharIndex(content: string, byteOffset: number): number;
|
|
4
4
|
export declare function charToByteIndex(content: string, charIndex: number): number;
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
import { checkNpmDeprecation } from './npm.js';
|
|
2
1
|
import type { NpmSearchAPIResult, NpmSearchError, NpmSearchInput } from './types.js';
|
|
3
|
-
export type { DeprecationInfo, MinimalPackageResult, NpmPackageResult, PackageResult, NpmSearchAPIResult, NpmSearchError, NpmSearchInput, } from './types.js';
|
|
4
2
|
export declare function searchPackage(query: NpmSearchInput): Promise<NpmSearchAPIResult | NpmSearchError>;
|
|
5
|
-
export { checkNpmDeprecation };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { DeprecationInfo, NpmSearchAPIResult, NpmSearchError } from '../types.js';
|
|
2
2
|
export declare function isExactPackageName(query: string): boolean;
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function searchNpmPackage(packageName: string, limit: number, fetchMetadata: boolean, from?: number): Promise<NpmSearchAPIResult | NpmSearchError>;
|
|
3
|
+
export declare function searchNpmPackage(packageName: string, limit: number, fetchMetadata: boolean, from?: number, mode?: 'exact' | 'keywords', registryOverride?: string): Promise<NpmSearchAPIResult | NpmSearchError>;
|
|
5
4
|
export declare function checkNpmDeprecation(packageName: string): Promise<DeprecationInfo | null>;
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export declare function
|
|
4
|
-
lastPublished?: string;
|
|
5
|
-
rawResponseChars: number;
|
|
6
|
-
}>;
|
|
7
|
-
export type PackageDetailsLookupResult = {
|
|
8
|
-
pkg: NpmPackageResult | null;
|
|
9
|
-
errorDetail?: string;
|
|
10
|
-
rawResponseChars: number;
|
|
11
|
-
};
|
|
12
|
-
export declare function enrichPackageDetails(packageName: string, pkg: NpmPackageResult, rawResponseChars: number): Promise<PackageDetailsLookupResult>;
|
|
13
|
-
export declare function fetchPackageDetailsFromCdn(packageName: string, includeExtendedMetadata: boolean): Promise<PackageDetailsLookupResult>;
|
|
14
|
-
export declare function fetchPackageDetailsWithError(packageName: string, includeExtendedMetadata?: boolean): Promise<PackageDetailsLookupResult>;
|
|
15
|
-
export declare function fetchNpmPackageByView(packageName: string, fetchMetadata: boolean, allowCdnFallback?: boolean): Promise<NpmSearchAPIResult | NpmSearchError>;
|
|
1
|
+
import type { NpmSearchAPIResult, NpmSearchError } from '../types.js';
|
|
2
|
+
import { type NpmRegistryContext } from './npmRegistry.js';
|
|
3
|
+
export declare function fetchNpmPackage(packageName: string, fetchMetadata: boolean, context: NpmRegistryContext): Promise<NpmSearchAPIResult | NpmSearchError>;
|
|
@@ -2,10 +2,6 @@ import type { NpmPackageResult } from '../types.js';
|
|
|
2
2
|
import type { NpmCliSearchItem, NpmViewResult } from './npmRegistry.js';
|
|
3
3
|
export declare function cleanRepoUrl(url: string): string;
|
|
4
4
|
export declare function countRawPayloadChars(raw: unknown): number;
|
|
5
|
-
export declare function fetchWeeklyDownloads(packageName: string): Promise<{
|
|
6
|
-
downloads?: number;
|
|
7
|
-
rawResponseChars: number;
|
|
8
|
-
}>;
|
|
9
5
|
export declare function mapToResult(data: NpmViewResult, includeExtendedMetadata?: boolean, source?: 'cli' | 'registry' | 'cdn'): NpmPackageResult;
|
|
10
6
|
export declare function mapSearchItemToResult(item: NpmCliSearchItem): NpmPackageResult | null;
|
|
11
7
|
export declare function encodeRegistryPackageName(packageName: string): string;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export declare const DEFAULT_NPM_REGISTRY = "https://registry.npmjs.org";
|
|
2
|
+
export interface NpmRegistryContext {
|
|
3
|
+
registry: string;
|
|
4
|
+
cacheIdentity: string;
|
|
5
|
+
options: Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
export declare function resolveNpmRegistryContext(packageName?: string, override?: string): Promise<NpmRegistryContext>;
|
|
2
8
|
export declare function getNpmRegistryUrl(): Promise<string>;
|
|
3
|
-
export declare function
|
|
9
|
+
export declare function fetchNpmRegistryJson(context: NpmRegistryContext, path: string): Promise<unknown>;
|
|
4
10
|
export declare function checkNpmRegistryReachable(): Promise<boolean>;
|
|
5
11
|
export interface NpmViewResult {
|
|
6
12
|
name: string;
|
|
@@ -46,6 +52,8 @@ export interface NpmRegistrySearchItem {
|
|
|
46
52
|
name: string | null | undefined;
|
|
47
53
|
version: string | null | undefined;
|
|
48
54
|
description?: string | null;
|
|
55
|
+
license?: string;
|
|
56
|
+
date?: string;
|
|
49
57
|
links?: {
|
|
50
58
|
npm?: string | null;
|
|
51
59
|
homepage?: string | null;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import type { NpmSearchAPIResult, NpmSearchError } from '../types.js';
|
|
2
|
-
|
|
3
|
-
export declare function searchNpmPackageViaRegistrySearch(keywords: string, limit: number, fetchMetadata: boolean, from
|
|
4
|
-
export declare function searchNpmPackageViaWebSearch(packageName: string, limit: number): Promise<NpmSearchAPIResult | NpmSearchError>;
|
|
5
|
-
export declare function searchNpmPackageViaSearch(keywords: string, limit: number, fetchMetadata: boolean, from?: number): Promise<NpmSearchAPIResult | NpmSearchError>;
|
|
6
|
-
export declare function enrichTopSearchResult(result: NpmSearchAPIResult): Promise<NpmSearchAPIResult>;
|
|
2
|
+
import { type NpmRegistryContext } from './npmRegistry.js';
|
|
3
|
+
export declare function searchNpmPackageViaRegistrySearch(keywords: string, limit: number, fetchMetadata: boolean, from: number, context: NpmRegistryContext): Promise<NpmSearchAPIResult | NpmSearchError>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export interface NpmSearchInput {
|
|
2
2
|
name: string;
|
|
3
|
+
registry?: string;
|
|
4
|
+
mode: 'exact' | 'keywords';
|
|
3
5
|
itemsPerPage?: number;
|
|
4
6
|
page?: number;
|
|
5
7
|
goal?: string;
|
|
@@ -44,6 +46,7 @@ export interface NpmPackageResult {
|
|
|
44
46
|
}
|
|
45
47
|
export type PackageResult = MinimalPackageResult | NpmPackageResult;
|
|
46
48
|
export interface NpmSearchAPIResult {
|
|
49
|
+
registry?: string;
|
|
47
50
|
packages: PackageResult[];
|
|
48
51
|
totalFound: number;
|
|
49
52
|
rawResponseChars?: number;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
2
|
-
|
|
2
|
+
/** Internal transport projection; never a tool-input or global runtime setting. */
|
|
3
|
+
export type CallToolResultProjection = 'full' | 'structured';
|
|
4
|
+
export declare function sanitizeCallToolResult(result: CallToolResult, projection?: CallToolResultProjection): CallToolResult;
|
|
3
5
|
export declare function buildToolErrorResult(toolName: string, error: unknown): CallToolResult;
|
package/package.json
CHANGED
|
@@ -1,34 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octocodeai/octocode-tools-core",
|
|
3
3
|
"description": "Core tool implementations for Octocode: GitHub, local filesystem, LSP, and package search tools.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "19.1.0",
|
|
5
5
|
"author": "Guy Bary <bgauryy@octocodeai.com>",
|
|
6
6
|
"bugs": "https://github.com/bgauryy/octocode/issues",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
9
|
-
"@
|
|
9
|
+
"@npmcli/config": "^11.0.1",
|
|
10
|
+
"@octocodeai/agent-contracts": "0.1.0",
|
|
11
|
+
"@octocodeai/config": "19.1.0",
|
|
10
12
|
"@octocodeai/octocode-core": "18.3.0",
|
|
11
|
-
"@octocodeai/octocode-engine": "
|
|
12
|
-
"@octokit/oauth-methods": "^6.0.
|
|
13
|
-
"@octokit/
|
|
14
|
-
"@octokit/
|
|
13
|
+
"@octocodeai/octocode-engine": "19.1.0",
|
|
14
|
+
"@octokit/oauth-methods": "^6.0.5",
|
|
15
|
+
"@octokit/openapi-types": "^29.0.1",
|
|
16
|
+
"@octokit/plugin-rest-endpoint-methods": "^18.0.0",
|
|
17
|
+
"@octokit/plugin-throttling": "^11.0.5",
|
|
18
|
+
"@octokit/request": "^10.0.16",
|
|
15
19
|
"node-cache": "^5.1.2",
|
|
20
|
+
"npm-registry-fetch": "^20.0.1",
|
|
16
21
|
"octokit": "^5.0.5",
|
|
17
|
-
"zod": "^4.4
|
|
22
|
+
"zod": "^4.5.4"
|
|
18
23
|
},
|
|
19
24
|
"devDependencies": {
|
|
20
|
-
"@octokit/core": "^7.0.
|
|
21
|
-
"@
|
|
22
|
-
"@
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"vitest": "^4.1.9"
|
|
25
|
+
"@octokit/core": "^7.0.8",
|
|
26
|
+
"@types/node": "^26.4.1",
|
|
27
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
28
|
+
"esbuild": "^0.28.2",
|
|
29
|
+
"eslint": "^10.10.0",
|
|
30
|
+
"typescript": "^6.0.3",
|
|
31
|
+
"vite": "^8.2.2",
|
|
32
|
+
"vitest": "^4.1.11"
|
|
29
33
|
},
|
|
30
34
|
"engines": {
|
|
31
|
-
"node": ">=
|
|
35
|
+
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
|
|
32
36
|
},
|
|
33
37
|
"exports": {
|
|
34
38
|
".": {
|
|
@@ -92,8 +96,8 @@
|
|
|
92
96
|
"directory": "packages/octocode-tools-core"
|
|
93
97
|
},
|
|
94
98
|
"scripts": {
|
|
95
|
-
"build": "yarn readme:sync && yarn clean && node
|
|
96
|
-
"build:dev": "yarn readme:sync && node
|
|
99
|
+
"build": "yarn readme:sync && yarn clean && node ../../scripts/esbuild-package.mjs && yarn build:types-deps && tsc --emitDeclarationOnly -p tsconfig.build.json",
|
|
100
|
+
"build:dev": "yarn readme:sync && node ../../scripts/esbuild-package.mjs && yarn build:types-deps && tsc --emitDeclarationOnly -p tsconfig.build.json",
|
|
97
101
|
"build:types-deps": "yarn workspace @octocodeai/config build",
|
|
98
102
|
"clean": "rm -rf dist/",
|
|
99
103
|
"lint": "eslint src",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { redactPath } from '@octocodeai/octocode-engine/pathUtils';
|
package/dist/github/issues.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { getOwnerQualifier } from './queryBuilders/base.js';
|
|
2
|
-
export { buildCodeSearchQuery, buildRepoSearchQuery, } from './queryBuilders/codeAndRepo.js';
|
|
3
|
-
export { buildPullRequestSearchQuery, shouldUseSearchForPRs, } from './queryBuilders/pullRequests.js';
|
|
4
|
-
export { buildIssueSearchQuery, shouldUseSearchForIssues, type IssueSearchParams, } from './queryBuilders/issues.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { viewGitHubRepositoryStructureAPI } from './repoStructure/fetchOrchestration.js';
|
package/dist/shared/index.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export type { LanguageSelectorKind, LanguageSelector, } from './languageSelectors/data.js';
|
|
2
|
-
export { classifyLanguageSelector, toGithubCodeLanguageParams, toLocalSearchLanguageParams, toLocalFileLanguageGlobs, toStructuralSearchIncludeGlobs, toGithubRepositoryLanguage, } from './languageSelectors/classify.js';
|
|
3
|
-
export type { GithubCodeLanguageParams, LocalSearchLanguageParams, } from './languageSelectors/classify.js';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Internal input-schema primitives owned by tools-core.
|
|
3
|
-
*
|
|
4
|
-
* Public canonical schemas are exported from each direct tool's scheme and
|
|
5
|
-
* assembled by the direct-tool catalog. This barrel intentionally has no
|
|
6
|
-
* second tool-name registry.
|
|
7
|
-
*/
|
|
8
|
-
export { baseSchema, baseSchemaDescriptions, toolNames, } from './input/resources/global.js';
|
|
9
|
-
export type { BaseSchemaShape } from './input/resources/global.js';
|
|
10
|
-
export { getToolSchemaRelations } from './input/resources/toolRelations.js';
|
|
11
|
-
export { getToolSchemaVariants } from './input/resources/toolVariants.js';
|
|
12
|
-
export type { ToolSchemaVariant } from './input/resources/toolVariants.js';
|
|
13
|
-
export { MAX_CONTEXT_LINES, MAX_PAGE_NUMBER, MAX_CHAR_OFFSET, MAX_CHAR_LENGTH, MAX_LINE_NUMBER, MAX_ORDER_HINT, MAX_LOCAL_DEPTH, MAX_FIND_DEPTH, MAX_LOCAL_LIMIT, MAX_LOCAL_ITEMS_PER_PAGE, MAX_GITHUB_SEARCH_LIMIT, DEFAULT_GITHUB_SEARCH_LIMIT, MAX_GITHUB_STRUCTURE_ITEMS_PER_PAGE, DEFAULT_GITHUB_STRUCTURE_ITEMS_PER_PAGE, MAX_PR_ITEMS_PER_PAGE, DEFAULT_PR_ITEMS_PER_PAGE, MAX_MATCH_CONTENT_LENGTH, DEFAULT_MATCH_CONTENT_LENGTH, MAX_MATCH_COUNT, MAX_SEARCH_ITEMS_PER_PAGE, MAX_LSP_DEPTH, MAX_LSP_ITEMS_PER_PAGE, MAX_GITHUB_STRUCTURE_DEPTH, } from './input/resources/tools/_toolkit.js';
|
|
14
|
-
export { GitHubSearchQuerySchema } from './input/resources/tools/ghSearch.js';
|
|
15
|
-
export { GitHubCodeSearchQuerySchema } from './input/resources/tools/githubCodeOperation.js';
|
|
16
|
-
export { FileContentQuerySchema } from './input/resources/tools/ghGetFileContent.js';
|
|
17
|
-
export { GitHubViewRepoStructureQuerySchema } from './input/resources/tools/githubTreeOperation.js';
|
|
18
|
-
export { GitHubReposSearchSingleQuerySchema } from './input/resources/tools/githubRepositoriesOperation.js';
|
|
19
|
-
export { GitHubPullRequestSearchQuerySchema } from './input/resources/tools/githubHistorySchema.js';
|
|
20
|
-
export { SearchPullRequestsQuerySchema } from './input/resources/tools/historyPullRequestInput.js';
|
|
21
|
-
export { SearchIssuesQuerySchema } from './input/resources/tools/historyIssueInput.js';
|
|
22
|
-
export { SearchCommitsQuerySchema } from './input/resources/tools/historyCommitInput.js';
|
|
23
|
-
export { NpmPackageQuerySchema } from './input/resources/tools/npmSearch.js';
|
|
24
|
-
export { CloneRepoQuerySchema } from './input/resources/tools/ghCloneRepo.js';
|
|
25
|
-
export { LocalSearchQuerySchema } from './input/resources/tools/localSearch.js';
|
|
26
|
-
export { RipgrepQuerySchema } from './input/resources/tools/localTextOperation.js';
|
|
27
|
-
export { ViewStructureQuerySchema } from './input/resources/tools/localTreeOperation.js';
|
|
28
|
-
export { FindFilesQuerySchema } from './input/resources/tools/localFilesOperation.js';
|
|
29
|
-
export { LocalAnalyzeGraphQuerySchema } from './input/resources/tools/localAnalyzeGraph.js';
|
|
30
|
-
export { FetchContentQuerySchema } from './input/resources/tools/localGetFileContent.js';
|
|
31
|
-
export { LspGetSemanticsQuerySchema } from './input/resources/tools/lspGetSemantics.js';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Direct-tool catalog barrel (P3). The catalog is split so the schema/help path
|
|
3
|
-
* never loads the native engine:
|
|
4
|
-
* - `directToolCatalog.meta.ts` — engine-free definitions, schema text,
|
|
5
|
-
* display fields, input preparation (also exposed via the `/schema` subpath).
|
|
6
|
-
* - `directToolCatalog.exec.ts` — `executeDirectTool` + the engine/runtime.
|
|
7
|
-
*
|
|
8
|
-
* This barrel preserves the historical `@octocodeai/octocode-tools-core/direct`
|
|
9
|
-
* surface (meta + executeDirectTool). Importing it still eagerly loads the engine
|
|
10
|
-
* (via the exec module) — execution consumers want that. Pure schema/help/
|
|
11
|
-
* `--scheme`/`context` callers must import from `/schema` (meta only) instead, so
|
|
12
|
-
* they run on engine-less runtimes.
|
|
13
|
-
*/
|
|
14
|
-
export * from './directToolCatalog.meta.js';
|
|
15
|
-
export { executeDirectTool } from './directToolCatalog.exec.js';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Engine-free direct-tool catalog metadata (P3).
|
|
3
|
-
*
|
|
4
|
-
* This module holds EVERYTHING the schema/help/`--scheme`/`context` paths need
|
|
5
|
-
* — tool definitions (name + display/bulk zod schemas), schema-text formatters,
|
|
6
|
-
* display-field extraction, example builders, and input preparation — WITHOUT
|
|
7
|
-
* importing `@octocodeai/octocode-engine` (no native `.node` load at module
|
|
8
|
-
* eval). The schemas are sourced from each tool's engine-free `scheme.ts`, the
|
|
9
|
-
* same modules `toolConfig.ts` consumes, so the two cannot drift on shape (a
|
|
10
|
-
* drift test asserts name/schema parity against the runtime `ALL_TOOLS`).
|
|
11
|
-
*
|
|
12
|
-
* The execution path (`executeDirectTool`) lives in `directToolCatalog.exec.ts`,
|
|
13
|
-
* which DOES import the engine; it is only reached when a tool actually runs.
|
|
14
|
-
* The `@octocodeai/octocode-tools-core/schema` subpath re-exports only this
|
|
15
|
-
* module so engine-less runtimes (e.g. Codex.app Node) can read schemas.
|
|
16
|
-
*
|
|
17
|
-
* This file is a thin barrel — the implementation is split across sibling
|
|
18
|
-
* modules under `./directToolCatalog/` (registry/helpers, schema
|
|
19
|
-
* introspection, command-pattern construction, and input preparation) purely
|
|
20
|
-
* to keep each file under the repo's max-lines lint budget. No consumer
|
|
21
|
-
* should need to import those sibling modules directly; import from here.
|
|
22
|
-
*/
|
|
23
|
-
export * from './directToolCatalog/toolCatalogDefinitions.js';
|
|
24
|
-
export * from './directToolCatalog/toolCatalogFormatters.js';
|
|
25
|
-
export * from './directToolCatalog/toolSchemaIntrospection.js';
|
|
26
|
-
export * from './directToolCatalog/toolCommandPatterns.js';
|
|
27
|
-
export * from './directToolCatalog/toolInputPreparation.js';
|
|
28
|
-
export * from './directToolCatalog/toolSchemaRelations.js';
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { GitHubRepositoryOutput } from '@octocodeai/octocode-core/extra-types';
|
|
2
|
-
import type { PartialReposSearchQuery } from './queryVariants.js';
|
|
3
|
-
export declare function deduplicateRepositories(repositories: GitHubRepositoryOutput[]): GitHubRepositoryOutput[];
|
|
4
|
-
export declare function rankRepositoriesByRelevance(repositories: readonly GitHubRepositoryOutput[], query: PartialReposSearchQuery): GitHubRepositoryOutput[];
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tier 1 — within-source language-aware ranking for local text search.
|
|
3
|
-
*
|
|
4
|
-
* Replaces "more matches first, then path" with a stable, inspectable relevance
|
|
5
|
-
* score. See `.octocode/RANKING-ARCHITECTURE.md`.
|
|
6
|
-
*
|
|
7
|
-
* Hard rules (Tier 1 determinism):
|
|
8
|
-
* - Same inputs -> same ranking. No LLM, no clock, no randomness, no
|
|
9
|
-
* filesystem-order dependency.
|
|
10
|
-
* - Every score is explainable from explicit features (`debugRanking`).
|
|
11
|
-
* - Sort is total: score desc -> raw matchCount desc -> path asc.
|
|
12
|
-
* - Profile selection is deterministic from query + file path; unknown
|
|
13
|
-
* languages fall back to the generic profile.
|
|
14
|
-
*
|
|
15
|
-
* Not rigid: profiles are declarative tables, all weights live in one policy
|
|
16
|
-
* object, new languages register by adding a profile. AST/LSP signals (Phase
|
|
17
|
-
* 2/3) layer on top without changing this contract.
|
|
18
|
-
*
|
|
19
|
-
* This file is a thin barrel: the implementation lives in `rankingProfile/`,
|
|
20
|
-
* split by concern —
|
|
21
|
-
* - `rankingProfile/rankingProfiles.ts`: profile data/config (language
|
|
22
|
-
* tables, path-role regexes, `selectProfile`/`classifyPathRole`).
|
|
23
|
-
* - `rankingProfile/rankingScoring.ts`: the scoring engine (`bestLineScore`,
|
|
24
|
-
* `pathAffinityScore`, `candidateTermRarityScore`, `scoreFileWithRarity`).
|
|
25
|
-
* - `rankingProfile/rankingResults.ts`: `rankFiles`/`RankResult` orchestration.
|
|
26
|
-
* - `rankingProfile/rankingLexical.ts`: shared pure lexical helpers.
|
|
27
|
-
* Re-exported here so no other module needs to change its import path.
|
|
28
|
-
*/
|
|
29
|
-
export type { RankingProfileId, RankSort, PathRole, RankingProfile, } from './rankingProfile/rankingProfiles.js';
|
|
30
|
-
export { RANKING_PROFILE_IDS, RANK_WEIGHTS, RANK_CANDIDATE_CAP, COMMENT_LINE, HEADING_LINE, LOW_SIGNAL_PATH, EXT_RE, fileExtension, selectProfile, classifyPathRole, isLowSignalQueryPath, } from './rankingProfile/rankingProfiles.js';
|
|
31
|
-
export type { RankContext, FileScore, } from './rankingProfile/rankingScoring.js';
|
|
32
|
-
export { buildCandidateTermRarity, scoreFileWithRarity, scoreFile, } from './rankingProfile/rankingScoring.js';
|
|
33
|
-
export type { RankResult } from './rankingProfile/rankingResults.js';
|
|
34
|
-
export { rankFiles } from './rankingProfile/rankingResults.js';
|
|
35
|
-
export { matchesAny, escapeRegex, isPlainIdentifierKeyword, matchedLineOf, lexicalCategoryOf, isIndexInsideString, } from './rankingProfile/rankingLexical.js';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
export { DEFAULT_SYMBOLS_PER_PAGE, DEFAULT_LOCATIONS_PER_PAGE, DEFAULT_CALLS_PER_PAGE, type PaginationInfo, emptyCategoryForReason, failedAnchorEnvelope, emptyEnvelope, paginateItems, } from './semanticEnvelopes/envelopeHelpers.js';
|
|
2
|
-
export { locationsEnvelope, referencesEnvelope, hoverEnvelope, buildReferencesByFile, normalizeHover, stringifyHoverPart, } from './semanticEnvelopes/locationEnvelopes.js';
|
|
3
|
-
export { callsEnvelope, typeHierarchyEnvelope, } from './semanticEnvelopes/callEnvelopes.js';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Barrel for the semanticFileOps/ split (anchor & workspace resolution vs.
|
|
3
|
-
* documentSymbols vs. workspaceSymbols/diagnostics operations). Kept so no
|
|
4
|
-
* other file in the repo needs to change its import path.
|
|
5
|
-
*/
|
|
6
|
-
export { isNativeJsTsFile, throwLspUnavailable, toLocalPath, workspaceSymbolAnchorExtensions, workspaceSymbolAnchorIncludeGlobs, findWorkspaceSymbolAnchorByName, resolveWorkspaceSymbolAnchor, lspErrorMessage, nativeDocumentSymbols, } from './semanticFileOps/anchor.js';
|
|
7
|
-
export { type CompactSymbol, getDocumentSymbols, flattenDocumentSymbols, flattenDocumentSymbol, getSymbolRange, isLspRange, isPosition, countTopLevelDocumentSymbols, countBy, } from './semanticFileOps/documentSymbols.js';
|
|
8
|
-
export { getWorkspaceSymbols, compactWorkspaceSymbols, getFileDiagnostics, extractDiagnostics, parseDiagnostic, } from './semanticFileOps/workspaceSymbolsAndDiagnostics.js';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Barrel re-exporting the provider<->tool mapping helpers, split by domain
|
|
3
|
-
* under ./providerMappers/*. Kept as a thin re-export so existing imports
|
|
4
|
-
* from '../providerMappers.js' (and `export *` from src/index.ts) continue
|
|
5
|
-
* to resolve without any consumer changes.
|
|
6
|
-
*/
|
|
7
|
-
export * from './providerMappers/codeSearch.js';
|
|
8
|
-
export * from './providerMappers/repoSearch.js';
|
|
9
|
-
export * from './providerMappers/pullRequests.js';
|
|
10
|
-
export * from './providerMappers/fileContent.js';
|
|
11
|
-
export * from './providerMappers/repoStructure.js';
|