@octocodeai/octocode-tools-core 16.3.0 → 16.6.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 +564 -0
- package/dist/config.d.ts +7 -0
- package/dist/direct.js +39 -41
- package/dist/errors/pathUtils.d.ts +1 -1
- package/dist/github/directoryFetch.d.ts +2 -1
- package/dist/github/githubAPI.d.ts +32 -1
- package/dist/github/history.d.ts +3 -0
- package/dist/github/prTransformation.d.ts +1 -1
- package/dist/github/repoStructureRecursive.d.ts +6 -0
- package/dist/index.d.ts +16 -30
- package/dist/index.js +44 -46
- package/dist/oql/adapters/compile.d.ts +25 -0
- package/dist/oql/adapters/github.d.ts +3 -0
- package/dist/oql/adapters/local.d.ts +7 -0
- package/dist/oql/adapters/materialize.d.ts +11 -0
- package/dist/oql/adapters/pagination.d.ts +21 -0
- package/dist/oql/adapters/researchTargets.d.ts +50 -0
- package/dist/oql/adapters/resultMap.d.ts +20 -0
- package/dist/oql/adapters/ruleYaml.d.ts +11 -0
- package/dist/oql/adapters/runner.d.ts +14 -0
- package/dist/oql/adapters/v2.d.ts +32 -0
- package/dist/oql/capabilities.d.ts +31 -0
- package/dist/oql/defaults.d.ts +26 -0
- package/dist/oql/diagnostics.d.ts +25 -0
- package/dist/oql/diffLanes.d.ts +29 -0
- package/dist/oql/envelope.d.ts +19 -0
- package/dist/oql/features.d.ts +7 -0
- package/dist/oql/index.d.ts +26 -0
- package/dist/oql/index.js +49 -0
- package/dist/oql/normalize.d.ts +5 -0
- package/dist/oql/planner.d.ts +7 -0
- package/dist/oql/research/analyze.d.ts +134 -0
- package/dist/oql/research/packets.d.ts +80 -0
- package/dist/oql/run.d.ts +32 -0
- package/dist/oql/schema.d.ts +1018 -0
- package/dist/oql/schemeText.d.ts +138 -0
- package/dist/oql/shorthand.d.ts +177 -0
- package/dist/oql/targetParams.d.ts +20 -0
- package/dist/oql/transformers/contract.d.ts +19 -0
- package/dist/oql/transformers/github/code.d.ts +17 -0
- package/dist/oql/transformers/github/common.d.ts +8 -0
- package/dist/oql/transformers/language.d.ts +1 -0
- package/dist/oql/transformers/registry.d.ts +16 -0
- package/dist/oql/transformers/types.d.ts +11 -0
- package/dist/oql/types.d.ts +633 -0
- package/dist/oql/v2params.d.ts +22 -0
- package/dist/providers/providerQueries.d.ts +9 -0
- package/dist/providers/providerResults.d.ts +2 -0
- package/dist/providers/types.d.ts +1 -1
- package/dist/schema.d.ts +13 -0
- package/dist/schema.js +8 -0
- package/dist/scheme/coreSchemas.d.ts +5 -5
- package/dist/scheme/fields.d.ts +6 -6
- package/dist/serverConfig.d.ts +1 -2
- package/dist/session.d.ts +2 -24
- package/dist/shared/config/defaults.d.ts +14 -0
- package/dist/shared/config/index.d.ts +9 -0
- package/dist/shared/config/index.js +9 -0
- package/dist/shared/config/loader.d.ts +7 -0
- package/dist/shared/config/resolver.d.ts +2 -0
- package/dist/shared/config/resolverCache.d.ts +12 -0
- package/dist/shared/config/resolverSections.d.ts +10 -0
- package/dist/shared/config/runtimeSurface.d.ts +21 -0
- package/dist/shared/config/schemas.d.ts +11 -0
- package/dist/shared/config/types.d.ts +92 -0
- package/dist/shared/config/validator.d.ts +2 -0
- package/dist/shared/credentials/constants.d.ts +2 -0
- package/dist/shared/credentials/credentialCache.d.ts +13 -0
- package/dist/shared/credentials/credentialEncryption.d.ts +10 -0
- package/dist/shared/credentials/credentialUtils.d.ts +4 -0
- package/dist/shared/credentials/envTokens.d.ts +9 -0
- package/dist/shared/credentials/ghCli.d.ts +1 -0
- package/dist/shared/credentials/index.d.ts +3 -0
- package/dist/shared/credentials/index.js +8 -0
- package/dist/shared/credentials/schemas.d.ts +22 -0
- package/dist/shared/credentials/storage.d.ts +30 -0
- package/dist/shared/credentials/testing.d.ts +2 -0
- package/dist/shared/credentials/testing.js +8 -0
- package/dist/shared/credentials/tokenRefresh.d.ts +24 -0
- package/dist/shared/credentials/tokenResolution.d.ts +30 -0
- package/dist/shared/credentials/types.d.ts +28 -0
- package/dist/shared/fs-utils.d.ts +2 -0
- package/dist/shared/fs-utils.js +8 -0
- package/dist/shared/index.d.ts +6 -0
- package/dist/shared/languageSelectors.d.ts +23 -0
- package/dist/shared/paths.d.ts +31 -0
- package/dist/shared/paths.js +8 -0
- package/dist/shared/platform/index.d.ts +1 -0
- package/dist/shared/platform/index.js +8 -0
- package/dist/shared/platform/platform.d.ts +8 -0
- package/dist/shared/session/index.d.ts +5 -0
- package/dist/shared/session/index.js +8 -0
- package/dist/shared/session/schemas.d.ts +103 -0
- package/dist/shared/session/sessionCache.d.ts +9 -0
- package/dist/shared/session/sessionDiskIO.d.ts +6 -0
- package/dist/shared/session/statsDefaults.d.ts +4 -0
- package/dist/shared/session/storage.d.ts +20 -0
- package/dist/shared/session/types.d.ts +53 -0
- package/dist/tools/directToolCatalog.d.ts +15 -56
- package/dist/tools/directToolCatalog.exec.d.ts +11 -0
- package/dist/tools/directToolCatalog.meta.d.ts +82 -0
- package/dist/tools/github_clone_repo/cache.d.ts +5 -1
- package/dist/tools/github_clone_repo/scheme.d.ts +56 -9
- package/dist/tools/github_clone_repo/types.d.ts +3 -1
- package/dist/tools/github_fetch_content/scheme.d.ts +112 -4
- package/dist/tools/github_fetch_content/types.d.ts +39 -0
- package/dist/tools/github_search_code/scheme.d.ts +6 -6
- package/dist/tools/github_search_pull_requests/contentResponse.d.ts +0 -1
- package/dist/tools/github_search_pull_requests/execution.d.ts +1 -11
- package/dist/tools/github_search_pull_requests/scheme.d.ts +6 -2
- package/dist/tools/github_search_repos/scheme.d.ts +7 -6
- package/dist/tools/github_view_repo_structure/execution.d.ts +0 -9
- package/dist/tools/github_view_repo_structure/scheme.d.ts +10 -6
- package/dist/tools/local_binary_inspect/archiveOps.d.ts +2 -0
- package/dist/tools/local_binary_inspect/binaryInspector.d.ts +48 -7
- package/dist/tools/local_binary_inspect/binaryOps.d.ts +16 -7
- package/dist/tools/local_binary_inspect/scheme.d.ts +10 -7
- package/dist/tools/local_fetch_content/scheme.d.ts +2 -2
- package/dist/tools/local_find_files/scheme.d.ts +2 -2
- package/dist/tools/local_ripgrep/lspBoost.d.ts +54 -0
- package/dist/tools/local_ripgrep/rankingProfile.d.ts +113 -0
- package/dist/tools/local_ripgrep/ripgrepResultBuilder.d.ts +10 -1
- package/dist/tools/local_ripgrep/scheme.d.ts +29 -4
- package/dist/tools/local_ripgrep/structuralSearch.d.ts +3 -4
- package/dist/tools/local_view_structure/scheme.d.ts +2 -2
- package/dist/tools/local_view_structure/structureFilters.d.ts +1 -3
- package/dist/tools/local_view_structure/structureResponse.d.ts +1 -0
- package/dist/tools/lsp/semantic_content/scheme.d.ts +174 -10
- package/dist/tools/lsp/shared/callHierarchyTraversal.d.ts +2 -2
- package/dist/tools/lsp/shared/resolveSymbolAnchor.d.ts +2 -2
- package/dist/tools/lsp/shared/semanticTypes.d.ts +36 -6
- package/dist/tools/oql_search/execution.d.ts +7 -0
- package/dist/tools/package_search/execution.d.ts +10 -0
- package/dist/tools/package_search/scheme.d.ts +9 -7
- package/dist/tools/providerMappers.d.ts +24 -5
- package/dist/tools/toolConfig.d.ts +1 -0
- package/dist/tools/toolMetadata/proxies.d.ts +0 -6
- package/dist/tools/toolNames.d.ts +2 -0
- package/dist/tools/utils.d.ts +3 -7
- package/dist/types/bulk.d.ts +0 -2
- package/dist/types/execution.d.ts +1 -2
- package/dist/types/server.d.ts +0 -1
- package/dist/types/session.d.ts +0 -19
- package/dist/types/toolResults.d.ts +2 -3
- package/dist/utils/contextUtils.d.ts +49 -2
- package/dist/utils/core/lines.d.ts +16 -0
- package/dist/utils/core/types.d.ts +12 -1
- package/dist/utils/file/filters.d.ts +2 -11
- package/dist/utils/markdownOutline.d.ts +10 -0
- package/dist/utils/parsers/diff.d.ts +18 -0
- package/dist/utils/response/error.d.ts +38 -4
- package/dist/utils/response/groupedFinalizer.d.ts +0 -25
- package/package.json +51 -14
- package/dist/commands/BaseCommandBuilder.d.ts +0 -14
- package/dist/commands/FindCommandBuilder.d.ts +0 -23
- package/dist/commands/LsCommandBuilder.d.ts +0 -15
- package/dist/commands/RipgrepCommandBuilder.d.ts +0 -27
- package/dist/hints/dynamic.d.ts +0 -6
- package/dist/hints/index.d.ts +0 -2
- package/dist/hints/types.d.ts +0 -1
- package/dist/tools/github_clone_repo/hints.d.ts +0 -2
- package/dist/tools/github_fetch_content/hints.d.ts +0 -2
- package/dist/tools/github_search_code/hints.d.ts +0 -2
- package/dist/tools/github_search_pull_requests/hints.d.ts +0 -2
- package/dist/tools/github_search_repos/hints.d.ts +0 -2
- package/dist/tools/github_view_repo_structure/hints.d.ts +0 -2
- package/dist/tools/local_fetch_content/hints.d.ts +0 -2
- package/dist/tools/local_find_files/hints.d.ts +0 -2
- package/dist/tools/local_ripgrep/grepFallbackExecutor.d.ts +0 -3
- package/dist/tools/local_ripgrep/hints.d.ts +0 -2
- package/dist/tools/local_ripgrep/ripgrepParser.d.ts +0 -9
- package/dist/tools/local_view_structure/hints.d.ts +0 -2
- package/dist/tools/local_view_structure/structureParser.d.ts +0 -3
- package/dist/tools/local_view_structure/structureWalker.d.ts +0 -24
- package/dist/tools/lsp/semantic_content/hints.d.ts +0 -4
- package/dist/tools/package_search/hints.d.ts +0 -2
- package/dist/types/metadata.d.ts +0 -69
- package/dist/utils/exec/commandAvailability.d.ts +0 -19
- package/dist/utils/exec/ripgrepBinary.d.ts +0 -3
- package/dist/utils/pagination/outputSizeLimit.d.ts +0 -16
- package/dist/utils/response/structuredPagination.d.ts +0 -9
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const LspGetSemanticsQueryDisplaySchema: z.ZodObject<{
|
|
3
|
-
uri: z.ZodString
|
|
3
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
4
4
|
type: z.ZodDefault<z.ZodEnum<{
|
|
5
|
-
references: "references";
|
|
6
5
|
definition: "definition";
|
|
6
|
+
references: "references";
|
|
7
7
|
callers: "callers";
|
|
8
8
|
callees: "callees";
|
|
9
9
|
callHierarchy: "callHierarchy";
|
|
@@ -11,6 +11,10 @@ export declare const LspGetSemanticsQueryDisplaySchema: z.ZodObject<{
|
|
|
11
11
|
documentSymbols: "documentSymbols";
|
|
12
12
|
typeDefinition: "typeDefinition";
|
|
13
13
|
implementation: "implementation";
|
|
14
|
+
workspaceSymbol: "workspaceSymbol";
|
|
15
|
+
supertypes: "supertypes";
|
|
16
|
+
subtypes: "subtypes";
|
|
17
|
+
diagnostic: "diagnostic";
|
|
14
18
|
}>>;
|
|
15
19
|
symbolName: z.ZodOptional<z.ZodString>;
|
|
16
20
|
lineHint: z.ZodOptional<z.ZodNumber>;
|
|
@@ -32,10 +36,10 @@ export declare const LspGetSemanticsQueryDisplaySchema: z.ZodObject<{
|
|
|
32
36
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
33
37
|
}, z.core.$strip>;
|
|
34
38
|
export declare const LspGetSemanticsQuerySchema: z.ZodObject<{
|
|
35
|
-
uri: z.ZodString
|
|
39
|
+
uri: z.ZodOptional<z.ZodString>;
|
|
36
40
|
type: z.ZodDefault<z.ZodEnum<{
|
|
37
|
-
references: "references";
|
|
38
41
|
definition: "definition";
|
|
42
|
+
references: "references";
|
|
39
43
|
callers: "callers";
|
|
40
44
|
callees: "callees";
|
|
41
45
|
callHierarchy: "callHierarchy";
|
|
@@ -43,6 +47,10 @@ export declare const LspGetSemanticsQuerySchema: z.ZodObject<{
|
|
|
43
47
|
documentSymbols: "documentSymbols";
|
|
44
48
|
typeDefinition: "typeDefinition";
|
|
45
49
|
implementation: "implementation";
|
|
50
|
+
workspaceSymbol: "workspaceSymbol";
|
|
51
|
+
supertypes: "supertypes";
|
|
52
|
+
subtypes: "subtypes";
|
|
53
|
+
diagnostic: "diagnostic";
|
|
46
54
|
}>>;
|
|
47
55
|
symbolName: z.ZodOptional<z.ZodString>;
|
|
48
56
|
lineHint: z.ZodOptional<z.ZodNumber>;
|
|
@@ -64,14 +72,13 @@ export declare const LspGetSemanticsQuerySchema: z.ZodObject<{
|
|
|
64
72
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
65
73
|
}, z.core.$strip>;
|
|
66
74
|
export declare const BulkLspGetSemanticsQuerySchema: z.ZodObject<{
|
|
67
|
-
responseCharOffset: z.ZodOptional<z.
|
|
68
|
-
responseCharLength: z.ZodOptional<z.
|
|
75
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
76
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
69
77
|
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
70
78
|
}, z.core.$strip>;
|
|
71
79
|
export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
|
|
72
80
|
base: z.ZodOptional<z.ZodString>;
|
|
73
81
|
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
74
|
-
hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
75
82
|
results: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
76
83
|
id: z.ZodString;
|
|
77
84
|
status: z.ZodLiteral<"empty">;
|
|
@@ -157,6 +164,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
|
|
|
157
164
|
noReferences: "noReferences";
|
|
158
165
|
noHover: "noHover";
|
|
159
166
|
noCalls: "noCalls";
|
|
167
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
168
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
169
|
+
noDiagnostics: "noDiagnostics";
|
|
160
170
|
}>;
|
|
161
171
|
reason: z.ZodString;
|
|
162
172
|
}, z.core.$strip>>;
|
|
@@ -216,6 +226,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
|
|
|
216
226
|
noReferences: "noReferences";
|
|
217
227
|
noHover: "noHover";
|
|
218
228
|
noCalls: "noCalls";
|
|
229
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
230
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
231
|
+
noDiagnostics: "noDiagnostics";
|
|
219
232
|
}>;
|
|
220
233
|
reason: z.ZodString;
|
|
221
234
|
}, z.core.$strip>>;
|
|
@@ -256,6 +269,77 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
|
|
|
256
269
|
noReferences: "noReferences";
|
|
257
270
|
noHover: "noHover";
|
|
258
271
|
noCalls: "noCalls";
|
|
272
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
273
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
274
|
+
noDiagnostics: "noDiagnostics";
|
|
275
|
+
}>;
|
|
276
|
+
reason: z.ZodString;
|
|
277
|
+
}, z.core.$strip>>;
|
|
278
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
279
|
+
kind: z.ZodLiteral<"workspaceSymbol">;
|
|
280
|
+
query: z.ZodString;
|
|
281
|
+
symbols: z.ZodArray<z.ZodUnknown>;
|
|
282
|
+
totalSymbols: z.ZodNumber;
|
|
283
|
+
empty: z.ZodOptional<z.ZodObject<{
|
|
284
|
+
category: z.ZodEnum<{
|
|
285
|
+
serverUnavailable: "serverUnavailable";
|
|
286
|
+
unsupportedOperation: "unsupportedOperation";
|
|
287
|
+
symbolNotFound: "symbolNotFound";
|
|
288
|
+
anchorFailed: "anchorFailed";
|
|
289
|
+
noLocations: "noLocations";
|
|
290
|
+
noReferences: "noReferences";
|
|
291
|
+
noHover: "noHover";
|
|
292
|
+
noCalls: "noCalls";
|
|
293
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
294
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
295
|
+
noDiagnostics: "noDiagnostics";
|
|
296
|
+
}>;
|
|
297
|
+
reason: z.ZodString;
|
|
298
|
+
}, z.core.$strip>>;
|
|
299
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
300
|
+
kind: z.ZodLiteral<"typeHierarchy">;
|
|
301
|
+
direction: z.ZodEnum<{
|
|
302
|
+
supertypes: "supertypes";
|
|
303
|
+
subtypes: "subtypes";
|
|
304
|
+
}>;
|
|
305
|
+
root: z.ZodOptional<z.ZodUnknown>;
|
|
306
|
+
items: z.ZodArray<z.ZodUnknown>;
|
|
307
|
+
totalItems: z.ZodNumber;
|
|
308
|
+
empty: z.ZodOptional<z.ZodObject<{
|
|
309
|
+
category: z.ZodEnum<{
|
|
310
|
+
serverUnavailable: "serverUnavailable";
|
|
311
|
+
unsupportedOperation: "unsupportedOperation";
|
|
312
|
+
symbolNotFound: "symbolNotFound";
|
|
313
|
+
anchorFailed: "anchorFailed";
|
|
314
|
+
noLocations: "noLocations";
|
|
315
|
+
noReferences: "noReferences";
|
|
316
|
+
noHover: "noHover";
|
|
317
|
+
noCalls: "noCalls";
|
|
318
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
319
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
320
|
+
noDiagnostics: "noDiagnostics";
|
|
321
|
+
}>;
|
|
322
|
+
reason: z.ZodString;
|
|
323
|
+
}, z.core.$strip>>;
|
|
324
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
325
|
+
kind: z.ZodLiteral<"diagnostic">;
|
|
326
|
+
diagnostics: z.ZodArray<z.ZodUnknown>;
|
|
327
|
+
totalDiagnostics: z.ZodNumber;
|
|
328
|
+
errorCount: z.ZodNumber;
|
|
329
|
+
warningCount: z.ZodNumber;
|
|
330
|
+
empty: z.ZodOptional<z.ZodObject<{
|
|
331
|
+
category: z.ZodEnum<{
|
|
332
|
+
serverUnavailable: "serverUnavailable";
|
|
333
|
+
unsupportedOperation: "unsupportedOperation";
|
|
334
|
+
symbolNotFound: "symbolNotFound";
|
|
335
|
+
anchorFailed: "anchorFailed";
|
|
336
|
+
noLocations: "noLocations";
|
|
337
|
+
noReferences: "noReferences";
|
|
338
|
+
noHover: "noHover";
|
|
339
|
+
noCalls: "noCalls";
|
|
340
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
341
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
342
|
+
noDiagnostics: "noDiagnostics";
|
|
259
343
|
}>;
|
|
260
344
|
reason: z.ZodString;
|
|
261
345
|
}, z.core.$strip>>;
|
|
@@ -270,6 +354,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
|
|
|
270
354
|
noReferences: "noReferences";
|
|
271
355
|
noHover: "noHover";
|
|
272
356
|
noCalls: "noCalls";
|
|
357
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
358
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
359
|
+
noDiagnostics: "noDiagnostics";
|
|
273
360
|
}>;
|
|
274
361
|
reason: z.ZodString;
|
|
275
362
|
}, z.core.$strip>], "kind">;
|
|
@@ -283,7 +370,6 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
|
|
|
283
370
|
}, z.core.$strip>>;
|
|
284
371
|
summary: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
285
372
|
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
286
|
-
hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
287
373
|
}, z.core.$strip>;
|
|
288
374
|
}, z.core.$strip>, z.ZodObject<{
|
|
289
375
|
id: z.ZodString;
|
|
@@ -291,7 +377,6 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
|
|
|
291
377
|
data: z.ZodObject<{
|
|
292
378
|
id: z.ZodOptional<z.ZodString>;
|
|
293
379
|
error: z.ZodString;
|
|
294
|
-
hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
295
380
|
}, z.core.$strip>;
|
|
296
381
|
}, z.core.$strip>, z.ZodObject<{
|
|
297
382
|
id: z.ZodString;
|
|
@@ -377,6 +462,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
|
|
|
377
462
|
noReferences: "noReferences";
|
|
378
463
|
noHover: "noHover";
|
|
379
464
|
noCalls: "noCalls";
|
|
465
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
466
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
467
|
+
noDiagnostics: "noDiagnostics";
|
|
380
468
|
}>;
|
|
381
469
|
reason: z.ZodString;
|
|
382
470
|
}, z.core.$strip>>;
|
|
@@ -436,6 +524,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
|
|
|
436
524
|
noReferences: "noReferences";
|
|
437
525
|
noHover: "noHover";
|
|
438
526
|
noCalls: "noCalls";
|
|
527
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
528
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
529
|
+
noDiagnostics: "noDiagnostics";
|
|
439
530
|
}>;
|
|
440
531
|
reason: z.ZodString;
|
|
441
532
|
}, z.core.$strip>>;
|
|
@@ -476,6 +567,77 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
|
|
|
476
567
|
noReferences: "noReferences";
|
|
477
568
|
noHover: "noHover";
|
|
478
569
|
noCalls: "noCalls";
|
|
570
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
571
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
572
|
+
noDiagnostics: "noDiagnostics";
|
|
573
|
+
}>;
|
|
574
|
+
reason: z.ZodString;
|
|
575
|
+
}, z.core.$strip>>;
|
|
576
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
577
|
+
kind: z.ZodLiteral<"workspaceSymbol">;
|
|
578
|
+
query: z.ZodString;
|
|
579
|
+
symbols: z.ZodArray<z.ZodUnknown>;
|
|
580
|
+
totalSymbols: z.ZodNumber;
|
|
581
|
+
empty: z.ZodOptional<z.ZodObject<{
|
|
582
|
+
category: z.ZodEnum<{
|
|
583
|
+
serverUnavailable: "serverUnavailable";
|
|
584
|
+
unsupportedOperation: "unsupportedOperation";
|
|
585
|
+
symbolNotFound: "symbolNotFound";
|
|
586
|
+
anchorFailed: "anchorFailed";
|
|
587
|
+
noLocations: "noLocations";
|
|
588
|
+
noReferences: "noReferences";
|
|
589
|
+
noHover: "noHover";
|
|
590
|
+
noCalls: "noCalls";
|
|
591
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
592
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
593
|
+
noDiagnostics: "noDiagnostics";
|
|
594
|
+
}>;
|
|
595
|
+
reason: z.ZodString;
|
|
596
|
+
}, z.core.$strip>>;
|
|
597
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
598
|
+
kind: z.ZodLiteral<"typeHierarchy">;
|
|
599
|
+
direction: z.ZodEnum<{
|
|
600
|
+
supertypes: "supertypes";
|
|
601
|
+
subtypes: "subtypes";
|
|
602
|
+
}>;
|
|
603
|
+
root: z.ZodOptional<z.ZodUnknown>;
|
|
604
|
+
items: z.ZodArray<z.ZodUnknown>;
|
|
605
|
+
totalItems: z.ZodNumber;
|
|
606
|
+
empty: z.ZodOptional<z.ZodObject<{
|
|
607
|
+
category: z.ZodEnum<{
|
|
608
|
+
serverUnavailable: "serverUnavailable";
|
|
609
|
+
unsupportedOperation: "unsupportedOperation";
|
|
610
|
+
symbolNotFound: "symbolNotFound";
|
|
611
|
+
anchorFailed: "anchorFailed";
|
|
612
|
+
noLocations: "noLocations";
|
|
613
|
+
noReferences: "noReferences";
|
|
614
|
+
noHover: "noHover";
|
|
615
|
+
noCalls: "noCalls";
|
|
616
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
617
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
618
|
+
noDiagnostics: "noDiagnostics";
|
|
619
|
+
}>;
|
|
620
|
+
reason: z.ZodString;
|
|
621
|
+
}, z.core.$strip>>;
|
|
622
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
623
|
+
kind: z.ZodLiteral<"diagnostic">;
|
|
624
|
+
diagnostics: z.ZodArray<z.ZodUnknown>;
|
|
625
|
+
totalDiagnostics: z.ZodNumber;
|
|
626
|
+
errorCount: z.ZodNumber;
|
|
627
|
+
warningCount: z.ZodNumber;
|
|
628
|
+
empty: z.ZodOptional<z.ZodObject<{
|
|
629
|
+
category: z.ZodEnum<{
|
|
630
|
+
serverUnavailable: "serverUnavailable";
|
|
631
|
+
unsupportedOperation: "unsupportedOperation";
|
|
632
|
+
symbolNotFound: "symbolNotFound";
|
|
633
|
+
anchorFailed: "anchorFailed";
|
|
634
|
+
noLocations: "noLocations";
|
|
635
|
+
noReferences: "noReferences";
|
|
636
|
+
noHover: "noHover";
|
|
637
|
+
noCalls: "noCalls";
|
|
638
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
639
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
640
|
+
noDiagnostics: "noDiagnostics";
|
|
479
641
|
}>;
|
|
480
642
|
reason: z.ZodString;
|
|
481
643
|
}, z.core.$strip>>;
|
|
@@ -490,6 +652,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
|
|
|
490
652
|
noReferences: "noReferences";
|
|
491
653
|
noHover: "noHover";
|
|
492
654
|
noCalls: "noCalls";
|
|
655
|
+
noWorkspaceSymbols: "noWorkspaceSymbols";
|
|
656
|
+
noTypeHierarchy: "noTypeHierarchy";
|
|
657
|
+
noDiagnostics: "noDiagnostics";
|
|
493
658
|
}>;
|
|
494
659
|
reason: z.ZodString;
|
|
495
660
|
}, z.core.$strip>], "kind">;
|
|
@@ -503,7 +668,6 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
|
|
|
503
668
|
}, z.core.$strip>>;
|
|
504
669
|
summary: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
505
670
|
warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
506
|
-
hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
507
671
|
}, z.core.$strip>;
|
|
508
672
|
}, z.core.$strip>]>>;
|
|
509
673
|
}, z.core.$strip>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LSPClient } from 'octocode-lsp/client';
|
|
2
|
-
import type { CallHierarchyItem, IncomingCall, OutgoingCall } from 'octocode-lsp/types';
|
|
1
|
+
import type { LSPClient } from '@octocodeai/octocode-engine/lsp/client';
|
|
2
|
+
import type { CallHierarchyItem, IncomingCall, OutgoingCall } from '@octocodeai/octocode-engine/lsp/types';
|
|
3
3
|
export type TraversalResult<T> = {
|
|
4
4
|
calls: T[];
|
|
5
5
|
truncatedByDepth: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { DocumentSymbolsSemanticQuery, SymbolAnchoredSemanticQuery, ResolvedSymbol } from './semanticTypes.js';
|
|
2
2
|
export type FileAnchor = {
|
|
3
3
|
uri: string;
|
|
4
4
|
absolutePath: string;
|
|
@@ -17,4 +17,4 @@ export type AnchorResolutionResult<T> = {
|
|
|
17
17
|
export declare function resolveFileAnchor(query: {
|
|
18
18
|
uri?: string;
|
|
19
19
|
}, toolName: string): Promise<AnchorResolutionResult<FileAnchor>>;
|
|
20
|
-
export declare function resolveSymbolAnchor(query:
|
|
20
|
+
export declare function resolveSymbolAnchor(query: SymbolAnchoredSemanticQuery | DocumentSymbolsSemanticQuery, toolName: string): Promise<AnchorResolutionResult<SymbolAnchor>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ExactPosition, LSPRange } from 'octocode-lsp/types';
|
|
2
|
-
export
|
|
3
|
-
export declare const SEMANTIC_CONTENT_TYPES: readonly ["definition", "references", "callers", "callees", "callHierarchy", "hover", "documentSymbols", "typeDefinition", "implementation"];
|
|
1
|
+
import type { ExactPosition, LSPRange } from '@octocodeai/octocode-engine/lsp/types';
|
|
2
|
+
export { LSP_GET_SEMANTIC_CONTENT_TOOL_NAME } from '../../toolNames.js';
|
|
3
|
+
export declare const SEMANTIC_CONTENT_TYPES: readonly ["definition", "references", "callers", "callees", "callHierarchy", "hover", "documentSymbols", "typeDefinition", "implementation", "workspaceSymbol", "supertypes", "subtypes", "diagnostic"];
|
|
4
4
|
export type SemanticContentType = (typeof SEMANTIC_CONTENT_TYPES)[number];
|
|
5
5
|
export type SemanticOutputFormat = 'structured' | 'compact';
|
|
6
6
|
export type SemanticQueryBase = {
|
|
@@ -17,7 +17,7 @@ export type SemanticQueryBase = {
|
|
|
17
17
|
reasoning?: string;
|
|
18
18
|
};
|
|
19
19
|
export type SymbolAnchoredSemanticQuery = SemanticQueryBase & {
|
|
20
|
-
type: Exclude<SemanticContentType, 'documentSymbols'>;
|
|
20
|
+
type: Exclude<SemanticContentType, 'documentSymbols' | 'workspaceSymbol' | 'diagnostic'>;
|
|
21
21
|
symbolName: string;
|
|
22
22
|
lineHint: number;
|
|
23
23
|
orderHint?: number;
|
|
@@ -28,7 +28,16 @@ export type SymbolAnchoredSemanticQuery = SemanticQueryBase & {
|
|
|
28
28
|
export type DocumentSymbolsSemanticQuery = SemanticQueryBase & {
|
|
29
29
|
type: 'documentSymbols';
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
/** `workspace/symbol`: project-wide fuzzy symbol search. `symbolName` is the query string. */
|
|
32
|
+
export type WorkspaceSymbolSemanticQuery = SemanticQueryBase & {
|
|
33
|
+
type: 'workspaceSymbol';
|
|
34
|
+
symbolName: string;
|
|
35
|
+
};
|
|
36
|
+
/** `textDocument/diagnostic` (pull): errors/warnings for a file without a position anchor. */
|
|
37
|
+
export type DiagnosticSemanticQuery = SemanticQueryBase & {
|
|
38
|
+
type: 'diagnostic';
|
|
39
|
+
};
|
|
40
|
+
export type LspGetSemanticsQuery = SymbolAnchoredSemanticQuery | DocumentSymbolsSemanticQuery | WorkspaceSymbolSemanticQuery | DiagnosticSemanticQuery;
|
|
32
41
|
export type ResolvedSymbol = {
|
|
33
42
|
name: string;
|
|
34
43
|
uri: string;
|
|
@@ -58,13 +67,14 @@ export type CompactLocation = {
|
|
|
58
67
|
export declare function compactLocation(snippet: {
|
|
59
68
|
uri: string;
|
|
60
69
|
content?: string;
|
|
70
|
+
range?: LSPRange;
|
|
61
71
|
displayRange?: {
|
|
62
72
|
startLine: number;
|
|
63
73
|
endLine: number;
|
|
64
74
|
};
|
|
65
75
|
isDefinition?: boolean;
|
|
66
76
|
}): CompactLocation;
|
|
67
|
-
export type SemanticEmptyCategory = 'serverUnavailable' | 'unsupportedOperation' | 'symbolNotFound' | 'anchorFailed' | 'noLocations' | 'noReferences' | 'noHover' | 'noCalls';
|
|
77
|
+
export type SemanticEmptyCategory = 'serverUnavailable' | 'unsupportedOperation' | 'symbolNotFound' | 'anchorFailed' | 'noLocations' | 'noReferences' | 'noHover' | 'noCalls' | 'noWorkspaceSymbols' | 'noTypeHierarchy' | 'noDiagnostics';
|
|
68
78
|
export type SemanticEmptyState = {
|
|
69
79
|
category: SemanticEmptyCategory;
|
|
70
80
|
reason: string;
|
|
@@ -123,6 +133,26 @@ export type LspSemanticEnvelope = {
|
|
|
123
133
|
totalSymbols?: number;
|
|
124
134
|
topLevelSymbols?: number;
|
|
125
135
|
empty?: SemanticEmptyState;
|
|
136
|
+
} | {
|
|
137
|
+
kind: 'workspaceSymbol';
|
|
138
|
+
query: string;
|
|
139
|
+
symbols: unknown[];
|
|
140
|
+
totalSymbols: number;
|
|
141
|
+
empty?: SemanticEmptyState;
|
|
142
|
+
} | {
|
|
143
|
+
kind: 'typeHierarchy';
|
|
144
|
+
direction: 'supertypes' | 'subtypes';
|
|
145
|
+
root?: unknown;
|
|
146
|
+
items: unknown[];
|
|
147
|
+
totalItems: number;
|
|
148
|
+
empty?: SemanticEmptyState;
|
|
149
|
+
} | {
|
|
150
|
+
kind: 'diagnostic';
|
|
151
|
+
diagnostics: unknown[];
|
|
152
|
+
totalDiagnostics: number;
|
|
153
|
+
errorCount: number;
|
|
154
|
+
warningCount: number;
|
|
155
|
+
empty?: SemanticEmptyState;
|
|
126
156
|
} | {
|
|
127
157
|
kind: 'empty';
|
|
128
158
|
category: SemanticEmptyCategory;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
|
|
3
|
+
type OqlSearchToolInput = Record<string, unknown> & {
|
|
4
|
+
authInfo?: AuthInfo;
|
|
5
|
+
};
|
|
6
|
+
export declare function executeOqlSearchTool(input: OqlSearchToolInput): Promise<CallToolResult>;
|
|
7
|
+
export {};
|
|
@@ -3,5 +3,15 @@ import type { z } from 'zod';
|
|
|
3
3
|
import type { NpmPackageQuerySchema } from '@octocodeai/octocode-core/schemas';
|
|
4
4
|
type NpmSearchQuery = z.input<typeof NpmPackageQuerySchema>;
|
|
5
5
|
import type { ToolExecutionArgs } from '../../types/execution.js';
|
|
6
|
+
type PackagePagination = {
|
|
7
|
+
currentPage: number;
|
|
8
|
+
totalPages: number;
|
|
9
|
+
perPage: number;
|
|
10
|
+
totalFound: number;
|
|
11
|
+
returned: number;
|
|
12
|
+
hasMore: boolean;
|
|
13
|
+
nextPage?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function buildPackagePagination(query: NpmSearchQuery, totalFound: number, returned: number, isKeyword: boolean): PackagePagination;
|
|
6
16
|
export declare function searchPackages(args: ToolExecutionArgs<NpmSearchQuery>): Promise<CallToolResult>;
|
|
7
17
|
export {};
|
|
@@ -8,8 +8,8 @@ export declare const NpmSearchQueryLocalSchema: z.ZodObject<{
|
|
|
8
8
|
reasoning: z.ZodOptional<z.ZodString>;
|
|
9
9
|
}, z.core.$strip>;
|
|
10
10
|
export declare const NpmSearchBulkQueryLocalSchema: z.ZodObject<{
|
|
11
|
-
responseCharOffset: z.ZodOptional<z.
|
|
12
|
-
responseCharLength: z.ZodOptional<z.
|
|
11
|
+
responseCharOffset: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
12
|
+
responseCharLength: z.ZodOptional<z.ZodPreprocess<z.ZodNumber>>;
|
|
13
13
|
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
14
14
|
}, z.core.$strip>;
|
|
15
15
|
export declare const NpmSearchOutputLocalSchema: z.ZodObject<{
|
|
@@ -21,9 +21,10 @@ export declare const NpmSearchOutputLocalSchema: z.ZodObject<{
|
|
|
21
21
|
version: z.ZodOptional<z.ZodString>;
|
|
22
22
|
description: z.ZodOptional<z.ZodString>;
|
|
23
23
|
license: z.ZodOptional<z.ZodString>;
|
|
24
|
-
|
|
24
|
+
downloads: z.ZodOptional<z.ZodNumber>;
|
|
25
25
|
repository: z.ZodOptional<z.ZodString>;
|
|
26
26
|
repositoryDirectory: z.ZodOptional<z.ZodString>;
|
|
27
|
+
next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
27
28
|
}, z.core.$loose>>>;
|
|
28
29
|
pagination: z.ZodOptional<z.ZodObject<{
|
|
29
30
|
currentPage: z.ZodNumber;
|
|
@@ -32,14 +33,15 @@ export declare const NpmSearchOutputLocalSchema: z.ZodObject<{
|
|
|
32
33
|
totalFound: z.ZodNumber;
|
|
33
34
|
returned: z.ZodNumber;
|
|
34
35
|
hasMore: z.ZodBoolean;
|
|
36
|
+
nextPage: z.ZodOptional<z.ZodNumber>;
|
|
35
37
|
}, z.core.$strip>>;
|
|
36
38
|
}, z.core.$loose>>;
|
|
37
39
|
status: z.ZodOptional<z.ZodString>;
|
|
38
40
|
}, z.core.$loose>>>;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
|
+
base: z.ZodOptional<z.ZodString>;
|
|
43
|
+
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
44
|
+
responsePagination: z.ZodOptional<z.ZodObject<{
|
|
43
45
|
currentPage: z.ZodNumber;
|
|
44
46
|
totalPages: z.ZodNumber;
|
|
45
47
|
hasMore: z.ZodBoolean;
|
|
@@ -9,6 +9,13 @@ type GitHubCodeSearchQuery = z.infer<typeof GitHubCodeSearchQuerySchema>;
|
|
|
9
9
|
type LocalFileContentQuery = z.infer<typeof FileContentQueryLocalSchema> & {
|
|
10
10
|
minify: import('../scheme/fields.js').MinifyMode;
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Char-boundary truncation mirroring the Rust engine's `truncate_unicode`:
|
|
14
|
+
* keeps at most `maxChars` Unicode scalars and appends `...` when it cuts.
|
|
15
|
+
* Never slices UTF-8 mid-codepoint or mid-token — the single data-layer bound
|
|
16
|
+
* for GitHub code-search match fragments (the render layer must not re-trim).
|
|
17
|
+
*/
|
|
18
|
+
export declare function truncateSnippetChars(value: string, maxChars?: number): string;
|
|
12
19
|
type GitHubPullRequestSearchQuery = z.infer<typeof GitHubPullRequestSearchQueryLocalSchema>;
|
|
13
20
|
type GitHubReposSearchSingleQuery = z.infer<typeof GitHubReposSearchSingleQuerySchema>;
|
|
14
21
|
type GitHubViewRepoStructureQuery = z.infer<typeof GitHubViewRepoStructureQuerySchema>;
|
|
@@ -35,7 +42,7 @@ export declare function mapCodeSearchToolQuery(query: WithOptionalMeta<GitHubCod
|
|
|
35
42
|
filename: string;
|
|
36
43
|
extension: string;
|
|
37
44
|
language: string | undefined;
|
|
38
|
-
match: "
|
|
45
|
+
match: "file" | "path";
|
|
39
46
|
limit: number | undefined;
|
|
40
47
|
page: number;
|
|
41
48
|
mainResearchGoal: string;
|
|
@@ -70,12 +77,14 @@ export interface CodeSearchPagination {
|
|
|
70
77
|
totalMatchesKind?: 'exact' | 'reported' | 'lowerBound';
|
|
71
78
|
totalMatchesCapped?: boolean;
|
|
72
79
|
hasMore: boolean;
|
|
80
|
+
nextPage?: number;
|
|
73
81
|
uniqueFileCount?: number;
|
|
74
82
|
}
|
|
75
83
|
export interface CodeSearchFlatResult {
|
|
76
84
|
results: CodeSearchGroupedResult[];
|
|
77
85
|
pagination?: CodeSearchPagination;
|
|
78
86
|
nonExistentScope?: boolean;
|
|
87
|
+
incompleteResults?: boolean;
|
|
79
88
|
}
|
|
80
89
|
export declare function mapCodeSearchProviderResult(data: CodeSearchResult, query: WithOptionalMeta<GitHubCodeSearchQuery>): CodeSearchFlatResult;
|
|
81
90
|
export declare function mapRepoSearchToolQuery(query: WithOptionalMeta<GitHubReposSearchSingleQuery>): {
|
|
@@ -92,7 +101,7 @@ export declare function mapRepoSearchToolQuery(query: WithOptionalMeta<GitHubRep
|
|
|
92
101
|
forks: string | undefined;
|
|
93
102
|
license: string | undefined;
|
|
94
103
|
goodFirstIssues: string | undefined;
|
|
95
|
-
match: ("
|
|
104
|
+
match: ("description" | "name" | "readme")[];
|
|
96
105
|
sort: "stars" | "forks" | "updated" | "created" | "best-match" | undefined;
|
|
97
106
|
limit: number | undefined;
|
|
98
107
|
page: number;
|
|
@@ -129,10 +138,18 @@ export declare function mapPullRequestToolQuery(query: PartialPRQuery): {
|
|
|
129
138
|
reactions: string;
|
|
130
139
|
interactions: string;
|
|
131
140
|
draft: boolean;
|
|
132
|
-
match: ("
|
|
141
|
+
match: ("title" | "comments" | "body")[];
|
|
142
|
+
milestone: string;
|
|
143
|
+
language: string;
|
|
144
|
+
checks: "success" | "failure" | "pending";
|
|
145
|
+
review: "none" | "approved" | "changes_requested" | "required";
|
|
146
|
+
locked: boolean;
|
|
147
|
+
visibility: "public" | "private";
|
|
148
|
+
teamMentions: string;
|
|
149
|
+
project: string;
|
|
133
150
|
archived: boolean | undefined;
|
|
134
151
|
content: unknown;
|
|
135
|
-
reviewMode: "
|
|
152
|
+
reviewMode: "full" | "summary";
|
|
136
153
|
filePage: number;
|
|
137
154
|
commentPage: number;
|
|
138
155
|
commitPage: number;
|
|
@@ -200,7 +217,7 @@ export declare function mapPullRequestProviderResultData(data: ProviderPullReque
|
|
|
200
217
|
in_reply_to_id?: number;
|
|
201
218
|
}[];
|
|
202
219
|
url: string;
|
|
203
|
-
state: "
|
|
220
|
+
state: "open" | "closed" | "merged";
|
|
204
221
|
draft: boolean;
|
|
205
222
|
author: string;
|
|
206
223
|
assignees: string[];
|
|
@@ -230,6 +247,7 @@ export declare function mapPullRequestProviderResultData(data: ProviderPullReque
|
|
|
230
247
|
}[];
|
|
231
248
|
resultData: Record<string, unknown>;
|
|
232
249
|
pagination: {
|
|
250
|
+
nextPage?: number;
|
|
233
251
|
hasMore: boolean;
|
|
234
252
|
uniqueFileCount?: number;
|
|
235
253
|
totalMatchesCapped?: boolean;
|
|
@@ -251,6 +269,7 @@ export declare function mapFileContentToolQuery(query: LocalFileContentQuery): {
|
|
|
251
269
|
matchString: string;
|
|
252
270
|
contextLines: number;
|
|
253
271
|
fullContent: boolean;
|
|
272
|
+
forceRefresh: boolean;
|
|
254
273
|
charOffset: number;
|
|
255
274
|
charLength: number;
|
|
256
275
|
minify: "none" | "standard" | "symbols";
|
|
@@ -38,4 +38,5 @@ export declare const LOCAL_FIND_FILES: ToolConfig;
|
|
|
38
38
|
export declare const LOCAL_FETCH_CONTENT: ToolConfig;
|
|
39
39
|
export declare const LSP_GET_SEMANTIC_CONTENT: ToolConfig;
|
|
40
40
|
export declare const LOCAL_BINARY_INSPECT: ToolConfig;
|
|
41
|
+
export declare const OQL_SEARCH: ToolConfig;
|
|
41
42
|
export declare const ALL_TOOLS: ToolConfig[];
|
|
@@ -2,9 +2,3 @@ export { TOOL_NAMES } from './names.js';
|
|
|
2
2
|
export { DESCRIPTIONS } from './descriptions.js';
|
|
3
3
|
export { isToolInMetadata } from './metadataPresence.js';
|
|
4
4
|
export { BASE_SCHEMA } from './baseSchema.js';
|
|
5
|
-
type HintsMap = Record<string, readonly string[]>;
|
|
6
|
-
export declare const TOOL_HINTS: Record<string, HintsMap>;
|
|
7
|
-
export declare const GENERIC_ERROR_HINTS: readonly string[];
|
|
8
|
-
export declare function getToolHintsSync(toolName: string, status: string): readonly string[];
|
|
9
|
-
export declare function getDynamicHints(toolName: string, key: string): readonly string[];
|
|
10
|
-
export declare function getGenericErrorHintsSync(): readonly string[];
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
export declare const STATIC_TOOL_NAMES: import("@octocodeai/octocode-core/types").ToolNames;
|
|
2
|
+
export declare const LSP_GET_SEMANTIC_CONTENT_TOOL_NAME: "lspGetSemantics";
|
|
3
|
+
export declare const OQL_SEARCH_TOOL_NAME = "oqlSearch";
|
|
2
4
|
export declare function isLocalTool(toolName: string): boolean;
|
package/dist/tools/utils.d.ts
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import type { ToolErrorResult, ToolSuccessResult, ToolInvocationCallback } from '../types/toolResults.js';
|
|
2
|
-
import type { HintContext } from '../types/metadata.js';
|
|
3
2
|
import type { ProviderResponse } from '../providers/types.js';
|
|
4
|
-
import { createErrorResult } from '../utils/response/error.js';
|
|
5
|
-
export { createErrorResult };
|
|
3
|
+
import { createErrorResult, safeParseOrError } from '../utils/response/error.js';
|
|
4
|
+
export { createErrorResult, safeParseOrError };
|
|
6
5
|
export declare function invokeCallbackSafely(callback: ToolInvocationCallback | undefined, toolName: string, queries: unknown[]): Promise<void>;
|
|
7
6
|
interface SuccessResultOptions {
|
|
8
|
-
hintContext?: HintContext;
|
|
9
|
-
prefixHints?: string[];
|
|
10
|
-
extraHints?: string[];
|
|
11
7
|
rawResponse?: unknown;
|
|
12
8
|
}
|
|
13
9
|
export declare function createSuccessResult<T extends object>(_query: {
|
|
14
10
|
mainResearchGoal?: string;
|
|
15
11
|
researchGoal?: string;
|
|
16
12
|
reasoning?: string;
|
|
17
|
-
}, data: T, hasContent: boolean,
|
|
13
|
+
}, data: T, hasContent: boolean, _toolName: string, options?: SuccessResultOptions): ToolSuccessResult & T;
|
|
18
14
|
export declare function handleProviderError(apiResult: ProviderResponse<unknown>, query: {
|
|
19
15
|
mainResearchGoal?: string;
|
|
20
16
|
researchGoal?: string;
|
package/dist/types/bulk.d.ts
CHANGED
|
@@ -26,7 +26,6 @@ export interface ResponsePaginationInfo {
|
|
|
26
26
|
export interface BulkResponseConfig<TQuery = object, TOutput extends Record<string, unknown> = Record<string, unknown>> {
|
|
27
27
|
toolName: string;
|
|
28
28
|
keysPriority?: string[];
|
|
29
|
-
peerHints?: boolean;
|
|
30
29
|
concurrency?: number;
|
|
31
30
|
minQueryTimeoutMs?: number;
|
|
32
31
|
responsePagination?: BulkResponsePagination;
|
|
@@ -34,7 +33,6 @@ export interface BulkResponseConfig<TQuery = object, TOutput extends Record<stri
|
|
|
34
33
|
}
|
|
35
34
|
export interface BulkToolResponse {
|
|
36
35
|
results: FlatQueryResult[];
|
|
37
|
-
hints?: string[];
|
|
38
36
|
base?: string;
|
|
39
37
|
shared?: Record<string, string | number | boolean>;
|
|
40
38
|
responsePagination?: ResponsePaginationInfo;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
|
|
2
|
-
import type { HintContext } from './metadata.js';
|
|
3
2
|
export type WithOptionalMeta<T> = Partial<T>;
|
|
4
3
|
export interface ToolExecutionArgs<TQuery> {
|
|
5
4
|
queries: TQuery[];
|
|
@@ -7,5 +6,5 @@ export interface ToolExecutionArgs<TQuery> {
|
|
|
7
6
|
responseCharLength?: number;
|
|
8
7
|
authInfo?: AuthInfo;
|
|
9
8
|
sessionId?: string;
|
|
10
|
-
hintContext?:
|
|
9
|
+
hintContext?: Record<string, unknown>;
|
|
11
10
|
}
|