@octocodeai/octocode-tools-core 16.5.1 → 16.6.2

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.
Files changed (95) hide show
  1. package/README.md +200 -254
  2. package/dist/direct.js +37 -33
  3. package/dist/errors/localToolErrors.d.ts +1 -0
  4. package/dist/github/githubAPI.d.ts +22 -0
  5. package/dist/github/history.d.ts +3 -0
  6. package/dist/github/prTransformation.d.ts +1 -1
  7. package/dist/index.d.ts +6 -8
  8. package/dist/index.js +44 -40
  9. package/dist/oql/adapters/compile.d.ts +25 -0
  10. package/dist/oql/adapters/github.d.ts +3 -0
  11. package/dist/oql/adapters/local.d.ts +8 -0
  12. package/dist/oql/adapters/materialize.d.ts +11 -0
  13. package/dist/oql/adapters/pagination.d.ts +21 -0
  14. package/dist/oql/adapters/researchTargets.d.ts +50 -0
  15. package/dist/oql/adapters/resultMap.d.ts +20 -0
  16. package/dist/oql/adapters/ruleYaml.d.ts +11 -0
  17. package/dist/oql/adapters/runner.d.ts +14 -0
  18. package/dist/oql/adapters/v2.d.ts +32 -0
  19. package/dist/oql/capabilities.d.ts +31 -0
  20. package/dist/oql/defaults.d.ts +26 -0
  21. package/dist/oql/diagnostics.d.ts +25 -0
  22. package/dist/oql/diffLanes.d.ts +29 -0
  23. package/dist/oql/envelope.d.ts +21 -0
  24. package/dist/oql/features.d.ts +7 -0
  25. package/dist/oql/index.d.ts +27 -0
  26. package/dist/oql/index.js +49 -0
  27. package/dist/oql/normalize.d.ts +5 -0
  28. package/dist/oql/planner.d.ts +7 -0
  29. package/dist/oql/research/analyze.d.ts +134 -0
  30. package/dist/oql/research/packets.d.ts +80 -0
  31. package/dist/oql/run.d.ts +32 -0
  32. package/dist/oql/schema.d.ts +1018 -0
  33. package/dist/oql/schemeText.d.ts +154 -0
  34. package/dist/oql/shorthand.d.ts +177 -0
  35. package/dist/oql/targetParams.d.ts +20 -0
  36. package/dist/oql/transformers/contract.d.ts +19 -0
  37. package/dist/oql/transformers/github/code.d.ts +17 -0
  38. package/dist/oql/transformers/github/common.d.ts +8 -0
  39. package/dist/oql/transformers/language.d.ts +1 -0
  40. package/dist/oql/transformers/registry.d.ts +16 -0
  41. package/dist/oql/transformers/types.d.ts +11 -0
  42. package/dist/oql/types.d.ts +640 -0
  43. package/dist/oql/v2params.d.ts +22 -0
  44. package/dist/providers/types.d.ts +1 -1
  45. package/dist/schema.d.ts +13 -0
  46. package/dist/schema.js +9 -0
  47. package/dist/serverConfig.d.ts +0 -1
  48. package/dist/session.d.ts +2 -24
  49. package/dist/shared/config/defaults.d.ts +1 -2
  50. package/dist/shared/config/index.d.ts +2 -3
  51. package/dist/shared/config/index.js +2 -3
  52. package/dist/shared/config/resolverSections.d.ts +1 -3
  53. package/dist/shared/config/runtimeSurface.d.ts +5 -4
  54. package/dist/shared/config/schemas.d.ts +0 -1
  55. package/dist/shared/config/types.d.ts +0 -8
  56. package/dist/shared/credentials/envTokens.d.ts +1 -1
  57. package/dist/shared/credentials/index.js +1 -2
  58. package/dist/shared/credentials/types.d.ts +1 -1
  59. package/dist/shared/index.d.ts +0 -1
  60. package/dist/shared/languageSelectors.d.ts +23 -0
  61. package/dist/shared/paths.d.ts +2 -3
  62. package/dist/shared/paths.js +1 -1
  63. package/dist/shared/session/index.js +1 -2
  64. package/dist/tools/directToolCatalog.d.ts +15 -56
  65. package/dist/tools/directToolCatalog.exec.d.ts +11 -0
  66. package/dist/tools/directToolCatalog.meta.d.ts +83 -0
  67. package/dist/tools/github_clone_repo/cache.d.ts +1 -1
  68. package/dist/tools/github_clone_repo/types.d.ts +2 -0
  69. package/dist/tools/github_fetch_content/scheme.d.ts +81 -59
  70. package/dist/tools/github_fetch_content/types.d.ts +27 -0
  71. package/dist/tools/local_binary_inspect/binaryInspector.d.ts +0 -4
  72. package/dist/tools/lsp/semantic_content/scheme.d.ts +164 -10
  73. package/dist/tools/lsp/shared/resolveSymbolAnchor.d.ts +2 -2
  74. package/dist/tools/lsp/shared/semanticTypes.d.ts +34 -5
  75. package/dist/tools/oql_search/execution.d.ts +7 -0
  76. package/dist/tools/package_search/execution.d.ts +33 -0
  77. package/dist/tools/package_search/scheme.d.ts +8 -0
  78. package/dist/tools/providerMappers.d.ts +7 -7
  79. package/dist/tools/toolConfig.d.ts +1 -0
  80. package/dist/tools/toolNames.d.ts +2 -0
  81. package/dist/types/server.d.ts +1 -2
  82. package/dist/types/session.d.ts +0 -19
  83. package/dist/utils/contextUtils.d.ts +15 -1
  84. package/dist/utils/core/types.d.ts +2 -1
  85. package/dist/utils/markdownOutline.d.ts +10 -0
  86. package/dist/utils/response/groupedFinalizer.d.ts +0 -23
  87. package/package.json +14 -3
  88. package/dist/commands/BaseCommandBuilder.d.ts +0 -14
  89. package/dist/commands/FindCommandBuilder.d.ts +0 -23
  90. package/dist/commands/LsCommandBuilder.d.ts +0 -15
  91. package/dist/shared/logger/index.d.ts +0 -2
  92. package/dist/shared/logger/logger.d.ts +0 -17
  93. package/dist/utils/pagination/outputSizeLimit.d.ts +0 -16
  94. package/dist/utils/ranking/evidenceRanker.d.ts +0 -86
  95. package/dist/utils/response/structuredPagination.d.ts +0 -9
@@ -1,6 +1,6 @@
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
5
  definition: "definition";
6
6
  references: "references";
@@ -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,7 +36,7 @@ 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
41
  definition: "definition";
38
42
  references: "references";
@@ -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>;
@@ -148,7 +156,6 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
148
156
  totalFiles: z.ZodNumber;
149
157
  empty: z.ZodOptional<z.ZodObject<{
150
158
  category: z.ZodEnum<{
151
- serverUnavailable: "serverUnavailable";
152
159
  unsupportedOperation: "unsupportedOperation";
153
160
  symbolNotFound: "symbolNotFound";
154
161
  anchorFailed: "anchorFailed";
@@ -156,6 +163,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
156
163
  noReferences: "noReferences";
157
164
  noHover: "noHover";
158
165
  noCalls: "noCalls";
166
+ noWorkspaceSymbols: "noWorkspaceSymbols";
167
+ noTypeHierarchy: "noTypeHierarchy";
168
+ noDiagnostics: "noDiagnostics";
159
169
  }>;
160
170
  reason: z.ZodString;
161
171
  }, z.core.$strip>>;
@@ -207,7 +217,6 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
207
217
  }, z.core.$strip>;
208
218
  empty: z.ZodOptional<z.ZodObject<{
209
219
  category: z.ZodEnum<{
210
- serverUnavailable: "serverUnavailable";
211
220
  unsupportedOperation: "unsupportedOperation";
212
221
  symbolNotFound: "symbolNotFound";
213
222
  anchorFailed: "anchorFailed";
@@ -215,6 +224,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
215
224
  noReferences: "noReferences";
216
225
  noHover: "noHover";
217
226
  noCalls: "noCalls";
227
+ noWorkspaceSymbols: "noWorkspaceSymbols";
228
+ noTypeHierarchy: "noTypeHierarchy";
229
+ noDiagnostics: "noDiagnostics";
218
230
  }>;
219
231
  reason: z.ZodString;
220
232
  }, z.core.$strip>>;
@@ -247,7 +259,6 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
247
259
  topLevelSymbols: z.ZodOptional<z.ZodNumber>;
248
260
  empty: z.ZodOptional<z.ZodObject<{
249
261
  category: z.ZodEnum<{
250
- serverUnavailable: "serverUnavailable";
251
262
  unsupportedOperation: "unsupportedOperation";
252
263
  symbolNotFound: "symbolNotFound";
253
264
  anchorFailed: "anchorFailed";
@@ -255,13 +266,80 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
255
266
  noReferences: "noReferences";
256
267
  noHover: "noHover";
257
268
  noCalls: "noCalls";
269
+ noWorkspaceSymbols: "noWorkspaceSymbols";
270
+ noTypeHierarchy: "noTypeHierarchy";
271
+ noDiagnostics: "noDiagnostics";
272
+ }>;
273
+ reason: z.ZodString;
274
+ }, z.core.$strip>>;
275
+ }, z.core.$strip>, z.ZodObject<{
276
+ kind: z.ZodLiteral<"workspaceSymbol">;
277
+ query: z.ZodString;
278
+ symbols: z.ZodArray<z.ZodUnknown>;
279
+ totalSymbols: z.ZodNumber;
280
+ empty: z.ZodOptional<z.ZodObject<{
281
+ category: z.ZodEnum<{
282
+ unsupportedOperation: "unsupportedOperation";
283
+ symbolNotFound: "symbolNotFound";
284
+ anchorFailed: "anchorFailed";
285
+ noLocations: "noLocations";
286
+ noReferences: "noReferences";
287
+ noHover: "noHover";
288
+ noCalls: "noCalls";
289
+ noWorkspaceSymbols: "noWorkspaceSymbols";
290
+ noTypeHierarchy: "noTypeHierarchy";
291
+ noDiagnostics: "noDiagnostics";
292
+ }>;
293
+ reason: z.ZodString;
294
+ }, z.core.$strip>>;
295
+ }, z.core.$strip>, z.ZodObject<{
296
+ kind: z.ZodLiteral<"typeHierarchy">;
297
+ direction: z.ZodEnum<{
298
+ supertypes: "supertypes";
299
+ subtypes: "subtypes";
300
+ }>;
301
+ root: z.ZodOptional<z.ZodUnknown>;
302
+ items: z.ZodArray<z.ZodUnknown>;
303
+ totalItems: z.ZodNumber;
304
+ empty: z.ZodOptional<z.ZodObject<{
305
+ category: z.ZodEnum<{
306
+ unsupportedOperation: "unsupportedOperation";
307
+ symbolNotFound: "symbolNotFound";
308
+ anchorFailed: "anchorFailed";
309
+ noLocations: "noLocations";
310
+ noReferences: "noReferences";
311
+ noHover: "noHover";
312
+ noCalls: "noCalls";
313
+ noWorkspaceSymbols: "noWorkspaceSymbols";
314
+ noTypeHierarchy: "noTypeHierarchy";
315
+ noDiagnostics: "noDiagnostics";
316
+ }>;
317
+ reason: z.ZodString;
318
+ }, z.core.$strip>>;
319
+ }, z.core.$strip>, z.ZodObject<{
320
+ kind: z.ZodLiteral<"diagnostic">;
321
+ diagnostics: z.ZodArray<z.ZodUnknown>;
322
+ totalDiagnostics: z.ZodNumber;
323
+ errorCount: z.ZodNumber;
324
+ warningCount: z.ZodNumber;
325
+ empty: z.ZodOptional<z.ZodObject<{
326
+ category: z.ZodEnum<{
327
+ unsupportedOperation: "unsupportedOperation";
328
+ symbolNotFound: "symbolNotFound";
329
+ anchorFailed: "anchorFailed";
330
+ noLocations: "noLocations";
331
+ noReferences: "noReferences";
332
+ noHover: "noHover";
333
+ noCalls: "noCalls";
334
+ noWorkspaceSymbols: "noWorkspaceSymbols";
335
+ noTypeHierarchy: "noTypeHierarchy";
336
+ noDiagnostics: "noDiagnostics";
258
337
  }>;
259
338
  reason: z.ZodString;
260
339
  }, z.core.$strip>>;
261
340
  }, z.core.$strip>, z.ZodObject<{
262
341
  kind: z.ZodLiteral<"empty">;
263
342
  category: z.ZodEnum<{
264
- serverUnavailable: "serverUnavailable";
265
343
  unsupportedOperation: "unsupportedOperation";
266
344
  symbolNotFound: "symbolNotFound";
267
345
  anchorFailed: "anchorFailed";
@@ -269,6 +347,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
269
347
  noReferences: "noReferences";
270
348
  noHover: "noHover";
271
349
  noCalls: "noCalls";
350
+ noWorkspaceSymbols: "noWorkspaceSymbols";
351
+ noTypeHierarchy: "noTypeHierarchy";
352
+ noDiagnostics: "noDiagnostics";
272
353
  }>;
273
354
  reason: z.ZodString;
274
355
  }, z.core.$strip>], "kind">;
@@ -366,7 +447,6 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
366
447
  totalFiles: z.ZodNumber;
367
448
  empty: z.ZodOptional<z.ZodObject<{
368
449
  category: z.ZodEnum<{
369
- serverUnavailable: "serverUnavailable";
370
450
  unsupportedOperation: "unsupportedOperation";
371
451
  symbolNotFound: "symbolNotFound";
372
452
  anchorFailed: "anchorFailed";
@@ -374,6 +454,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
374
454
  noReferences: "noReferences";
375
455
  noHover: "noHover";
376
456
  noCalls: "noCalls";
457
+ noWorkspaceSymbols: "noWorkspaceSymbols";
458
+ noTypeHierarchy: "noTypeHierarchy";
459
+ noDiagnostics: "noDiagnostics";
377
460
  }>;
378
461
  reason: z.ZodString;
379
462
  }, z.core.$strip>>;
@@ -425,7 +508,6 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
425
508
  }, z.core.$strip>;
426
509
  empty: z.ZodOptional<z.ZodObject<{
427
510
  category: z.ZodEnum<{
428
- serverUnavailable: "serverUnavailable";
429
511
  unsupportedOperation: "unsupportedOperation";
430
512
  symbolNotFound: "symbolNotFound";
431
513
  anchorFailed: "anchorFailed";
@@ -433,6 +515,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
433
515
  noReferences: "noReferences";
434
516
  noHover: "noHover";
435
517
  noCalls: "noCalls";
518
+ noWorkspaceSymbols: "noWorkspaceSymbols";
519
+ noTypeHierarchy: "noTypeHierarchy";
520
+ noDiagnostics: "noDiagnostics";
436
521
  }>;
437
522
  reason: z.ZodString;
438
523
  }, z.core.$strip>>;
@@ -465,7 +550,6 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
465
550
  topLevelSymbols: z.ZodOptional<z.ZodNumber>;
466
551
  empty: z.ZodOptional<z.ZodObject<{
467
552
  category: z.ZodEnum<{
468
- serverUnavailable: "serverUnavailable";
469
553
  unsupportedOperation: "unsupportedOperation";
470
554
  symbolNotFound: "symbolNotFound";
471
555
  anchorFailed: "anchorFailed";
@@ -473,13 +557,80 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
473
557
  noReferences: "noReferences";
474
558
  noHover: "noHover";
475
559
  noCalls: "noCalls";
560
+ noWorkspaceSymbols: "noWorkspaceSymbols";
561
+ noTypeHierarchy: "noTypeHierarchy";
562
+ noDiagnostics: "noDiagnostics";
563
+ }>;
564
+ reason: z.ZodString;
565
+ }, z.core.$strip>>;
566
+ }, z.core.$strip>, z.ZodObject<{
567
+ kind: z.ZodLiteral<"workspaceSymbol">;
568
+ query: z.ZodString;
569
+ symbols: z.ZodArray<z.ZodUnknown>;
570
+ totalSymbols: z.ZodNumber;
571
+ empty: z.ZodOptional<z.ZodObject<{
572
+ category: z.ZodEnum<{
573
+ unsupportedOperation: "unsupportedOperation";
574
+ symbolNotFound: "symbolNotFound";
575
+ anchorFailed: "anchorFailed";
576
+ noLocations: "noLocations";
577
+ noReferences: "noReferences";
578
+ noHover: "noHover";
579
+ noCalls: "noCalls";
580
+ noWorkspaceSymbols: "noWorkspaceSymbols";
581
+ noTypeHierarchy: "noTypeHierarchy";
582
+ noDiagnostics: "noDiagnostics";
583
+ }>;
584
+ reason: z.ZodString;
585
+ }, z.core.$strip>>;
586
+ }, z.core.$strip>, z.ZodObject<{
587
+ kind: z.ZodLiteral<"typeHierarchy">;
588
+ direction: z.ZodEnum<{
589
+ supertypes: "supertypes";
590
+ subtypes: "subtypes";
591
+ }>;
592
+ root: z.ZodOptional<z.ZodUnknown>;
593
+ items: z.ZodArray<z.ZodUnknown>;
594
+ totalItems: z.ZodNumber;
595
+ empty: z.ZodOptional<z.ZodObject<{
596
+ category: z.ZodEnum<{
597
+ unsupportedOperation: "unsupportedOperation";
598
+ symbolNotFound: "symbolNotFound";
599
+ anchorFailed: "anchorFailed";
600
+ noLocations: "noLocations";
601
+ noReferences: "noReferences";
602
+ noHover: "noHover";
603
+ noCalls: "noCalls";
604
+ noWorkspaceSymbols: "noWorkspaceSymbols";
605
+ noTypeHierarchy: "noTypeHierarchy";
606
+ noDiagnostics: "noDiagnostics";
607
+ }>;
608
+ reason: z.ZodString;
609
+ }, z.core.$strip>>;
610
+ }, z.core.$strip>, z.ZodObject<{
611
+ kind: z.ZodLiteral<"diagnostic">;
612
+ diagnostics: z.ZodArray<z.ZodUnknown>;
613
+ totalDiagnostics: z.ZodNumber;
614
+ errorCount: z.ZodNumber;
615
+ warningCount: z.ZodNumber;
616
+ empty: z.ZodOptional<z.ZodObject<{
617
+ category: z.ZodEnum<{
618
+ unsupportedOperation: "unsupportedOperation";
619
+ symbolNotFound: "symbolNotFound";
620
+ anchorFailed: "anchorFailed";
621
+ noLocations: "noLocations";
622
+ noReferences: "noReferences";
623
+ noHover: "noHover";
624
+ noCalls: "noCalls";
625
+ noWorkspaceSymbols: "noWorkspaceSymbols";
626
+ noTypeHierarchy: "noTypeHierarchy";
627
+ noDiagnostics: "noDiagnostics";
476
628
  }>;
477
629
  reason: z.ZodString;
478
630
  }, z.core.$strip>>;
479
631
  }, z.core.$strip>, z.ZodObject<{
480
632
  kind: z.ZodLiteral<"empty">;
481
633
  category: z.ZodEnum<{
482
- serverUnavailable: "serverUnavailable";
483
634
  unsupportedOperation: "unsupportedOperation";
484
635
  symbolNotFound: "symbolNotFound";
485
636
  anchorFailed: "anchorFailed";
@@ -487,6 +638,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
487
638
  noReferences: "noReferences";
488
639
  noHover: "noHover";
489
640
  noCalls: "noCalls";
641
+ noWorkspaceSymbols: "noWorkspaceSymbols";
642
+ noTypeHierarchy: "noTypeHierarchy";
643
+ noDiagnostics: "noDiagnostics";
490
644
  }>;
491
645
  reason: z.ZodString;
492
646
  }, z.core.$strip>], "kind">;
@@ -1,4 +1,4 @@
1
- import type { LspGetSemanticsQuery, ResolvedSymbol } from './semanticTypes.js';
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: LspGetSemanticsQuery, toolName: string): Promise<AnchorResolutionResult<SymbolAnchor>>;
20
+ export declare function resolveSymbolAnchor(query: SymbolAnchoredSemanticQuery | DocumentSymbolsSemanticQuery, toolName: string): Promise<AnchorResolutionResult<SymbolAnchor>>;
@@ -1,6 +1,6 @@
1
1
  import type { ExactPosition, LSPRange } from '@octocodeai/octocode-engine/lsp/types';
2
- export declare const LSP_GET_SEMANTIC_CONTENT_TOOL_NAME = "lspGetSemantics";
3
- export declare const SEMANTIC_CONTENT_TYPES: readonly ["definition", "references", "callers", "callees", "callHierarchy", "hover", "documentSymbols", "typeDefinition", "implementation"];
2
+ export { LSP_GET_SEMANTICS_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
- export type LspGetSemanticsQuery = SymbolAnchoredSemanticQuery | DocumentSymbolsSemanticQuery;
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;
@@ -65,7 +74,7 @@ export declare function compactLocation(snippet: {
65
74
  };
66
75
  isDefinition?: boolean;
67
76
  }): CompactLocation;
68
- export type SemanticEmptyCategory = 'serverUnavailable' | 'unsupportedOperation' | 'symbolNotFound' | 'anchorFailed' | 'noLocations' | 'noReferences' | 'noHover' | 'noCalls';
77
+ export type SemanticEmptyCategory = 'unsupportedOperation' | 'symbolNotFound' | 'anchorFailed' | 'noLocations' | 'noReferences' | 'noHover' | 'noCalls' | 'noWorkspaceSymbols' | 'noTypeHierarchy' | 'noDiagnostics';
69
78
  export type SemanticEmptyState = {
70
79
  category: SemanticEmptyCategory;
71
80
  reason: string;
@@ -124,6 +133,26 @@ export type LspSemanticEnvelope = {
124
133
  totalSymbols?: number;
125
134
  topLevelSymbols?: number;
126
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;
127
156
  } | {
128
157
  kind: 'empty';
129
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,38 @@ 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 PackageData = {
7
+ name: string;
8
+ version?: string;
9
+ description?: string;
10
+ license?: string;
11
+ downloads?: number;
12
+ repository?: string;
13
+ repositoryDirectory?: string;
14
+ repositoryId?: string;
15
+ next?: Record<string, unknown>;
16
+ };
17
+ type PackageRepositoryData = {
18
+ repository: string;
19
+ owner: string;
20
+ repo: string;
21
+ repositoryDirectory?: string;
22
+ next: Record<string, unknown>;
23
+ };
24
+ type CompactPackageData = {
25
+ packages: PackageData[];
26
+ repositories?: Record<string, PackageRepositoryData>;
27
+ };
28
+ export declare function compactPackageRepositories(packages: PackageData[]): CompactPackageData;
29
+ type PackagePagination = {
30
+ currentPage: number;
31
+ totalPages: number;
32
+ perPage: number;
33
+ totalFound: number;
34
+ returned: number;
35
+ hasMore: boolean;
36
+ nextPage?: number;
37
+ };
38
+ export declare function buildPackagePagination(query: NpmSearchQuery, totalFound: number, returned: number, isKeyword: boolean): PackagePagination;
6
39
  export declare function searchPackages(args: ToolExecutionArgs<NpmSearchQuery>): Promise<CallToolResult>;
7
40
  export {};
@@ -24,8 +24,16 @@ export declare const NpmSearchOutputLocalSchema: z.ZodObject<{
24
24
  downloads: z.ZodOptional<z.ZodNumber>;
25
25
  repository: z.ZodOptional<z.ZodString>;
26
26
  repositoryDirectory: z.ZodOptional<z.ZodString>;
27
+ repositoryId: z.ZodOptional<z.ZodString>;
27
28
  next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
28
29
  }, z.core.$loose>>>;
30
+ repositories: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
31
+ repository: z.ZodString;
32
+ owner: z.ZodString;
33
+ repo: z.ZodString;
34
+ repositoryDirectory: z.ZodOptional<z.ZodString>;
35
+ next: z.ZodRecord<z.ZodString, z.ZodUnknown>;
36
+ }, z.core.$loose>>>;
29
37
  pagination: z.ZodOptional<z.ZodObject<{
30
38
  currentPage: z.ZodNumber;
31
39
  totalPages: z.ZodNumber;
@@ -42,7 +42,7 @@ export declare function mapCodeSearchToolQuery(query: WithOptionalMeta<GitHubCod
42
42
  filename: string;
43
43
  extension: string;
44
44
  language: string | undefined;
45
- match: "path" | "file";
45
+ match: "file" | "path";
46
46
  limit: number | undefined;
47
47
  page: number;
48
48
  mainResearchGoal: string;
@@ -101,7 +101,7 @@ export declare function mapRepoSearchToolQuery(query: WithOptionalMeta<GitHubRep
101
101
  forks: string | undefined;
102
102
  license: string | undefined;
103
103
  goodFirstIssues: string | undefined;
104
- match: ("name" | "description" | "readme")[];
104
+ match: ("description" | "name" | "readme")[];
105
105
  sort: "stars" | "forks" | "updated" | "created" | "best-match" | undefined;
106
106
  limit: number | undefined;
107
107
  page: number;
@@ -138,18 +138,18 @@ export declare function mapPullRequestToolQuery(query: PartialPRQuery): {
138
138
  reactions: string;
139
139
  interactions: string;
140
140
  draft: boolean;
141
- match: ("comments" | "title" | "body")[];
141
+ match: ("title" | "comments" | "body")[];
142
142
  milestone: string;
143
143
  language: string;
144
- checks: "pending" | "success" | "failure";
145
- review: "none" | "required" | "approved" | "changes_requested";
144
+ checks: "success" | "failure" | "pending";
145
+ review: "none" | "approved" | "changes_requested" | "required";
146
146
  locked: boolean;
147
147
  visibility: "public" | "private";
148
148
  teamMentions: string;
149
149
  project: string;
150
150
  archived: boolean | undefined;
151
151
  content: unknown;
152
- reviewMode: "summary" | "full";
152
+ reviewMode: "full" | "summary";
153
153
  filePage: number;
154
154
  commentPage: number;
155
155
  commitPage: number;
@@ -217,7 +217,7 @@ export declare function mapPullRequestProviderResultData(data: ProviderPullReque
217
217
  in_reply_to_id?: number;
218
218
  }[];
219
219
  url: string;
220
- state: "closed" | "open" | "merged";
220
+ state: "open" | "closed" | "merged";
221
221
  draft: boolean;
222
222
  author: string;
223
223
  assignees: string[];
@@ -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[];
@@ -1,2 +1,4 @@
1
1
  export declare const STATIC_TOOL_NAMES: import("@octocodeai/octocode-core/types").ToolNames;
2
+ export declare const LSP_GET_SEMANTICS_TOOL_NAME: "lspGetSemantics";
3
+ export declare const OQL_SEARCH_TOOL_NAME = "oqlSearch";
2
4
  export declare function isLocalTool(toolName: string): boolean;
@@ -1,4 +1,4 @@
1
- export type TokenSourceType = 'env:OCTOCODE_TOKEN' | 'env:GH_TOKEN' | 'env:GITHUB_TOKEN' | 'gh-cli' | 'octocode-storage' | 'none';
1
+ export type TokenSourceType = 'env:OCTOCODE_TOKEN' | 'env:GH_TOKEN' | 'env:GITHUB_TOKEN' | 'env:GITHUB_PERSONAL_ACCESS_TOKEN' | 'gh-cli' | 'octocode-storage' | 'none';
2
2
  export interface ServerConfig {
3
3
  version: string;
4
4
  githubApiUrl: string;
@@ -7,7 +7,6 @@ export interface ServerConfig {
7
7
  disableTools?: string[];
8
8
  timeout: number;
9
9
  maxRetries: number;
10
- loggingEnabled: boolean;
11
10
  enableLocal: boolean;
12
11
  enableClone: boolean;
13
12
  outputFormat: 'yaml' | 'json';
@@ -1,22 +1,3 @@
1
- export interface SessionData {
2
- sessionId: string;
3
- intent: 'init' | 'error' | 'tool_call' | 'rate_limit';
4
- data: ToolCallData | ErrorData | RateLimitData | Record<string, never>;
5
- timestamp: string;
6
- version: string;
7
- }
8
- export interface ToolCallData {
9
- tool_name: string;
10
- repos: string[];
11
- provider?: string;
12
- mainResearchGoal?: string;
13
- researchGoal?: string;
14
- reasoning?: string;
15
- }
16
- export interface ErrorData {
17
- error: string;
18
- provider?: string;
19
- }
20
1
  export interface RateLimitData {
21
2
  limit_type: 'primary' | 'secondary' | 'graphql' | 'precheck_blocked';
22
3
  retry_after_seconds?: number;
@@ -1,5 +1,5 @@
1
1
  import type * as NativeContextUtils from '@octocodeai/octocode-engine';
2
- export type { BinaryInspectInfo, BinaryStrings, ExtractMatchingLinesOptions, ExtractMatchingLinesResult, FilterPatchOptions, FileSystemEntry, FileSystemQueryOptions, FileSystemQueryResult, MinifyResult, JsonInput, RipgrepParseOptions, RipgrepParseResult, RipgrepSearchOptions, SliceContentOptions, SliceContentResult, StructuralMatch, YamlConversionConfig, } from '@octocodeai/octocode-engine';
2
+ export type { BinaryInspectInfo, BinaryStrings, ExtractMatchingLinesOptions, ExtractMatchingLinesResult, FilterPatchOptions, FileSystemEntry, FileSystemQueryOptions, FileSystemQueryResult, GraphFactCapability, GraphFactCall, GraphFactDeclaration, GraphFactEdge, GraphFactExport, GraphFactImport, GraphFacts, MinifyResult, JsonInput, RipgrepParseOptions, RipgrepParseResult, RipgrepSearchOptions, SliceContentOptions, SliceContentResult, StructuralMatch, YamlConversionConfig, } from '@octocodeai/octocode-engine';
3
3
  type NativeContextUtilsModule = typeof NativeContextUtils;
4
4
  type NativeLoader = () => NativeContextUtilsModule;
5
5
  export declare class ContextUtilsLoadError extends Error {
@@ -28,11 +28,25 @@ export declare const contextUtils: {
28
28
  * Same-file only, syntax-only — no type inference, no cross-file resolution.
29
29
  */
30
30
  findInFileReferences(content: string, filePath: string, line: number, character: number): string | null;
31
+ /**
32
+ * Native JS/TS graph facts as a JSON `GraphFacts` object. Syntax-level only:
33
+ * declarations/imports/exports, containment, and direct call expressions.
34
+ */
35
+ extractGraphFacts(content: string, filePath: string): string | null;
31
36
  /**
32
37
  * Canonical lowercase extensions (no leading dot) the native oxc JS/TS path
33
38
  * handles. Source of truth lives in the engine — gate native dispatch on this.
34
39
  */
35
40
  getSupportedJsTsExtensions(): string[];
41
+ /**
42
+ * Canonical lowercase extensions (no leading dot) that can emit native
43
+ * GraphFacts. JS/TS use OXC; other entries use tree-sitter syntax inventory.
44
+ */
45
+ getSupportedGraphFactExtensions(): string[];
46
+ /**
47
+ * Native graph-fact capability matrix as a JSON `GraphFactCapability[]`.
48
+ */
49
+ getGraphFactCapabilities(): string;
36
50
  structuralSearch(content: string, filePath: string, pattern?: string | null, rule?: string | null): NativeContextUtils.StructuralMatch[];
37
51
  structuralSearchFiles(options: NativeContextUtils.StructuralSearchFilesOptions): NativeContextUtils.StructuralSearchFilesResult;
38
52
  getSupportedStructuralExtensions(): string[];
@@ -44,7 +44,8 @@ export interface PaginationInfo {
44
44
  totalMatchesCapped?: boolean;
45
45
  }
46
46
  export interface SearchStats {
47
- matchCount?: number;
47
+ totalOccurrences?: number;
48
+ totalStructuralMatches?: number;
48
49
  matchedLines?: number;
49
50
  filesMatched?: number;
50
51
  filesSearched?: number;
@@ -0,0 +1,10 @@
1
+ export type MarkdownHeading = {
2
+ line: number;
3
+ level: number;
4
+ text: string;
5
+ children: MarkdownHeading[];
6
+ };
7
+ export declare function isMarkdownFilePath(filePath: string): boolean;
8
+ export declare function extractMarkdownHeadingOutline(content: string, filePath: string): MarkdownHeading[] | null;
9
+ export declare function markdownHeadingOutlineToText(content: string, filePath: string): string | null;
10
+ export declare function markdownHeadingOutlineToDocumentSymbols(content: string, filePath: string): unknown[] | null;
@@ -1,35 +1,12 @@
1
1
  import type { BulkFinalizerOutput } from '../../types/bulk.js';
2
2
  import type { FlatQueryResult } from '../../types/toolResults.js';
3
- export type CharPagination = {
4
- currentPage: number;
5
- totalPages: number;
6
- hasMore: boolean;
7
- charOffset: number;
8
- charLength: number;
9
- totalChars: number;
10
- };
11
3
  export type QueryWithPagination = {
12
4
  id?: unknown;
13
5
  charLength?: unknown;
14
6
  charOffset?: unknown;
15
7
  };
16
- type CharWindowConfig<TGroup, TItem> = {
17
- groups: TGroup[];
18
- getItems: (group: TGroup) => readonly TItem[];
19
- setItems: (group: TGroup, items: TItem[]) => TGroup;
20
- getItemText?: (item: TItem) => string | undefined;
21
- setItemText?: (item: TItem, text: string) => TItem;
22
- charOffset: number;
23
- charLength: number;
24
- maxItems?: number;
25
- };
26
- export declare function paginateGroupsCharWindow<TGroup, TItem>({ groups, getItems, setItems, getItemText, setItemText, charOffset, charLength, maxItems, }: CharWindowConfig<TGroup, TItem>): {
27
- groups: TGroup[];
28
- pagination: CharPagination;
29
- };
30
8
  export declare function collectFlatErrors(results: readonly FlatQueryResult[]): Array<{
31
9
  id: string;
32
10
  error: string;
33
11
  }>;
34
12
  export declare function formatFinalizedResponse<T extends Record<string, unknown>>(responseData: T, keysPriority: readonly string[], isError?: boolean): BulkFinalizerOutput<T>;
35
- export {};