@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
|
@@ -2,7 +2,16 @@ import { z } from 'zod';
|
|
|
2
2
|
export type LocalTextResultView = 'paginated' | 'discovery' | 'detailed' | 'content' | 'files' | 'filesWithout' | 'countLines' | 'countMatches' | 'matchOnly';
|
|
3
3
|
export declare function toLegacyTextQuery(query: Record<string, unknown>, resultView: LocalTextResultView): Record<string, unknown>;
|
|
4
4
|
export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
5
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
6
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
5
7
|
path: z.ZodString;
|
|
8
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
9
|
+
contextLines: z.ZodOptional<z.ZodNumber>;
|
|
10
|
+
regex: z.ZodDefault<z.ZodEnum<{
|
|
11
|
+
fixed: "fixed";
|
|
12
|
+
smart: "smart";
|
|
13
|
+
perl: "perl";
|
|
14
|
+
}>>;
|
|
6
15
|
sort: z.ZodDefault<z.ZodEnum<{
|
|
7
16
|
path: "path";
|
|
8
17
|
created: "created";
|
|
@@ -11,18 +20,10 @@ export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
11
20
|
modified: "modified";
|
|
12
21
|
accessed: "accessed";
|
|
13
22
|
}>>;
|
|
14
|
-
goal: z.ZodOptional<z.ZodString>;
|
|
15
|
-
reasoning: z.ZodOptional<z.ZodString>;
|
|
16
|
-
page: z.ZodDefault<z.ZodNumber>;
|
|
17
23
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
18
24
|
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
regex: z.ZodDefault<z.ZodEnum<{
|
|
22
|
-
fixed: "fixed";
|
|
23
|
-
smart: "smart";
|
|
24
|
-
perl: "perl";
|
|
25
|
-
}>>;
|
|
25
|
+
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
|
+
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
26
27
|
caseMode: z.ZodDefault<z.ZodEnum<{
|
|
27
28
|
smart: "smart";
|
|
28
29
|
sensitive: "sensitive";
|
|
@@ -31,20 +32,18 @@ export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
31
32
|
wholeWord: z.ZodOptional<z.ZodBoolean>;
|
|
32
33
|
invertMatch: z.ZodOptional<z.ZodBoolean>;
|
|
33
34
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
|
-
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
35
35
|
noIgnore: z.ZodOptional<z.ZodBoolean>;
|
|
36
36
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
37
37
|
matchContentLength: z.ZodDefault<z.ZodNumber>;
|
|
38
38
|
maxMatchesPerFile: z.ZodOptional<z.ZodNumber>;
|
|
39
|
-
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
40
39
|
multiline: z.ZodDefault<z.ZodEnum<{
|
|
41
40
|
off: "off";
|
|
42
41
|
on: "on";
|
|
43
42
|
dotall: "dotall";
|
|
44
43
|
}>>;
|
|
45
44
|
rankingProfile: z.ZodDefault<z.ZodEnum<{
|
|
46
|
-
typescript: "typescript";
|
|
47
45
|
auto: "auto";
|
|
46
|
+
typescript: "typescript";
|
|
48
47
|
javascript: "javascript";
|
|
49
48
|
rust: "rust";
|
|
50
49
|
python: "python";
|
|
@@ -56,15 +55,16 @@ export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
56
55
|
yaml: "yaml";
|
|
57
56
|
generic: "generic";
|
|
58
57
|
}>>;
|
|
58
|
+
langType: z.ZodOptional<z.ZodString>;
|
|
59
59
|
matchPage: z.ZodOptional<z.ZodNumber>;
|
|
60
60
|
operation: z.ZodLiteral<"text">;
|
|
61
61
|
searchText: z.ZodString;
|
|
62
62
|
resultView: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
63
63
|
content: "content";
|
|
64
|
-
files: "files";
|
|
65
64
|
paginated: "paginated";
|
|
66
65
|
discovery: "discovery";
|
|
67
66
|
detailed: "detailed";
|
|
67
|
+
files: "files";
|
|
68
68
|
filesWithout: "filesWithout";
|
|
69
69
|
countLines: "countLines";
|
|
70
70
|
countMatches: "countMatches";
|
|
@@ -79,7 +79,11 @@ export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
79
79
|
}>>;
|
|
80
80
|
matchWindow: z.ZodOptional<z.ZodNumber>;
|
|
81
81
|
}, z.core.$strict>, z.ZodObject<{
|
|
82
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
83
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
82
84
|
path: z.ZodString;
|
|
85
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
86
|
+
contextLines: z.ZodOptional<z.ZodNumber>;
|
|
83
87
|
sort: z.ZodDefault<z.ZodEnum<{
|
|
84
88
|
path: "path";
|
|
85
89
|
created: "created";
|
|
@@ -88,23 +92,18 @@ export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
88
92
|
modified: "modified";
|
|
89
93
|
accessed: "accessed";
|
|
90
94
|
}>>;
|
|
91
|
-
goal: z.ZodOptional<z.ZodString>;
|
|
92
|
-
reasoning: z.ZodOptional<z.ZodString>;
|
|
93
|
-
page: z.ZodDefault<z.ZodNumber>;
|
|
94
95
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
95
96
|
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
96
|
-
langType: z.ZodOptional<z.ZodString>;
|
|
97
|
-
contextLines: z.ZodOptional<z.ZodNumber>;
|
|
98
|
-
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
99
97
|
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
98
|
+
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
100
100
|
noIgnore: z.ZodOptional<z.ZodBoolean>;
|
|
101
101
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
102
102
|
matchContentLength: z.ZodDefault<z.ZodNumber>;
|
|
103
103
|
maxMatchesPerFile: z.ZodOptional<z.ZodNumber>;
|
|
104
|
-
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
105
104
|
rankingProfile: z.ZodDefault<z.ZodEnum<{
|
|
106
|
-
typescript: "typescript";
|
|
107
105
|
auto: "auto";
|
|
106
|
+
typescript: "typescript";
|
|
108
107
|
javascript: "javascript";
|
|
109
108
|
rust: "rust";
|
|
110
109
|
python: "python";
|
|
@@ -116,6 +115,7 @@ export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
116
115
|
yaml: "yaml";
|
|
117
116
|
generic: "generic";
|
|
118
117
|
}>>;
|
|
118
|
+
langType: z.ZodOptional<z.ZodString>;
|
|
119
119
|
captureText: z.ZodOptional<z.ZodBoolean>;
|
|
120
120
|
matchPage: z.ZodOptional<z.ZodNumber>;
|
|
121
121
|
operation: z.ZodLiteral<"structural">;
|
|
@@ -128,7 +128,11 @@ export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
128
128
|
countMatches: "countMatches";
|
|
129
129
|
}>>>;
|
|
130
130
|
}, z.core.$strict>, z.ZodObject<{
|
|
131
|
+
goal: z.ZodOptional<z.ZodString>;
|
|
132
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
131
133
|
path: z.ZodString;
|
|
134
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
135
|
+
contextLines: z.ZodOptional<z.ZodNumber>;
|
|
132
136
|
sort: z.ZodDefault<z.ZodEnum<{
|
|
133
137
|
path: "path";
|
|
134
138
|
created: "created";
|
|
@@ -137,23 +141,18 @@ export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
137
141
|
modified: "modified";
|
|
138
142
|
accessed: "accessed";
|
|
139
143
|
}>>;
|
|
140
|
-
goal: z.ZodOptional<z.ZodString>;
|
|
141
|
-
reasoning: z.ZodOptional<z.ZodString>;
|
|
142
|
-
page: z.ZodDefault<z.ZodNumber>;
|
|
143
144
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
144
145
|
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
145
|
-
langType: z.ZodOptional<z.ZodString>;
|
|
146
|
-
contextLines: z.ZodOptional<z.ZodNumber>;
|
|
147
|
-
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
148
146
|
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
147
|
+
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
149
149
|
noIgnore: z.ZodOptional<z.ZodBoolean>;
|
|
150
150
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
151
151
|
matchContentLength: z.ZodDefault<z.ZodNumber>;
|
|
152
152
|
maxMatchesPerFile: z.ZodOptional<z.ZodNumber>;
|
|
153
|
-
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
154
153
|
rankingProfile: z.ZodDefault<z.ZodEnum<{
|
|
155
|
-
typescript: "typescript";
|
|
156
154
|
auto: "auto";
|
|
155
|
+
typescript: "typescript";
|
|
157
156
|
javascript: "javascript";
|
|
158
157
|
rust: "rust";
|
|
159
158
|
python: "python";
|
|
@@ -165,6 +164,7 @@ export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
165
164
|
yaml: "yaml";
|
|
166
165
|
generic: "generic";
|
|
167
166
|
}>>;
|
|
167
|
+
langType: z.ZodOptional<z.ZodString>;
|
|
168
168
|
captureText: z.ZodOptional<z.ZodBoolean>;
|
|
169
169
|
matchPage: z.ZodOptional<z.ZodNumber>;
|
|
170
170
|
operation: z.ZodLiteral<"structural">;
|
|
@@ -177,25 +177,25 @@ export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
177
177
|
countMatches: "countMatches";
|
|
178
178
|
}>>>;
|
|
179
179
|
}, z.core.$strict>, z.ZodObject<{
|
|
180
|
-
path: z.ZodString;
|
|
181
|
-
empty: z.ZodOptional<z.ZodBoolean>;
|
|
182
180
|
goal: z.ZodOptional<z.ZodString>;
|
|
183
181
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
182
|
+
path: z.ZodString;
|
|
184
183
|
page: z.ZodDefault<z.ZodNumber>;
|
|
184
|
+
time: z.ZodOptional<z.ZodObject<{
|
|
185
|
+
modifiedWithin: z.ZodOptional<z.ZodString>;
|
|
186
|
+
modifiedBefore: z.ZodOptional<z.ZodString>;
|
|
187
|
+
accessedWithin: z.ZodOptional<z.ZodString>;
|
|
188
|
+
}, z.core.$strip>>;
|
|
189
|
+
empty: z.ZodOptional<z.ZodBoolean>;
|
|
185
190
|
size: z.ZodOptional<z.ZodObject<{
|
|
186
191
|
greater: z.ZodOptional<z.ZodString>;
|
|
187
192
|
less: z.ZodOptional<z.ZodString>;
|
|
188
193
|
}, z.core.$strip>>;
|
|
189
194
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
190
|
-
names: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
191
195
|
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
192
196
|
minDepth: z.ZodOptional<z.ZodNumber>;
|
|
197
|
+
names: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
193
198
|
pathPattern: z.ZodOptional<z.ZodString>;
|
|
194
|
-
time: z.ZodOptional<z.ZodObject<{
|
|
195
|
-
modifiedWithin: z.ZodOptional<z.ZodString>;
|
|
196
|
-
modifiedBefore: z.ZodOptional<z.ZodString>;
|
|
197
|
-
accessedWithin: z.ZodOptional<z.ZodString>;
|
|
198
|
-
}, z.core.$strip>>;
|
|
199
199
|
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
200
200
|
entryType: z.ZodOptional<z.ZodEnum<{
|
|
201
201
|
f: "f";
|
|
@@ -208,26 +208,26 @@ export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
208
208
|
writable: "writable";
|
|
209
209
|
}>>;
|
|
210
210
|
detail: z.ZodDefault<z.ZodEnum<{
|
|
211
|
-
full: "full";
|
|
212
211
|
modified: "modified";
|
|
213
212
|
basic: "basic";
|
|
213
|
+
full: "full";
|
|
214
214
|
}>>;
|
|
215
215
|
operation: z.ZodLiteral<"files">;
|
|
216
216
|
pathRegex: z.ZodOptional<z.ZodString>;
|
|
217
217
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
218
218
|
sort: z.ZodDefault<z.ZodEnum<{
|
|
219
|
-
name: "name";
|
|
220
219
|
path: "path";
|
|
220
|
+
name: "name";
|
|
221
221
|
size: "size";
|
|
222
222
|
modified: "modified";
|
|
223
223
|
}>>;
|
|
224
224
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
225
225
|
}, z.core.$strict>, z.ZodObject<{
|
|
226
|
-
path: z.ZodString;
|
|
227
|
-
reverse: z.ZodOptional<z.ZodBoolean>;
|
|
228
226
|
goal: z.ZodOptional<z.ZodString>;
|
|
229
227
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
228
|
+
path: z.ZodString;
|
|
230
229
|
page: z.ZodDefault<z.ZodNumber>;
|
|
230
|
+
reverse: z.ZodOptional<z.ZodBoolean>;
|
|
231
231
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
232
232
|
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
233
233
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -237,24 +237,24 @@ export declare const LocalSearchQuerySchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
237
237
|
d: "d";
|
|
238
238
|
}>>;
|
|
239
239
|
detail: z.ZodDefault<z.ZodEnum<{
|
|
240
|
-
full: "full";
|
|
241
240
|
modified: "modified";
|
|
242
241
|
basic: "basic";
|
|
242
|
+
full: "full";
|
|
243
243
|
}>>;
|
|
244
244
|
operation: z.ZodLiteral<"tree">;
|
|
245
245
|
namePattern: z.ZodOptional<z.ZodString>;
|
|
246
246
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
247
247
|
sort: z.ZodDefault<z.ZodEnum<{
|
|
248
|
+
time: "time";
|
|
248
249
|
name: "name";
|
|
249
250
|
extension: "extension";
|
|
250
251
|
size: "size";
|
|
251
|
-
time: "time";
|
|
252
252
|
}>>;
|
|
253
253
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
254
254
|
}, z.core.$strict>]>;
|
|
255
255
|
export type LocalSearchQuery = z.infer<typeof LocalSearchQuerySchema>;
|
|
256
256
|
export declare const LocalSearchBulkQuerySchema: z.ZodObject<{
|
|
257
|
-
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
258
|
-
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
259
|
-
queries: z.ZodArray<z.
|
|
257
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
258
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
259
|
+
queries: z.ZodArray<z.ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
260
260
|
}, z.core.$strict>;
|
|
@@ -4,16 +4,16 @@ import type { BulkToolOutput } from '../../types/toolOutput.js';
|
|
|
4
4
|
export declare const LocalViewStructureQuerySchema: z.ZodObject<{
|
|
5
5
|
path: z.ZodString;
|
|
6
6
|
detail: z.ZodDefault<z.ZodEnum<{
|
|
7
|
-
full: "full";
|
|
8
7
|
modified: "modified";
|
|
9
8
|
basic: "basic";
|
|
9
|
+
full: "full";
|
|
10
10
|
}>>;
|
|
11
11
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
12
12
|
sortBy: z.ZodDefault<z.ZodEnum<{
|
|
13
|
+
time: "time";
|
|
13
14
|
name: "name";
|
|
14
15
|
extension: "extension";
|
|
15
16
|
size: "size";
|
|
16
|
-
time: "time";
|
|
17
17
|
}>>;
|
|
18
18
|
reverse: z.ZodOptional<z.ZodBoolean>;
|
|
19
19
|
pattern: z.ZodOptional<z.ZodString>;
|
|
@@ -33,9 +33,9 @@ export declare const LocalViewStructureQuerySchema: z.ZodObject<{
|
|
|
33
33
|
}, z.core.$strip>;
|
|
34
34
|
export type ViewStructureQuery = z.infer<typeof LocalViewStructureQuerySchema>;
|
|
35
35
|
export declare const LocalViewStructureBulkQuerySchema: z.ZodObject<{
|
|
36
|
-
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
37
|
-
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
38
|
-
queries: z.ZodArray<z.
|
|
36
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
37
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
38
|
+
queries: z.ZodArray<z.ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
39
39
|
}, z.core.$strict>;
|
|
40
40
|
export interface LocalViewStructureEntry {
|
|
41
41
|
name?: string;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { type ConsumerWarmupStats } from '../shared/semanticTypes.js';
|
|
2
3
|
import type { ItemPagination, ToolContinuation } from '../../../scheme/pagination.js';
|
|
3
4
|
import type { BulkToolOutput } from '../../../types/toolOutput.js';
|
|
4
5
|
export declare const LspGetSemanticsQuerySchema: z.ZodObject<{
|
|
5
6
|
uri: z.ZodOptional<z.ZodString>;
|
|
6
7
|
type: z.ZodDefault<z.ZodEnum<{
|
|
7
8
|
definition: "definition";
|
|
8
|
-
documentSymbols: "documentSymbols";
|
|
9
|
-
workspaceSymbol: "workspaceSymbol";
|
|
10
9
|
references: "references";
|
|
11
10
|
callers: "callers";
|
|
12
11
|
callees: "callees";
|
|
13
12
|
callHierarchy: "callHierarchy";
|
|
14
13
|
hover: "hover";
|
|
14
|
+
documentSymbols: "documentSymbols";
|
|
15
15
|
typeDefinition: "typeDefinition";
|
|
16
16
|
implementation: "implementation";
|
|
17
|
+
workspaceSymbol: "workspaceSymbol";
|
|
17
18
|
supertypes: "supertypes";
|
|
18
19
|
subtypes: "subtypes";
|
|
19
20
|
diagnostic: "diagnostic";
|
|
@@ -26,19 +27,28 @@ export declare const LspGetSemanticsQuerySchema: z.ZodObject<{
|
|
|
26
27
|
groupByFile: z.ZodOptional<z.ZodBoolean>;
|
|
27
28
|
page: z.ZodDefault<z.ZodNumber>;
|
|
28
29
|
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
snapshot: z.ZodOptional<z.ZodString>;
|
|
29
31
|
contextLines: z.ZodOptional<z.ZodNumber>;
|
|
30
32
|
format: z.ZodDefault<z.ZodEnum<{
|
|
31
33
|
structured: "structured";
|
|
32
34
|
compact: "compact";
|
|
33
35
|
}>>;
|
|
34
36
|
workspaceRoot: z.ZodOptional<z.ZodString>;
|
|
37
|
+
rustContext: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
features: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodArray<z.ZodString>]>>;
|
|
39
|
+
noDefaultFeatures: z.ZodDefault<z.ZodBoolean>;
|
|
40
|
+
target: z.ZodOptional<z.ZodString>;
|
|
41
|
+
cfgs: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
42
|
+
buildScripts: z.ZodDefault<z.ZodBoolean>;
|
|
43
|
+
procMacros: z.ZodDefault<z.ZodBoolean>;
|
|
44
|
+
}, z.core.$strict>>;
|
|
35
45
|
goal: z.ZodOptional<z.ZodString>;
|
|
36
46
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
37
47
|
}, z.core.$strip>;
|
|
38
48
|
export declare const BulkLspGetSemanticsQuerySchema: z.ZodObject<{
|
|
39
|
-
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
40
|
-
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
41
|
-
queries: z.ZodArray<z.
|
|
49
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
50
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
51
|
+
queries: z.ZodArray<z.ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
42
52
|
}, z.core.$strict>;
|
|
43
53
|
interface LspLocation {
|
|
44
54
|
uri: string;
|
|
@@ -74,7 +84,7 @@ interface LspInfo {
|
|
|
74
84
|
provider?: string;
|
|
75
85
|
source?: string;
|
|
76
86
|
}
|
|
77
|
-
type LspEmptyCategory = 'unsupportedOperation' | 'symbolNotFound' | 'anchorFailed' | 'noLocations' | 'noReferences' | 'noHover' | 'noCalls' | 'noWorkspaceSymbols' | 'noTypeHierarchy' | 'noDiagnostics';
|
|
87
|
+
type LspEmptyCategory = 'unsupportedOperation' | 'symbolNotFound' | 'anchorFailed' | 'paginationChanged' | 'paginationSnapshotRequired' | 'noLocations' | 'noReferences' | 'noHover' | 'noCalls' | 'noWorkspaceSymbols' | 'noTypeHierarchy' | 'noDiagnostics';
|
|
78
88
|
interface LspEmptyState {
|
|
79
89
|
category: LspEmptyCategory;
|
|
80
90
|
reason: string;
|
|
@@ -100,6 +110,7 @@ interface LspCompactCall {
|
|
|
100
110
|
}
|
|
101
111
|
interface LspCompleteness {
|
|
102
112
|
complete: boolean;
|
|
113
|
+
consumerWarmupIncomplete?: true;
|
|
103
114
|
truncatedByDepth: boolean;
|
|
104
115
|
truncatedByBudget?: boolean;
|
|
105
116
|
visitedNodeCount?: number;
|
|
@@ -137,12 +148,15 @@ type LspSemanticPayload = {
|
|
|
137
148
|
} | {
|
|
138
149
|
kind: 'implementation';
|
|
139
150
|
locations: Array<LspLocation | string>;
|
|
151
|
+
warmup?: ConsumerWarmupStats;
|
|
140
152
|
} | {
|
|
141
153
|
kind: 'references';
|
|
142
154
|
locations?: Array<LspLocation | string>;
|
|
143
155
|
byFile?: Array<LspReferencesByFile | string>;
|
|
144
156
|
totalReferences: number;
|
|
145
157
|
totalFiles: number;
|
|
158
|
+
definitionOnly?: boolean;
|
|
159
|
+
warmup?: ConsumerWarmupStats;
|
|
146
160
|
empty?: LspEmptyState;
|
|
147
161
|
} | {
|
|
148
162
|
kind: 'callers' | 'callees' | 'callHierarchy';
|
|
@@ -151,6 +165,7 @@ type LspSemanticPayload = {
|
|
|
151
165
|
calls: Array<LspCompactCall | string>;
|
|
152
166
|
incomingCalls: number;
|
|
153
167
|
outgoingCalls: number;
|
|
168
|
+
warmup?: ConsumerWarmupStats;
|
|
154
169
|
completeness: LspCompleteness;
|
|
155
170
|
empty?: LspEmptyState;
|
|
156
171
|
} | {
|
|
@@ -188,6 +203,7 @@ type LspSemanticPayload = {
|
|
|
188
203
|
kind: 'empty';
|
|
189
204
|
category: LspEmptyCategory;
|
|
190
205
|
reason: string;
|
|
206
|
+
warmup?: ConsumerWarmupStats;
|
|
191
207
|
};
|
|
192
208
|
export interface LspGetSemanticsData {
|
|
193
209
|
type: string;
|
|
@@ -198,7 +214,13 @@ export interface LspGetSemanticsData {
|
|
|
198
214
|
resolvedSymbol?: LspResolvedSymbol;
|
|
199
215
|
lsp?: LspInfo;
|
|
200
216
|
payload: LspSemanticPayload;
|
|
201
|
-
pagination?: ItemPagination
|
|
217
|
+
pagination?: ItemPagination & {
|
|
218
|
+
snapshot?: string;
|
|
219
|
+
};
|
|
220
|
+
snapshot?: {
|
|
221
|
+
expected?: string;
|
|
222
|
+
actual?: string;
|
|
223
|
+
};
|
|
202
224
|
summary?: Record<string, unknown>;
|
|
203
225
|
next?: Record<string, ToolContinuation>;
|
|
204
226
|
hints?: string[];
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { acquirePooledClient } from '@octocodeai/octocode-engine/lsp/manager';
|
|
2
2
|
import type { SymbolAnchor } from '../shared/resolveSymbolAnchor.js';
|
|
3
|
-
import type { LspSemanticEnvelope, SymbolAnchoredSemanticQuery } from '../shared/semanticTypes.js';
|
|
4
|
-
declare const
|
|
5
|
-
export { CONSUMER_SCOPED_TYPES };
|
|
6
|
-
export type ConsumerWarmupStats = {
|
|
7
|
-
candidates: number;
|
|
8
|
-
warmedFiles: number;
|
|
9
|
-
skippedLarge: number;
|
|
10
|
-
possiblyTruncated: boolean;
|
|
11
|
-
};
|
|
3
|
+
import type { ConsumerWarmupStats, LspSemanticEnvelope, SymbolAnchoredSemanticQuery } from '../shared/semanticTypes.js';
|
|
4
|
+
export declare const CONSUMER_SCOPED_PROVIDERS: Readonly<Partial<Record<SymbolAnchoredSemanticQuery['type'], string>>>;
|
|
12
5
|
export declare function warmLikelyConsumers(client: NonNullable<Awaited<ReturnType<typeof acquirePooledClient>>>, anchor: SymbolAnchor, workspaceRoot: string): Promise<ConsumerWarmupStats>;
|
|
13
6
|
export declare function dispatchAnchoredSemantic(query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, client: NonNullable<Awaited<ReturnType<typeof acquirePooledClient>>>, warmupStats?: ConsumerWarmupStats): Promise<LspSemanticEnvelope>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { acquirePooledClient } from '@octocodeai/octocode-engine/lsp/manager';
|
|
2
|
-
import { type LspSemanticEnvelope, type SymbolAnchoredSemanticQuery } from '../../shared/semanticTypes.js';
|
|
2
|
+
import { type LspSemanticEnvelope, type SymbolAnchoredSemanticQuery, type ConsumerWarmupStats } from '../../shared/semanticTypes.js';
|
|
3
3
|
import type { SymbolAnchor } from '../../shared/resolveSymbolAnchor.js';
|
|
4
|
-
export declare function callsEnvelope(query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, client: NonNullable<Awaited<ReturnType<typeof acquirePooledClient
|
|
4
|
+
export declare function callsEnvelope(query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, client: NonNullable<Awaited<ReturnType<typeof acquirePooledClient>>>, warmupStats?: ConsumerWarmupStats): Promise<LspSemanticEnvelope>;
|
|
5
5
|
export declare function typeHierarchyEnvelope(query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, client: NonNullable<Awaited<ReturnType<typeof acquirePooledClient>>>): Promise<LspSemanticEnvelope>;
|
|
@@ -10,11 +10,12 @@ export type PaginationInfo = {
|
|
|
10
10
|
hasMore: boolean;
|
|
11
11
|
pageSize: number;
|
|
12
12
|
nextPage?: number;
|
|
13
|
+
snapshot?: string;
|
|
13
14
|
};
|
|
14
15
|
export declare function emptyCategoryForReason(type: SemanticContentType, reason: string): SemanticEmptyCategory;
|
|
15
16
|
export declare function failedAnchorEnvelope(query: LspGetSemanticsQuery, reason: string): LspSemanticEnvelope;
|
|
16
17
|
export declare function emptyEnvelope(type: SemanticContentType, anchor: SymbolAnchor, reason: string, serverAvailable?: boolean): LspSemanticEnvelope;
|
|
17
|
-
export declare function paginateItems<T>(items: readonly T[], requestedPage: number, requestedItemsPerPage: number): {
|
|
18
|
+
export declare function paginateItems<T>(items: readonly T[], requestedPage: number, requestedItemsPerPage: number, query?: LspGetSemanticsQuery, identities?: readonly unknown[]): {
|
|
18
19
|
pageItems: T[];
|
|
19
20
|
pagination: PaginationInfo;
|
|
20
21
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { LSPRange, ReferenceLocation, ReferencesByFile, CodeSnippet } from '@octocodeai/octocode-engine/lsp/types';
|
|
2
|
-
import { type LspSemanticEnvelope, type SymbolAnchoredSemanticQuery } from '../../shared/semanticTypes.js';
|
|
2
|
+
import { type LspSemanticEnvelope, type SymbolAnchoredSemanticQuery, type ConsumerWarmupStats } from '../../shared/semanticTypes.js';
|
|
3
3
|
import type { SymbolAnchor } from '../../shared/resolveSymbolAnchor.js';
|
|
4
|
-
|
|
5
|
-
export declare function locationsEnvelope(query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, kind: 'definition' | 'typeDefinition' | 'implementation', provider: string, locations: CodeSnippet[]): LspSemanticEnvelope;
|
|
4
|
+
export declare function locationsEnvelope(query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, kind: 'definition' | 'typeDefinition' | 'implementation', provider: string, locations: CodeSnippet[], warmupStats?: ConsumerWarmupStats): LspSemanticEnvelope;
|
|
6
5
|
export declare function referencesEnvelope(query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, locations: CodeSnippet[], warmupStats?: ConsumerWarmupStats): LspSemanticEnvelope;
|
|
7
6
|
export declare function hoverEnvelope(_query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, hover: unknown): Promise<LspSemanticEnvelope>;
|
|
8
7
|
export declare function buildReferencesByFile(locations: readonly ReferenceLocation[]): ReferencesByFile[];
|
|
@@ -18,7 +18,6 @@ export declare function workspaceSymbolAnchorExtensions(): string[];
|
|
|
18
18
|
export declare function workspaceSymbolAnchorIncludeGlobs(): string[];
|
|
19
19
|
export declare function findWorkspaceSymbolAnchorByName(query: WorkspaceSymbolSemanticQuery, workspaceRoot: string): Promise<string | undefined>;
|
|
20
20
|
export declare function resolveWorkspaceSymbolAnchor(query: WorkspaceSymbolSemanticQuery, workspaceRoot: string): Promise<string>;
|
|
21
|
-
export declare function lspErrorMessage(error: unknown): string;
|
|
22
21
|
/**
|
|
23
22
|
* Native JS/TS document symbols via oxc, parsed into the LSP `DocumentSymbol[]`
|
|
24
23
|
* shape. Returns `null` when oxc declines the input so the caller can fall back
|
|
@@ -20,6 +20,7 @@ export type CompactCall = {
|
|
|
20
20
|
contentPreview?: string;
|
|
21
21
|
};
|
|
22
22
|
export declare function attachSemanticRawEvidence<T extends object>(result: T): T;
|
|
23
|
+
export declare function classifySemanticResult(result: LspSemanticEnvelope | Record<string, unknown>): LspSemanticEnvelope | Record<string, unknown>;
|
|
23
24
|
export declare function formatSemanticResult(query: LspGetSemanticsQuery, result: LspSemanticEnvelope | Record<string, unknown>): LspSemanticEnvelope | Record<string, unknown>;
|
|
24
25
|
export declare function isSemanticEnvelope(value: LspSemanticEnvelope | Record<string, unknown>): value is LspSemanticEnvelope;
|
|
25
26
|
export declare function compactSemanticEnvelope(envelope: LspSemanticEnvelope): LspSemanticEnvelope;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LspGetSemanticsQuery, LspSemanticEnvelope } from '../shared/semanticTypes.js';
|
|
2
|
+
export declare function describeRustContext(query: LspGetSemanticsQuery): {
|
|
3
|
+
fingerprint: string;
|
|
4
|
+
features: string | string[];
|
|
5
|
+
noDefaultFeatures: boolean;
|
|
6
|
+
target: string;
|
|
7
|
+
cfgs: string[];
|
|
8
|
+
buildScripts: boolean;
|
|
9
|
+
procMacros: boolean;
|
|
10
|
+
};
|
|
11
|
+
/** Content-addressed guard, independent of process-local caches or server order. */
|
|
12
|
+
export declare function semanticSnapshotItems<T>(items: readonly T[], query: LspGetSemanticsQuery, identities?: readonly unknown[]): {
|
|
13
|
+
items: T[];
|
|
14
|
+
snapshot: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function guardSemanticSnapshot(query: LspGetSemanticsQuery, result: LspSemanticEnvelope | Record<string, unknown>): LspSemanticEnvelope | Record<string, unknown>;
|
|
@@ -8,6 +8,7 @@ export type TraversalResult<T> = {
|
|
|
8
8
|
requestCount: number;
|
|
9
9
|
cycleCount: number;
|
|
10
10
|
failedRequestCount: number;
|
|
11
|
+
excludedCallCount?: number;
|
|
11
12
|
};
|
|
12
13
|
export type TraversalBudget = {
|
|
13
14
|
maxNodes: number;
|
|
@@ -20,4 +21,4 @@ export type MutableTraversalBudget = TraversalBudget & {
|
|
|
20
21
|
};
|
|
21
22
|
export declare function createCallItemKey(item: CallHierarchyItem): string;
|
|
22
23
|
export declare function gatherIncomingCallsRecursive(client: LSPClient | null, item: CallHierarchyItem, remainingDepth: number, visited: Set<string>, contextLines: number, budget?: MutableTraversalBudget): Promise<TraversalResult<IncomingCall>>;
|
|
23
|
-
export declare function gatherOutgoingCallsRecursive(client: LSPClient | null, item: CallHierarchyItem, remainingDepth: number, visited: Set<string>, contextLines: number, budget?: MutableTraversalBudget): Promise<TraversalResult<OutgoingCall>>;
|
|
24
|
+
export declare function gatherOutgoingCallsRecursive(client: LSPClient | null, item: CallHierarchyItem, remainingDepth: number, visited: Set<string>, contextLines: number, budget?: MutableTraversalBudget, excludeCall?: (call: OutgoingCall) => boolean): Promise<TraversalResult<OutgoingCall>>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { ExactPosition, LSPRange } from '@octocodeai/octocode-engine/lsp/types';
|
|
2
|
-
export { LSP_GET_SEMANTICS_TOOL_NAME } from '../../toolNames.js';
|
|
1
|
+
import type { ExactPosition, LSPRange, RustBuildContext } from '@octocodeai/octocode-engine/lsp/types';
|
|
3
2
|
export declare const SEMANTIC_CONTENT_TYPES: readonly ["definition", "references", "callers", "callees", "callHierarchy", "hover", "documentSymbols", "typeDefinition", "implementation", "workspaceSymbol", "supertypes", "subtypes", "diagnostic"];
|
|
4
3
|
export type SemanticContentType = (typeof SEMANTIC_CONTENT_TYPES)[number];
|
|
5
4
|
export type SemanticOutputFormat = 'structured' | 'compact';
|
|
@@ -8,8 +7,10 @@ export type SemanticQueryBase = {
|
|
|
8
7
|
type: SemanticContentType;
|
|
9
8
|
uri?: string;
|
|
10
9
|
workspaceRoot?: string;
|
|
10
|
+
rustContext?: RustBuildContext;
|
|
11
11
|
page?: number;
|
|
12
12
|
pageSize?: number;
|
|
13
|
+
snapshot?: string;
|
|
13
14
|
contextLines?: number;
|
|
14
15
|
format?: SemanticOutputFormat;
|
|
15
16
|
goal?: string;
|
|
@@ -77,11 +78,18 @@ export declare function compactLocation(snippet: {
|
|
|
77
78
|
};
|
|
78
79
|
isDefinition?: boolean;
|
|
79
80
|
}): CompactLocation;
|
|
80
|
-
export type SemanticEmptyCategory = 'unsupportedOperation' | 'symbolNotFound' | 'anchorFailed' | 'noLocations' | 'noReferences' | 'noHover' | 'noCalls' | 'noWorkspaceSymbols' | 'noTypeHierarchy' | 'noDiagnostics';
|
|
81
|
+
export type SemanticEmptyCategory = 'unsupportedOperation' | 'symbolNotFound' | 'anchorFailed' | 'paginationChanged' | 'paginationSnapshotRequired' | 'noLocations' | 'noReferences' | 'noHover' | 'noCalls' | 'noWorkspaceSymbols' | 'noTypeHierarchy' | 'noDiagnostics';
|
|
81
82
|
export type SemanticEmptyState = {
|
|
82
83
|
category: SemanticEmptyCategory;
|
|
83
84
|
reason: string;
|
|
84
85
|
};
|
|
86
|
+
export type ConsumerWarmupStats = {
|
|
87
|
+
candidates: number;
|
|
88
|
+
warmedFiles: number;
|
|
89
|
+
skippedLarge: number;
|
|
90
|
+
possiblyTruncated: boolean;
|
|
91
|
+
incompleteReasons?: Array<'fileCap' | 'fileRead' | 'search'>;
|
|
92
|
+
};
|
|
85
93
|
export type LspSemanticEnvelope = {
|
|
86
94
|
type: SemanticContentType;
|
|
87
95
|
uri: string;
|
|
@@ -103,12 +111,8 @@ export type LspSemanticEnvelope = {
|
|
|
103
111
|
byFile?: unknown[];
|
|
104
112
|
totalReferences: number;
|
|
105
113
|
totalFiles: number;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
warmedFiles: number;
|
|
109
|
-
skippedLarge: number;
|
|
110
|
-
possiblyTruncated: boolean;
|
|
111
|
-
};
|
|
114
|
+
definitionOnly?: boolean;
|
|
115
|
+
warmup?: ConsumerWarmupStats;
|
|
112
116
|
empty?: SemanticEmptyState;
|
|
113
117
|
} | {
|
|
114
118
|
kind: 'callers' | 'callees' | 'callHierarchy';
|
|
@@ -117,8 +121,10 @@ export type LspSemanticEnvelope = {
|
|
|
117
121
|
calls: unknown[];
|
|
118
122
|
incomingCalls?: number;
|
|
119
123
|
outgoingCalls?: number;
|
|
124
|
+
warmup?: ConsumerWarmupStats;
|
|
120
125
|
completeness: {
|
|
121
126
|
complete: boolean;
|
|
127
|
+
consumerWarmupIncomplete?: true;
|
|
122
128
|
truncatedByDepth: boolean;
|
|
123
129
|
truncatedByBudget?: boolean;
|
|
124
130
|
visitedNodeCount?: number;
|
|
@@ -140,6 +146,7 @@ export type LspSemanticEnvelope = {
|
|
|
140
146
|
} | {
|
|
141
147
|
kind: 'implementation';
|
|
142
148
|
locations: Array<CompactLocation | string>;
|
|
149
|
+
warmup?: ConsumerWarmupStats;
|
|
143
150
|
} | {
|
|
144
151
|
kind: 'documentSymbols';
|
|
145
152
|
symbols: unknown[];
|
|
@@ -170,13 +177,15 @@ export type LspSemanticEnvelope = {
|
|
|
170
177
|
kind: 'empty';
|
|
171
178
|
category: SemanticEmptyCategory;
|
|
172
179
|
reason: string;
|
|
180
|
+
warmup?: ConsumerWarmupStats;
|
|
173
181
|
};
|
|
174
182
|
pagination?: unknown;
|
|
175
183
|
warnings?: string[];
|
|
176
184
|
hints?: string[];
|
|
177
185
|
terminalLimit?: boolean;
|
|
178
186
|
truncated?: boolean;
|
|
179
|
-
|
|
187
|
+
incompleteResults?: boolean;
|
|
188
|
+
partialReasons?: Array<'warmupCap' | 'warmupIncomplete' | 'depth' | 'budget' | 'readinessUnconfirmed'>;
|
|
180
189
|
next?: Record<string, {
|
|
181
190
|
tool: string;
|
|
182
191
|
query: Record<string, unknown>;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import type { CallToolResult } from '@modelcontextprotocol/server';
|
|
2
2
|
import type { z } from 'zod';
|
|
3
|
-
import
|
|
3
|
+
import { NpmSearchQueryLocalSchema } from './scheme.js';
|
|
4
4
|
type NpmSearchQuery = z.input<typeof NpmSearchQueryLocalSchema> & {
|
|
5
5
|
pageSize?: number;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
import type { PackageResult } from '../../utils/package/common.js';
|
|
7
|
+
import type { PackageResult } from '../../utils/package/types.js';
|
|
9
8
|
import type { ToolExecutionArgs } from '../../types/execution.js';
|
|
10
|
-
export { buildPackagePagination } from './pagination.js';
|
|
11
9
|
/**
|
|
12
10
|
* Normalize the many repository URL shapes npm packages carry
|
|
13
11
|
* (ssh://git@…, git+https://…, git://…, git@host:owner/repo, and npm's
|
|
@@ -42,3 +40,4 @@ type CompactPackageData = {
|
|
|
42
40
|
export declare function formatPackageData(pkg: PackageResult): PackageData;
|
|
43
41
|
export declare function compactPackageRepositories(packages: PackageData[]): CompactPackageData;
|
|
44
42
|
export declare function searchPackages(args: ToolExecutionArgs<NpmSearchQuery>): Promise<CallToolResult>;
|
|
43
|
+
export {};
|
|
@@ -4,14 +4,15 @@ import type { BulkToolOutput } from '../../types/toolOutput.js';
|
|
|
4
4
|
export declare const NpmSearchQueryLocalSchema: z.ZodObject<{
|
|
5
5
|
packageName: z.ZodOptional<z.ZodString>;
|
|
6
6
|
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7
|
-
page: z.
|
|
7
|
+
page: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
registry: z.ZodOptional<z.ZodString>;
|
|
8
9
|
goal: z.ZodOptional<z.ZodString>;
|
|
9
10
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
10
11
|
}, z.core.$strip>;
|
|
11
12
|
export declare const NpmSearchBulkQueryLocalSchema: z.ZodObject<{
|
|
12
|
-
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
13
|
-
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
14
|
-
queries: z.ZodArray<z.
|
|
13
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
14
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber, unknown>>;
|
|
15
|
+
queries: z.ZodArray<z.ZodTypeAny<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
15
16
|
}, z.core.$strict>;
|
|
16
17
|
export interface NpmSearchPackage {
|
|
17
18
|
name: string;
|