@octocodeai/octocode-tools-core 17.0.2 → 18.0.1
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 +48 -38
- package/dist/direct.js +52 -35
- package/dist/github/canonicalRepo.d.ts +14 -0
- package/dist/github/codeSearch/matchPositions.d.ts +11 -0
- package/dist/github/codeSearch.d.ts +2 -1
- package/dist/github/compare.d.ts +42 -0
- package/dist/github/dateWindow.d.ts +4 -0
- package/dist/github/discussions.d.ts +45 -0
- package/dist/github/githubAPI.d.ts +7 -13
- package/dist/github/history/commitFiles.d.ts +39 -0
- package/dist/github/history.d.ts +1 -0
- package/dist/github/issues/types.d.ts +8 -8
- package/dist/github/prTransformation.d.ts +24 -25
- package/dist/github/queryBuilders/base.d.ts +0 -1
- package/dist/github/queryBuilders/issues.d.ts +0 -6
- package/dist/github/releases.d.ts +9 -1
- package/dist/github/responseHeaders.d.ts +6 -0
- package/dist/index.d.ts +7 -6
- package/dist/index.js +56 -39
- package/dist/providers/github/githubPullRequests.d.ts +9 -0
- package/dist/providers/github/paginationMetadata.d.ts +6 -5
- package/dist/providers/providerQueries.d.ts +11 -6
- package/dist/providers/providerResults.d.ts +9 -1
- package/dist/schema.d.ts +0 -1
- package/dist/schema.js +1 -2
- package/dist/scheme/pagination.d.ts +5 -13
- package/dist/scheme/responseEnvelope.d.ts +28 -22
- package/dist/security/bridge.d.ts +3 -2
- package/dist/shared/config/index.d.ts +0 -1
- package/dist/shared/config/index.js +1 -1
- package/dist/shared/languageSelectors/classify.d.ts +2 -2
- package/dist/shared/languageSelectors/data.d.ts +4 -4
- package/dist/shared/languageSelectors.d.ts +1 -1
- package/dist/shared/paths.d.ts +1 -4
- package/dist/tools/directToolCatalog/toolCatalogDefinitions.d.ts +10 -11
- package/dist/tools/directToolCatalog/toolCatalogFormatters.d.ts +12 -0
- package/dist/tools/directToolCatalog.meta.d.ts +1 -0
- package/dist/tools/github_clone_repo/contentSize.d.ts +9 -0
- package/dist/tools/github_clone_repo/scheme.d.ts +26 -96
- package/dist/tools/github_fetch_content/finalizer/types.d.ts +2 -3
- package/dist/tools/github_fetch_content/scheme.d.ts +92 -140
- package/dist/tools/github_fetch_content/types.d.ts +2 -1
- package/dist/tools/github_search_code/scheme.d.ts +39 -87
- package/dist/tools/github_search_discussions/execution.d.ts +15 -0
- package/dist/tools/github_search_discussions/scheme.d.ts +16 -0
- package/dist/tools/github_search_pull_requests/contentResponse/fileSurfaces.d.ts +2 -16
- package/dist/tools/github_search_pull_requests/scheme.d.ts +97 -119
- package/dist/tools/github_search_pull_requests/splitExecutions.d.ts +8 -0
- package/dist/tools/github_search_pull_requests/splitSchemes.d.ts +216 -0
- package/dist/tools/github_search_pull_requests/types.d.ts +28 -29
- package/dist/tools/github_search_repos/execution.d.ts +0 -2
- package/dist/tools/github_search_repos/scheme.d.ts +36 -64
- package/dist/tools/github_view_repo_structure/scheme.d.ts +37 -66
- package/dist/tools/local_dead_code/deadCodeScan.d.ts +26 -0
- package/dist/tools/local_dead_code/entrypoints.d.ts +16 -0
- package/dist/tools/local_dead_code/execution.d.ts +4 -0
- package/dist/tools/local_dead_code/graphBuilder.d.ts +43 -0
- package/dist/tools/local_dead_code/importResolver.d.ts +6 -0
- package/dist/tools/local_dead_code/local_dead_code.d.ts +5 -0
- package/dist/tools/local_dead_code/reachability.d.ts +21 -0
- package/dist/tools/local_dead_code/retention.d.ts +22 -0
- package/dist/tools/local_dead_code/scheme.d.ts +51 -0
- package/dist/tools/local_dead_code/types.d.ts +56 -0
- package/dist/tools/local_fetch_content/execution.d.ts +0 -1
- package/dist/tools/local_fetch_content/fetchContent/extraction.d.ts +6 -0
- package/dist/tools/local_fetch_content/fetchContent/validation.d.ts +9 -1
- package/dist/tools/local_fetch_content/fetchContent.d.ts +0 -1
- package/dist/tools/local_fetch_content/scheme.d.ts +28 -90
- package/dist/tools/local_find_files/execution.d.ts +0 -1
- package/dist/tools/local_find_files/findFiles.d.ts +0 -3
- package/dist/tools/local_find_files/findFilesNext.d.ts +26 -0
- package/dist/tools/local_find_files/pathPatternBraces.d.ts +20 -0
- package/dist/tools/local_find_files/scheme.d.ts +19 -81
- package/dist/tools/local_ripgrep/captureBudget.d.ts +25 -0
- package/dist/tools/local_ripgrep/rankingProfile/rankingProfiles.d.ts +1 -0
- package/dist/tools/local_ripgrep/rankingProfile/rankingResults.d.ts +1 -0
- package/dist/tools/local_ripgrep/ripgrepResultBuilder/searchNext.d.ts +1 -1
- package/dist/tools/local_ripgrep/scheme.d.ts +89 -190
- package/dist/tools/local_view_structure/execution.d.ts +0 -1
- package/dist/tools/local_view_structure/local_view_structure.d.ts +0 -1
- package/dist/tools/local_view_structure/scheme.d.ts +34 -87
- package/dist/tools/local_view_structure/structureFilters.d.ts +2 -4
- package/dist/tools/local_view_structure/structureResponse.d.ts +1 -0
- package/dist/tools/local_view_structure/viewStructureNext.d.ts +25 -0
- package/dist/tools/lsp/semantic_content/index.d.ts +2 -1
- package/dist/tools/lsp/semantic_content/scheme.d.ts +167 -642
- package/dist/tools/lsp/semantic_content/semanticAnchored.d.ts +8 -2
- package/dist/tools/lsp/semantic_content/semanticEnvelopes/locationEnvelopes.d.ts +2 -1
- package/dist/tools/lsp/semantic_content/semanticFileOps/anchor.d.ts +17 -1
- package/dist/tools/lsp/semantic_content/semanticNext.d.ts +2 -0
- package/dist/tools/lsp/semantic_content/semanticPresentation.d.ts +1 -1
- package/dist/tools/lsp/shared/callHierarchyTraversal.d.ts +14 -2
- package/dist/tools/lsp/shared/semanticTypes.d.ts +14 -1
- package/dist/tools/package_search/execution.d.ts +9 -6
- package/dist/tools/package_search/queryHelpers.d.ts +8 -0
- package/dist/tools/package_search/scheme.d.ts +30 -86
- package/dist/tools/providerMappers/codeSearch.d.ts +0 -1
- package/dist/tools/providerMappers/pullRequests.d.ts +0 -13
- package/dist/tools/providerMappers/repoSearch.d.ts +1 -5
- package/dist/tools/providerMappers/repoStructure.d.ts +4 -0
- package/dist/tools/toolCatalogFactory.d.ts +25 -0
- package/dist/tools/toolConfig.d.ts +9 -24
- package/dist/tools/toolNames.d.ts +2 -2
- package/dist/tools/toolSchemaImports.d.ts +3 -1
- package/dist/types/execution.d.ts +1 -0
- package/dist/types/toolOutput.d.ts +38 -0
- package/dist/utils/contextUtils.d.ts +6 -0
- package/dist/utils/core/types.d.ts +4 -0
- package/dist/utils/jsSymbolNames.d.ts +6 -0
- package/package.json +4 -8
- package/dist/oql/adapters/compile.d.ts +0 -25
- package/dist/oql/adapters/github/execute.d.ts +0 -16
- package/dist/oql/adapters/github/provider-diagnostics.d.ts +0 -14
- package/dist/oql/adapters/github/shared.d.ts +0 -75
- package/dist/oql/adapters/github.d.ts +0 -14
- package/dist/oql/adapters/graphProof.d.ts +0 -6
- package/dist/oql/adapters/graphView/filters.d.ts +0 -25
- package/dist/oql/adapters/graphView/nativeEdges.d.ts +0 -5
- package/dist/oql/adapters/graphView.d.ts +0 -29
- package/dist/oql/adapters/local/code.d.ts +0 -3
- package/dist/oql/adapters/local/codeBoolean.d.ts +0 -3
- package/dist/oql/adapters/local/fileRowOps.d.ts +0 -11
- package/dist/oql/adapters/local/files.d.ts +0 -3
- package/dist/oql/adapters/local/filesBoolean.d.ts +0 -10
- package/dist/oql/adapters/local/filesContentLeaf.d.ts +0 -12
- package/dist/oql/adapters/local/filesUniverse.d.ts +0 -6
- package/dist/oql/adapters/local/findToolType.d.ts +0 -10
- package/dist/oql/adapters/local/predicates.d.ts +0 -18
- package/dist/oql/adapters/local/scope.d.ts +0 -14
- package/dist/oql/adapters/local/searchToolType.d.ts +0 -7
- package/dist/oql/adapters/local/structureContent.d.ts +0 -6
- package/dist/oql/adapters/local/types.d.ts +0 -34
- package/dist/oql/adapters/local.d.ts +0 -4
- package/dist/oql/adapters/materialize.d.ts +0 -11
- package/dist/oql/adapters/pagination.d.ts +0 -21
- package/dist/oql/adapters/researchTargets/diff.d.ts +0 -16
- package/dist/oql/adapters/researchTargets/graph.d.ts +0 -3
- package/dist/oql/adapters/researchTargets/history.d.ts +0 -20
- package/dist/oql/adapters/researchTargets/pagination.d.ts +0 -54
- package/dist/oql/adapters/researchTargets/repositories.d.ts +0 -4
- package/dist/oql/adapters/researchTargets/research.d.ts +0 -3
- package/dist/oql/adapters/researchTargets/rows.d.ts +0 -16
- package/dist/oql/adapters/researchTargets/semantics.d.ts +0 -3
- package/dist/oql/adapters/researchTargets/shared.d.ts +0 -11
- package/dist/oql/adapters/researchTargets.d.ts +0 -8
- package/dist/oql/adapters/resultMap.d.ts +0 -27
- package/dist/oql/adapters/ruleYaml.d.ts +0 -11
- package/dist/oql/adapters/runner.d.ts +0 -21
- package/dist/oql/capabilities.d.ts +0 -31
- package/dist/oql/defaults.d.ts +0 -26
- package/dist/oql/diagnostics.d.ts +0 -25
- package/dist/oql/diffLanes.d.ts +0 -29
- package/dist/oql/envelope.d.ts +0 -21
- package/dist/oql/features.d.ts +0 -7
- package/dist/oql/index.d.ts +0 -27
- package/dist/oql/index.js +0 -47
- package/dist/oql/normalize/batch.d.ts +0 -2
- package/dist/oql/normalize/materialize.d.ts +0 -2
- package/dist/oql/normalize/params.d.ts +0 -2
- package/dist/oql/normalize/query.d.ts +0 -2
- package/dist/oql/normalize/scope.d.ts +0 -2
- package/dist/oql/normalize/shared.d.ts +0 -7
- package/dist/oql/normalize/source.d.ts +0 -2
- package/dist/oql/normalize/where.d.ts +0 -2
- package/dist/oql/normalize.d.ts +0 -20
- package/dist/oql/planner/planDiagnostics.d.ts +0 -13
- package/dist/oql/planner/predicateRouting.d.ts +0 -35
- package/dist/oql/planner.d.ts +0 -7
- package/dist/oql/predicateUtils.d.ts +0 -3
- package/dist/oql/research/analyze/manifest-scan.d.ts +0 -4
- package/dist/oql/research/analyze/source-graph.d.ts +0 -7
- package/dist/oql/research/analyze/symbol-scoring.d.ts +0 -4
- package/dist/oql/research/analyze/types.d.ts +0 -163
- package/dist/oql/research/analyze/utils.d.ts +0 -16
- package/dist/oql/research/analyze.d.ts +0 -3
- package/dist/oql/research/packets/builders.d.ts +0 -4
- package/dist/oql/research/packets/types.d.ts +0 -91
- package/dist/oql/research/packets.d.ts +0 -21
- package/dist/oql/run/batch.d.ts +0 -3
- package/dist/oql/run/continuations/records.d.ts +0 -19
- package/dist/oql/run/continuations/registry.d.ts +0 -22
- package/dist/oql/run/continuations/semantics.d.ts +0 -3
- package/dist/oql/run/continuations/types.d.ts +0 -12
- package/dist/oql/run/dryRun.d.ts +0 -11
- package/dist/oql/run/paths.d.ts +0 -15
- package/dist/oql/run/proofGrades.d.ts +0 -8
- package/dist/oql/run/select.d.ts +0 -10
- package/dist/oql/run/single.d.ts +0 -22
- package/dist/oql/run.d.ts +0 -5
- package/dist/oql/schema/predicates.d.ts +0 -12
- package/dist/oql/schema.d.ts +0 -1049
- package/dist/oql/schemeText.d.ts +0 -152
- package/dist/oql/shorthand/predicates.d.ts +0 -15
- package/dist/oql/shorthand/query-controls.d.ts +0 -18
- package/dist/oql/shorthand/target-params.d.ts +0 -9
- package/dist/oql/shorthand/types.d.ts +0 -159
- package/dist/oql/shorthand/utils.d.ts +0 -7
- package/dist/oql/shorthand.d.ts +0 -8
- package/dist/oql/targetParams.d.ts +0 -7
- package/dist/oql/transformers/contract.d.ts +0 -19
- package/dist/oql/transformers/github/code.d.ts +0 -9
- package/dist/oql/transformers/github/common.d.ts +0 -14
- package/dist/oql/transformers/language.d.ts +0 -1
- package/dist/oql/transformers/registry.d.ts +0 -16
- package/dist/oql/transformers/types.d.ts +0 -11
- package/dist/oql/types/diagnostics.d.ts +0 -22
- package/dist/oql/types/envelope.d.ts +0 -78
- package/dist/oql/types/guards.d.ts +0 -9
- package/dist/oql/types/planner.d.ts +0 -46
- package/dist/oql/types/predicates.d.ts +0 -93
- package/dist/oql/types/query.d.ts +0 -143
- package/dist/oql/types/recordData.d.ts +0 -127
- package/dist/oql/types/recordRows.d.ts +0 -48
- package/dist/oql/types/results.d.ts +0 -118
- package/dist/oql/types/targets.d.ts +0 -22
- package/dist/oql/types.d.ts +0 -27
- package/dist/tools/oql_search/execution.d.ts +0 -7
- package/dist/tools/toolMetadata/descriptionOverrides.d.ts +0 -4
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import type { LocalItemPagination, ToolContinuation } from '../../scheme/pagination.js';
|
|
3
|
+
import type { BulkToolOutput } from '../../types/toolOutput.js';
|
|
2
4
|
export declare const LocalRipgrepQuerySchema: z.ZodObject<{
|
|
3
|
-
|
|
5
|
+
searchText: z.ZodOptional<z.ZodString>;
|
|
4
6
|
path: z.ZodString;
|
|
5
7
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
6
8
|
paginated: "paginated";
|
|
@@ -10,10 +12,16 @@ export declare const LocalRipgrepQuerySchema: z.ZodObject<{
|
|
|
10
12
|
}>>;
|
|
11
13
|
pattern: z.ZodOptional<z.ZodString>;
|
|
12
14
|
rule: z.ZodOptional<z.ZodString>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
regex: z.ZodDefault<z.ZodEnum<{
|
|
16
|
+
fixed: "fixed";
|
|
17
|
+
smart: "smart";
|
|
18
|
+
perl: "perl";
|
|
19
|
+
}>>;
|
|
20
|
+
caseMode: z.ZodDefault<z.ZodEnum<{
|
|
21
|
+
smart: "smart";
|
|
22
|
+
sensitive: "sensitive";
|
|
23
|
+
insensitive: "insensitive";
|
|
24
|
+
}>>;
|
|
17
25
|
wholeWord: z.ZodOptional<z.ZodBoolean>;
|
|
18
26
|
invertMatch: z.ZodOptional<z.ZodBoolean>;
|
|
19
27
|
include: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
@@ -21,14 +29,15 @@ export declare const LocalRipgrepQuerySchema: z.ZodObject<{
|
|
|
21
29
|
excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
22
30
|
noIgnore: z.ZodOptional<z.ZodBoolean>;
|
|
23
31
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
-
filesOnly: z.ZodOptional<z.ZodBoolean>;
|
|
25
|
-
filesWithoutMatch: z.ZodOptional<z.ZodBoolean>;
|
|
26
32
|
contextLines: z.ZodOptional<z.ZodNumber>;
|
|
27
33
|
matchContentLength: z.ZodDefault<z.ZodNumber>;
|
|
28
34
|
maxMatchesPerFile: z.ZodOptional<z.ZodNumber>;
|
|
29
35
|
maxFiles: z.ZodOptional<z.ZodNumber>;
|
|
30
|
-
multiline: z.
|
|
31
|
-
|
|
36
|
+
multiline: z.ZodDefault<z.ZodEnum<{
|
|
37
|
+
off: "off";
|
|
38
|
+
on: "on";
|
|
39
|
+
dotall: "dotall";
|
|
40
|
+
}>>;
|
|
32
41
|
sort: z.ZodDefault<z.ZodEnum<{
|
|
33
42
|
path: "path";
|
|
34
43
|
created: "created";
|
|
@@ -52,14 +61,21 @@ export declare const LocalRipgrepQuerySchema: z.ZodObject<{
|
|
|
52
61
|
yaml: "yaml";
|
|
53
62
|
generic: "generic";
|
|
54
63
|
}>>;
|
|
55
|
-
debugRanking: z.ZodOptional<z.ZodBoolean>;
|
|
56
|
-
semanticRanking: z.ZodOptional<z.ZodBoolean>;
|
|
57
64
|
langType: z.ZodOptional<z.ZodString>;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
65
|
+
captureText: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
output: z.ZodDefault<z.ZodEnum<{
|
|
67
|
+
content: "content";
|
|
68
|
+
files: "files";
|
|
69
|
+
filesWithout: "filesWithout";
|
|
70
|
+
countLines: "countLines";
|
|
71
|
+
countMatches: "countMatches";
|
|
72
|
+
matchOnly: "matchOnly";
|
|
73
|
+
}>>;
|
|
74
|
+
unique: z.ZodDefault<z.ZodEnum<{
|
|
75
|
+
list: "list";
|
|
76
|
+
off: "off";
|
|
77
|
+
count: "count";
|
|
78
|
+
}>>;
|
|
63
79
|
matchWindow: z.ZodOptional<z.ZodNumber>;
|
|
64
80
|
matchPage: z.ZodOptional<z.ZodNumber>;
|
|
65
81
|
itemsPerPage: z.ZodOptional<z.ZodNumber>;
|
|
@@ -69,182 +85,65 @@ export declare const LocalRipgrepQuerySchema: z.ZodObject<{
|
|
|
69
85
|
researchGoal: z.ZodOptional<z.ZodString>;
|
|
70
86
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
71
87
|
}, z.core.$strip>;
|
|
72
|
-
export type RipgrepQuery = z.infer<typeof LocalRipgrepQuerySchema
|
|
73
|
-
unique?: boolean;
|
|
74
|
-
countUnique?: boolean;
|
|
75
|
-
};
|
|
88
|
+
export type RipgrepQuery = z.infer<typeof LocalRipgrepQuerySchema>;
|
|
76
89
|
export declare const LocalRipgrepBulkQuerySchema: z.ZodObject<{
|
|
77
90
|
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
78
91
|
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
79
92
|
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
80
93
|
}, z.core.$strip>;
|
|
81
|
-
export
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
totalResults: z.ZodOptional<z.ZodNumber>;
|
|
138
|
-
itemsPerPage: z.ZodOptional<z.ZodNumber>;
|
|
139
|
-
filesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
140
|
-
entriesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
141
|
-
matchesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
142
|
-
totalFiles: z.ZodOptional<z.ZodNumber>;
|
|
143
|
-
totalEntries: z.ZodOptional<z.ZodNumber>;
|
|
144
|
-
totalMatches: z.ZodOptional<z.ZodNumber>;
|
|
145
|
-
totalFilesFound: z.ZodOptional<z.ZodNumber>;
|
|
146
|
-
nextMatchPage: z.ZodOptional<z.ZodNumber>;
|
|
147
|
-
}, z.core.$strip>>;
|
|
148
|
-
pagination: z.ZodOptional<z.ZodObject<{
|
|
149
|
-
currentPage: z.ZodNumber;
|
|
150
|
-
totalPages: z.ZodNumber;
|
|
151
|
-
hasMore: z.ZodBoolean;
|
|
152
|
-
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
153
|
-
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
154
|
-
totalItems: z.ZodOptional<z.ZodNumber>;
|
|
155
|
-
perPage: z.ZodOptional<z.ZodNumber>;
|
|
156
|
-
totalFound: z.ZodOptional<z.ZodNumber>;
|
|
157
|
-
returned: z.ZodOptional<z.ZodNumber>;
|
|
158
|
-
reportedTotalMatches: z.ZodOptional<z.ZodNumber>;
|
|
159
|
-
reachableTotalMatches: z.ZodOptional<z.ZodNumber>;
|
|
160
|
-
totalMatchesKind: z.ZodOptional<z.ZodEnum<{
|
|
161
|
-
exact: "exact";
|
|
162
|
-
reported: "reported";
|
|
163
|
-
lowerBound: "lowerBound";
|
|
164
|
-
}>>;
|
|
165
|
-
totalMatchesCapped: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
-
totalResults: z.ZodOptional<z.ZodNumber>;
|
|
167
|
-
itemsPerPage: z.ZodOptional<z.ZodNumber>;
|
|
168
|
-
filesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
169
|
-
entriesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
170
|
-
matchesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
171
|
-
totalFiles: z.ZodOptional<z.ZodNumber>;
|
|
172
|
-
totalEntries: z.ZodOptional<z.ZodNumber>;
|
|
173
|
-
totalMatches: z.ZodOptional<z.ZodNumber>;
|
|
174
|
-
totalFilesFound: z.ZodOptional<z.ZodNumber>;
|
|
175
|
-
nextMatchPage: z.ZodOptional<z.ZodNumber>;
|
|
176
|
-
}, z.core.$strip>>;
|
|
177
|
-
next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
178
|
-
tool: z.ZodString;
|
|
179
|
-
query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
180
|
-
why: z.ZodOptional<z.ZodString>;
|
|
181
|
-
confidence: z.ZodOptional<z.ZodEnum<{
|
|
182
|
-
exact: "exact";
|
|
183
|
-
heuristic: "heuristic";
|
|
184
|
-
}>>;
|
|
185
|
-
}, z.core.$strip>>>;
|
|
186
|
-
}, z.core.$strip>>>;
|
|
187
|
-
summary: z.ZodOptional<z.ZodString>;
|
|
188
|
-
searchEngine: z.ZodOptional<z.ZodString>;
|
|
189
|
-
stats: z.ZodOptional<z.ZodObject<{
|
|
190
|
-
totalOccurrences: z.ZodOptional<z.ZodNumber>;
|
|
191
|
-
matchedLines: z.ZodOptional<z.ZodNumber>;
|
|
192
|
-
filesMatched: z.ZodOptional<z.ZodNumber>;
|
|
193
|
-
filesSearched: z.ZodOptional<z.ZodNumber>;
|
|
194
|
-
bytesSearched: z.ZodOptional<z.ZodNumber>;
|
|
195
|
-
searchTime: z.ZodOptional<z.ZodString>;
|
|
196
|
-
}, z.core.$loose>>;
|
|
197
|
-
pagination: z.ZodOptional<z.ZodObject<{
|
|
198
|
-
currentPage: z.ZodNumber;
|
|
199
|
-
totalPages: z.ZodNumber;
|
|
200
|
-
hasMore: z.ZodBoolean;
|
|
201
|
-
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
202
|
-
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
203
|
-
totalItems: z.ZodOptional<z.ZodNumber>;
|
|
204
|
-
perPage: z.ZodOptional<z.ZodNumber>;
|
|
205
|
-
totalFound: z.ZodOptional<z.ZodNumber>;
|
|
206
|
-
returned: z.ZodOptional<z.ZodNumber>;
|
|
207
|
-
reportedTotalMatches: z.ZodOptional<z.ZodNumber>;
|
|
208
|
-
reachableTotalMatches: z.ZodOptional<z.ZodNumber>;
|
|
209
|
-
totalMatchesKind: z.ZodOptional<z.ZodEnum<{
|
|
210
|
-
exact: "exact";
|
|
211
|
-
reported: "reported";
|
|
212
|
-
lowerBound: "lowerBound";
|
|
213
|
-
}>>;
|
|
214
|
-
totalMatchesCapped: z.ZodOptional<z.ZodBoolean>;
|
|
215
|
-
totalResults: z.ZodOptional<z.ZodNumber>;
|
|
216
|
-
itemsPerPage: z.ZodOptional<z.ZodNumber>;
|
|
217
|
-
filesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
218
|
-
entriesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
219
|
-
matchesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
220
|
-
totalFiles: z.ZodOptional<z.ZodNumber>;
|
|
221
|
-
totalEntries: z.ZodOptional<z.ZodNumber>;
|
|
222
|
-
totalMatches: z.ZodOptional<z.ZodNumber>;
|
|
223
|
-
totalFilesFound: z.ZodOptional<z.ZodNumber>;
|
|
224
|
-
nextMatchPage: z.ZodOptional<z.ZodNumber>;
|
|
225
|
-
}, z.core.$strip>>;
|
|
226
|
-
next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
227
|
-
tool: z.ZodString;
|
|
228
|
-
query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
229
|
-
why: z.ZodOptional<z.ZodString>;
|
|
230
|
-
confidence: z.ZodOptional<z.ZodEnum<{
|
|
231
|
-
exact: "exact";
|
|
232
|
-
heuristic: "heuristic";
|
|
233
|
-
}>>;
|
|
234
|
-
}, z.core.$strip>>>;
|
|
235
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
236
|
-
}, z.core.$strip>;
|
|
237
|
-
}, z.core.$strip>>;
|
|
238
|
-
base: z.ZodOptional<z.ZodString>;
|
|
239
|
-
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
240
|
-
responsePagination: z.ZodOptional<z.ZodObject<{
|
|
241
|
-
currentPage: z.ZodNumber;
|
|
242
|
-
totalPages: z.ZodNumber;
|
|
243
|
-
hasMore: z.ZodBoolean;
|
|
244
|
-
charOffset: z.ZodNumber;
|
|
245
|
-
charLength: z.ZodNumber;
|
|
246
|
-
totalChars: z.ZodNumber;
|
|
247
|
-
nextCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
248
|
-
}, z.core.$strip>>;
|
|
249
|
-
}, z.core.$strip>;
|
|
250
|
-
export type LocalSearchCodeOutput = z.infer<typeof LocalSearchCodeOutputSchema>;
|
|
94
|
+
export interface LocalSearchMatch {
|
|
95
|
+
line: number;
|
|
96
|
+
endLine?: number;
|
|
97
|
+
value?: string;
|
|
98
|
+
column?: number;
|
|
99
|
+
endColumn?: number;
|
|
100
|
+
count?: number;
|
|
101
|
+
/** AST node-kind label when classifyMatches ran (declaration|callsite|…). */
|
|
102
|
+
kind?: string;
|
|
103
|
+
/** Deterministic hint derived from kind (0.0..1.0); not a ranker score. */
|
|
104
|
+
scoreHint?: number;
|
|
105
|
+
metavars?: Record<string, string[]>;
|
|
106
|
+
metavarRanges?: Record<string, Array<{
|
|
107
|
+
text: string;
|
|
108
|
+
line: number;
|
|
109
|
+
column: number;
|
|
110
|
+
endLine: number;
|
|
111
|
+
endColumn: number;
|
|
112
|
+
}>>;
|
|
113
|
+
}
|
|
114
|
+
export interface LocalSearchFile {
|
|
115
|
+
path: string;
|
|
116
|
+
absolutePath?: string;
|
|
117
|
+
uri?: string;
|
|
118
|
+
matches?: LocalSearchMatch[];
|
|
119
|
+
totalOccurrences?: number;
|
|
120
|
+
totalMatchedLines?: number;
|
|
121
|
+
totalMatchRows?: number;
|
|
122
|
+
returnedMatchRows?: number;
|
|
123
|
+
ranking?: {
|
|
124
|
+
score: number;
|
|
125
|
+
profile?: string;
|
|
126
|
+
pathRole?: string;
|
|
127
|
+
reasons?: string[];
|
|
128
|
+
};
|
|
129
|
+
matchPagination?: LocalItemPagination;
|
|
130
|
+
pagination?: LocalItemPagination;
|
|
131
|
+
next?: Record<string, ToolContinuation>;
|
|
132
|
+
}
|
|
133
|
+
export interface LocalSearchCodeData {
|
|
134
|
+
files?: LocalSearchFile[];
|
|
135
|
+
summary?: string;
|
|
136
|
+
searchEngine?: string;
|
|
137
|
+
stats?: {
|
|
138
|
+
totalOccurrences?: number;
|
|
139
|
+
matchedLines?: number;
|
|
140
|
+
filesMatched?: number;
|
|
141
|
+
filesSearched?: number;
|
|
142
|
+
bytesSearched?: number;
|
|
143
|
+
searchTime?: string;
|
|
144
|
+
[key: string]: unknown;
|
|
145
|
+
};
|
|
146
|
+
pagination?: LocalItemPagination;
|
|
147
|
+
next?: Record<string, ToolContinuation>;
|
|
148
|
+
}
|
|
149
|
+
export type LocalSearchCodeOutput = BulkToolOutput<LocalSearchCodeData>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
2
|
import { type ViewStructureQuery } from './scheme.js';
|
|
3
3
|
import type { ToolExecutionArgs } from '../../types/execution.js';
|
|
4
|
-
export { finalizeViewStructureResult } from './local_view_structure.js';
|
|
5
4
|
export declare function executeViewStructure(args: ToolExecutionArgs<ViewStructureQuery>): Promise<CallToolResult>;
|
|
@@ -3,5 +3,4 @@ import type { WithOptionalMeta } from '../../types/execution.js';
|
|
|
3
3
|
import type { ViewStructureQuery as LocalViewStructureQuery } from './scheme.js';
|
|
4
4
|
type ViewStructureQuery = WithOptionalMeta<LocalViewStructureQuery>;
|
|
5
5
|
export declare function viewStructure(query: ViewStructureQuery): Promise<LocalViewStructureToolResult>;
|
|
6
|
-
export declare function finalizeViewStructureResult(result: LocalViewStructureToolResult, _query: ViewStructureQuery): LocalViewStructureToolResult;
|
|
7
6
|
export {};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import type { LocalItemPagination, ToolContinuation } from '../../scheme/pagination.js';
|
|
3
|
+
import type { BulkToolOutput } from '../../types/toolOutput.js';
|
|
2
4
|
export declare const LocalViewStructureQuerySchema: z.ZodObject<{
|
|
3
5
|
path: z.ZodString;
|
|
4
|
-
|
|
6
|
+
detail: z.ZodDefault<z.ZodEnum<{
|
|
7
|
+
full: "full";
|
|
8
|
+
modified: "modified";
|
|
9
|
+
basic: "basic";
|
|
10
|
+
}>>;
|
|
5
11
|
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
6
12
|
sortBy: z.ZodDefault<z.ZodEnum<{
|
|
7
13
|
extension: "extension";
|
|
@@ -11,13 +17,14 @@ export declare const LocalViewStructureQuerySchema: z.ZodObject<{
|
|
|
11
17
|
}>>;
|
|
12
18
|
reverse: z.ZodOptional<z.ZodBoolean>;
|
|
13
19
|
pattern: z.ZodOptional<z.ZodString>;
|
|
14
|
-
|
|
15
|
-
|
|
20
|
+
entryType: z.ZodOptional<z.ZodEnum<{
|
|
21
|
+
f: "f";
|
|
22
|
+
d: "d";
|
|
23
|
+
}>>;
|
|
16
24
|
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
17
25
|
extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
26
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
19
27
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
20
|
-
showFileLastModified: z.ZodOptional<z.ZodBoolean>;
|
|
21
28
|
page: z.ZodDefault<z.ZodNumber>;
|
|
22
29
|
itemsPerPage: z.ZodOptional<z.ZodNumber>;
|
|
23
30
|
id: z.ZodOptional<z.ZodString>;
|
|
@@ -31,86 +38,26 @@ export declare const LocalViewStructureBulkQuerySchema: z.ZodObject<{
|
|
|
31
38
|
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
32
39
|
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
33
40
|
}, z.core.$strip>;
|
|
34
|
-
export
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
permissions: z.ZodOptional<z.ZodString>;
|
|
58
|
-
}, z.core.$strip>>>;
|
|
59
|
-
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
60
|
-
folders: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
61
|
-
links: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
62
|
-
summary: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
|
|
63
|
-
pagination: z.ZodOptional<z.ZodObject<{
|
|
64
|
-
currentPage: z.ZodNumber;
|
|
65
|
-
totalPages: z.ZodNumber;
|
|
66
|
-
hasMore: z.ZodBoolean;
|
|
67
|
-
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
68
|
-
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
69
|
-
totalItems: z.ZodOptional<z.ZodNumber>;
|
|
70
|
-
perPage: z.ZodOptional<z.ZodNumber>;
|
|
71
|
-
totalFound: z.ZodOptional<z.ZodNumber>;
|
|
72
|
-
returned: z.ZodOptional<z.ZodNumber>;
|
|
73
|
-
reportedTotalMatches: z.ZodOptional<z.ZodNumber>;
|
|
74
|
-
reachableTotalMatches: z.ZodOptional<z.ZodNumber>;
|
|
75
|
-
totalMatchesKind: z.ZodOptional<z.ZodEnum<{
|
|
76
|
-
exact: "exact";
|
|
77
|
-
reported: "reported";
|
|
78
|
-
lowerBound: "lowerBound";
|
|
79
|
-
}>>;
|
|
80
|
-
totalMatchesCapped: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
-
totalResults: z.ZodOptional<z.ZodNumber>;
|
|
82
|
-
itemsPerPage: z.ZodOptional<z.ZodNumber>;
|
|
83
|
-
filesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
84
|
-
entriesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
85
|
-
matchesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
86
|
-
totalFiles: z.ZodOptional<z.ZodNumber>;
|
|
87
|
-
totalEntries: z.ZodOptional<z.ZodNumber>;
|
|
88
|
-
totalMatches: z.ZodOptional<z.ZodNumber>;
|
|
89
|
-
totalFilesFound: z.ZodOptional<z.ZodNumber>;
|
|
90
|
-
nextMatchPage: z.ZodOptional<z.ZodNumber>;
|
|
91
|
-
}, z.core.$strip>>;
|
|
92
|
-
next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
93
|
-
tool: z.ZodString;
|
|
94
|
-
query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
95
|
-
why: z.ZodOptional<z.ZodString>;
|
|
96
|
-
confidence: z.ZodOptional<z.ZodEnum<{
|
|
97
|
-
exact: "exact";
|
|
98
|
-
heuristic: "heuristic";
|
|
99
|
-
}>>;
|
|
100
|
-
}, z.core.$strip>>>;
|
|
101
|
-
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
102
|
-
}, z.core.$strip>;
|
|
103
|
-
}, z.core.$strip>>;
|
|
104
|
-
base: z.ZodOptional<z.ZodString>;
|
|
105
|
-
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
106
|
-
responsePagination: z.ZodOptional<z.ZodObject<{
|
|
107
|
-
currentPage: z.ZodNumber;
|
|
108
|
-
totalPages: z.ZodNumber;
|
|
109
|
-
hasMore: z.ZodBoolean;
|
|
110
|
-
charOffset: z.ZodNumber;
|
|
111
|
-
charLength: z.ZodNumber;
|
|
112
|
-
totalChars: z.ZodNumber;
|
|
113
|
-
nextCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
114
|
-
}, z.core.$strip>>;
|
|
115
|
-
}, z.core.$strip>;
|
|
116
|
-
export type LocalViewStructureOutput = z.infer<typeof LocalViewStructureOutputSchema>;
|
|
41
|
+
export interface LocalViewStructureEntry {
|
|
42
|
+
name?: string;
|
|
43
|
+
type: 'file' | 'dir' | 'directory' | 'link' | 'symlink';
|
|
44
|
+
path?: string;
|
|
45
|
+
absolutePath?: string;
|
|
46
|
+
uri?: string;
|
|
47
|
+
depth?: number;
|
|
48
|
+
size?: number | string;
|
|
49
|
+
sizeBytes?: number;
|
|
50
|
+
modified?: string;
|
|
51
|
+
permissions?: string;
|
|
52
|
+
}
|
|
53
|
+
export interface LocalViewStructureData {
|
|
54
|
+
path?: string;
|
|
55
|
+
entries?: LocalViewStructureEntry[];
|
|
56
|
+
files?: string[];
|
|
57
|
+
folders?: string[];
|
|
58
|
+
links?: string[];
|
|
59
|
+
summary?: string | Record<string, unknown>;
|
|
60
|
+
pagination?: LocalItemPagination;
|
|
61
|
+
next?: Record<string, ToolContinuation>;
|
|
62
|
+
}
|
|
63
|
+
export type LocalViewStructureOutput = BulkToolOutput<LocalViewStructureData>;
|
|
@@ -9,11 +9,9 @@ export interface DirectoryEntry {
|
|
|
9
9
|
extension?: string;
|
|
10
10
|
depth?: number;
|
|
11
11
|
}
|
|
12
|
-
type EntryFilterQuery =
|
|
12
|
+
type EntryFilterQuery = {
|
|
13
13
|
pattern?: string;
|
|
14
|
-
|
|
15
|
-
filesOnly?: boolean;
|
|
16
|
-
}, 'pattern' | 'directoriesOnly' | 'filesOnly'>;
|
|
14
|
+
};
|
|
17
15
|
export declare function applyEntryFilters(entries: DirectoryEntry[], query: EntryFilterQuery): DirectoryEntry[];
|
|
18
16
|
interface EntryOutput {
|
|
19
17
|
type: 'file' | 'dir' | 'link';
|
|
@@ -22,6 +22,7 @@ export declare function paginateEntries(entries: DirectoryEntry[], query: {
|
|
|
22
22
|
totalEntries: number;
|
|
23
23
|
hasMore: boolean;
|
|
24
24
|
nextPage?: number;
|
|
25
|
+
outOfRange?: boolean;
|
|
25
26
|
};
|
|
26
27
|
};
|
|
27
28
|
export declare function buildEntryPaginationHints(entries: DirectoryEntry[], paginatedCount: number, pagination: {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { DirectoryEntry } from './structureFilters.js';
|
|
2
|
+
type ViewStructureNextCall = {
|
|
3
|
+
tool: 'localGetFileContent' | 'localViewStructure';
|
|
4
|
+
query: Record<string, unknown>;
|
|
5
|
+
why: string;
|
|
6
|
+
confidence?: 'exact' | 'high' | 'medium' | 'low';
|
|
7
|
+
};
|
|
8
|
+
export type ViewStructureNextMap = {
|
|
9
|
+
fetch?: ViewStructureNextCall;
|
|
10
|
+
viewDeeper?: ViewStructureNextCall;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Build per-result continuation hints for a localViewStructure response: read
|
|
14
|
+
* the first listed file, and/or descend into the first listed subdirectory.
|
|
15
|
+
* `nextPage` (pagination) is added separately by the caller.
|
|
16
|
+
*
|
|
17
|
+
* Queries carry each entry's absolute path, which the response
|
|
18
|
+
* path-relativizer deliberately leaves untouched inside `next` (see
|
|
19
|
+
* SKIP_TRAVERSAL_KEYS in utils/response/pathRelativize.ts), so hints stay
|
|
20
|
+
* directly callable with no manual path conversion. Meta-free by construction:
|
|
21
|
+
* queries are built from the entry path alone, never spread from the caller
|
|
22
|
+
* query, so no auto-filled id/researchGoal/reasoning can leak in.
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildViewStructureNextMap(entries: readonly DirectoryEntry[]): ViewStructureNextMap | undefined;
|
|
25
|
+
export {};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { executeLspGetSemantics } from './execution.js';
|
|
2
|
-
export { BulkLspGetSemanticsQuerySchema,
|
|
2
|
+
export { BulkLspGetSemanticsQuerySchema, LspGetSemanticsQuerySchema, } from './scheme.js';
|
|
3
|
+
export type { LspGetSemanticsOutput } from './scheme.js';
|