@octocodeai/octocode-tools-core 16.6.3 → 17.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.
Files changed (251) hide show
  1. package/README.md +22 -50
  2. package/dist/direct.js +33 -38
  3. package/dist/github/botFilter.d.ts +1 -0
  4. package/dist/github/client.d.ts +6 -0
  5. package/dist/github/directoryFetch/fetchDirectoryContents.d.ts +3 -0
  6. package/dist/github/directoryFetch/fetchFileContentToDisk.d.ts +3 -0
  7. package/dist/github/directoryFetch/helpers.d.ts +35 -0
  8. package/dist/github/directoryFetch.d.ts +3 -6
  9. package/dist/github/fileContentPagination.d.ts +9 -0
  10. package/dist/github/fileContentProcess.d.ts +1 -8
  11. package/dist/github/fileContentRaw/fetch.d.ts +20 -0
  12. package/dist/github/fileContentRaw/pathSuggestions.d.ts +3 -0
  13. package/dist/github/fileContentRaw.d.ts +2 -12
  14. package/dist/github/githubAPI.d.ts +4 -1
  15. package/dist/github/history.d.ts +6 -2
  16. package/dist/github/issues/fetchers.d.ts +7 -0
  17. package/dist/github/issues/helpers.d.ts +32 -0
  18. package/dist/github/issues/orchestrator.d.ts +4 -0
  19. package/dist/github/issues/types.d.ts +72 -0
  20. package/dist/github/issues.d.ts +3 -0
  21. package/dist/github/prContentFetcher/comments.d.ts +11 -0
  22. package/dist/github/prContentFetcher/commits.d.ts +27 -0
  23. package/dist/github/prContentFetcher/flags.d.ts +21 -0
  24. package/dist/github/prContentFetcher/transform.d.ts +5 -0
  25. package/dist/github/prContentFetcher.d.ts +2 -5
  26. package/dist/github/pullRequestSearch/restSearch.d.ts +6 -0
  27. package/dist/github/pullRequestSearch.d.ts +1 -1
  28. package/dist/github/queryBuilders/base.d.ts +25 -0
  29. package/dist/github/queryBuilders/codeAndRepo.d.ts +20 -0
  30. package/dist/github/queryBuilders/issues.d.ts +42 -0
  31. package/dist/github/queryBuilders/pullRequests.d.ts +13 -0
  32. package/dist/github/queryBuilders.d.ts +4 -12
  33. package/dist/github/releases.d.ts +37 -0
  34. package/dist/github/repoStructure/contentResolution.d.ts +12 -0
  35. package/dist/github/repoStructure/fetchOrchestration.d.ts +7 -0
  36. package/dist/github/repoStructure/resultBuilder.d.ts +22 -0
  37. package/dist/github/repoStructure.d.ts +1 -7
  38. package/dist/github/repoStructureTree.d.ts +38 -0
  39. package/dist/github/responseHeaders.d.ts +2 -0
  40. package/dist/github/searchKeyword.d.ts +2 -0
  41. package/dist/index.d.ts +1 -4
  42. package/dist/index.js +35 -40
  43. package/dist/oql/adapters/github/execute.d.ts +16 -0
  44. package/dist/oql/adapters/github/provider-diagnostics.d.ts +14 -0
  45. package/dist/oql/adapters/github/shared.d.ts +75 -0
  46. package/dist/oql/adapters/github.d.ts +11 -0
  47. package/dist/oql/adapters/graphView/filters.d.ts +25 -0
  48. package/dist/oql/adapters/graphView/nativeEdges.d.ts +5 -0
  49. package/dist/oql/adapters/graphView.d.ts +17 -16
  50. package/dist/oql/adapters/local/code.d.ts +3 -0
  51. package/dist/oql/adapters/local/codeBoolean.d.ts +3 -0
  52. package/dist/oql/adapters/local/fileRowOps.d.ts +11 -0
  53. package/dist/oql/adapters/local/files.d.ts +3 -0
  54. package/dist/oql/adapters/local/filesBoolean.d.ts +10 -0
  55. package/dist/oql/adapters/local/filesContentLeaf.d.ts +12 -0
  56. package/dist/oql/adapters/local/filesUniverse.d.ts +6 -0
  57. package/dist/oql/adapters/local/findToolType.d.ts +10 -0
  58. package/dist/oql/adapters/local/predicates.d.ts +18 -0
  59. package/dist/oql/adapters/local/scope.d.ts +14 -0
  60. package/dist/oql/adapters/local/searchToolType.d.ts +7 -0
  61. package/dist/oql/adapters/local/structureContent.d.ts +6 -0
  62. package/dist/oql/adapters/local/types.d.ts +34 -0
  63. package/dist/oql/adapters/local.d.ts +3 -7
  64. package/dist/oql/adapters/researchTargets/diff.d.ts +16 -0
  65. package/dist/oql/adapters/researchTargets/graph.d.ts +3 -0
  66. package/dist/oql/adapters/researchTargets/history.d.ts +20 -0
  67. package/dist/oql/adapters/researchTargets/pagination.d.ts +54 -0
  68. package/dist/oql/adapters/researchTargets/repositories.d.ts +4 -0
  69. package/dist/oql/adapters/researchTargets/research.d.ts +3 -0
  70. package/dist/oql/adapters/researchTargets/rows.d.ts +16 -0
  71. package/dist/oql/adapters/researchTargets/semantics.d.ts +3 -0
  72. package/dist/oql/adapters/researchTargets/shared.d.ts +11 -0
  73. package/dist/oql/adapters/researchTargets.d.ts +4 -46
  74. package/dist/oql/defaults.d.ts +1 -1
  75. package/dist/oql/index.js +34 -39
  76. package/dist/oql/normalize/batch.d.ts +2 -0
  77. package/dist/oql/normalize/materialize.d.ts +2 -0
  78. package/dist/oql/normalize/params.d.ts +2 -0
  79. package/dist/oql/normalize/query.d.ts +2 -0
  80. package/dist/oql/normalize/scope.d.ts +2 -0
  81. package/dist/oql/normalize/shared.d.ts +7 -0
  82. package/dist/oql/normalize/source.d.ts +2 -0
  83. package/dist/oql/normalize/where.d.ts +2 -0
  84. package/dist/oql/normalize.d.ts +19 -4
  85. package/dist/oql/planner/planDiagnostics.d.ts +13 -0
  86. package/dist/oql/planner/predicateRouting.d.ts +35 -0
  87. package/dist/oql/predicateUtils.d.ts +3 -0
  88. package/dist/oql/research/analyze/manifest-scan.d.ts +4 -0
  89. package/dist/oql/research/analyze/source-graph.d.ts +7 -0
  90. package/dist/oql/research/analyze/symbol-scoring.d.ts +4 -0
  91. package/dist/oql/research/analyze/types.d.ts +163 -0
  92. package/dist/oql/research/analyze/utils.d.ts +16 -0
  93. package/dist/oql/research/analyze.d.ts +2 -133
  94. package/dist/oql/research/packets/builders.d.ts +4 -0
  95. package/dist/oql/research/packets/types.d.ts +91 -0
  96. package/dist/oql/research/packets.d.ts +21 -80
  97. package/dist/oql/run/batch.d.ts +3 -0
  98. package/dist/oql/run/continuations/records.d.ts +19 -0
  99. package/dist/oql/run/continuations/registry.d.ts +22 -0
  100. package/dist/oql/run/continuations/semantics.d.ts +3 -0
  101. package/dist/oql/run/continuations/types.d.ts +12 -0
  102. package/dist/oql/run/dryRun.d.ts +11 -0
  103. package/dist/oql/run/paths.d.ts +15 -0
  104. package/dist/oql/run/proofGrades.d.ts +8 -0
  105. package/dist/oql/run/select.d.ts +10 -0
  106. package/dist/oql/run/single.d.ts +22 -0
  107. package/dist/oql/run.d.ts +4 -31
  108. package/dist/oql/schema/predicates.d.ts +12 -0
  109. package/dist/oql/schema.d.ts +50 -35
  110. package/dist/oql/schemeText.d.ts +10 -13
  111. package/dist/oql/shorthand/predicates.d.ts +15 -0
  112. package/dist/oql/shorthand/query-controls.d.ts +18 -0
  113. package/dist/oql/shorthand/target-params.d.ts +9 -0
  114. package/dist/oql/shorthand/types.d.ts +159 -0
  115. package/dist/oql/shorthand/utils.d.ts +7 -0
  116. package/dist/oql/shorthand.d.ts +2 -171
  117. package/dist/oql/targetParams.d.ts +0 -13
  118. package/dist/oql/transformers/github/code.d.ts +1 -9
  119. package/dist/oql/types/diagnostics.d.ts +22 -0
  120. package/dist/oql/types/envelope.d.ts +78 -0
  121. package/dist/oql/types/guards.d.ts +9 -0
  122. package/dist/oql/types/planner.d.ts +46 -0
  123. package/dist/oql/types/predicates.d.ts +93 -0
  124. package/dist/oql/types/query.d.ts +143 -0
  125. package/dist/oql/types/recordData.d.ts +127 -0
  126. package/dist/oql/types/recordRows.d.ts +48 -0
  127. package/dist/oql/types/results.d.ts +118 -0
  128. package/dist/oql/types/targets.d.ts +22 -0
  129. package/dist/oql/types.d.ts +17 -640
  130. package/dist/providers/github/paginationMetadata.d.ts +12 -0
  131. package/dist/providers/providerResults.d.ts +0 -1
  132. package/dist/schema.js +2 -2
  133. package/dist/scheme/pagination.d.ts +65 -0
  134. package/dist/shared/config/index.js +1 -1
  135. package/dist/shared/credentials/index.js +2 -2
  136. package/dist/shared/credentials/testing.js +1 -1
  137. package/dist/shared/languageSelectors/classify.d.ts +15 -0
  138. package/dist/shared/languageSelectors/data.d.ts +12 -0
  139. package/dist/shared/languageSelectors.d.ts +3 -23
  140. package/dist/shared/paths.d.ts +0 -4
  141. package/dist/shared/paths.js +1 -1
  142. package/dist/shared/session/index.js +1 -1
  143. package/dist/shared/session/statsDefaults.d.ts +1 -2
  144. package/dist/tools/directToolCatalog/toolCatalogDefinitions.d.ts +68 -0
  145. package/dist/tools/directToolCatalog/toolCommandPatternQueries.d.ts +4 -0
  146. package/dist/tools/directToolCatalog/toolCommandPatterns.d.ts +4 -0
  147. package/dist/tools/directToolCatalog/toolInputPreparation.d.ts +12 -0
  148. package/dist/tools/directToolCatalog/toolSchemaIntrospection.d.ts +19 -0
  149. package/dist/tools/directToolCatalog.meta.d.ts +10 -67
  150. package/dist/tools/github_clone_repo/cache.d.ts +1 -5
  151. package/dist/tools/github_clone_repo/cachePaths.d.ts +5 -0
  152. package/dist/tools/github_fetch_content/finalizer/entryParsers.d.ts +9 -0
  153. package/dist/tools/github_fetch_content/finalizer/types.d.ts +101 -0
  154. package/dist/tools/github_fetch_content/finalizer.d.ts +1 -7
  155. package/dist/tools/github_fetch_content/scheme.d.ts +39 -4
  156. package/dist/tools/github_fetch_content/types.d.ts +1 -2
  157. package/dist/tools/github_search_code/execution.d.ts +9 -0
  158. package/dist/tools/github_search_code/finalizer/build.d.ts +4 -0
  159. package/dist/tools/github_search_code/finalizer/groups.d.ts +23 -0
  160. package/dist/tools/github_search_code/finalizer/ranking.d.ts +12 -0
  161. package/dist/tools/github_search_code/finalizer.d.ts +2 -6
  162. package/dist/tools/github_search_code/scheme.d.ts +29 -2
  163. package/dist/tools/github_search_pull_requests/contentResponse/commentsShaping.d.ts +68 -0
  164. package/dist/tools/github_search_pull_requests/contentResponse/fileSurfaces.d.ts +52 -0
  165. package/dist/tools/github_search_pull_requests/contentResponse/nextCalls.d.ts +17 -0
  166. package/dist/tools/github_search_pull_requests/contentResponse/pagination.d.ts +63 -0
  167. package/dist/tools/github_search_pull_requests/contentResponse.d.ts +1 -15
  168. package/dist/tools/github_search_pull_requests/execution/commitsMode.d.ts +4 -0
  169. package/dist/tools/github_search_pull_requests/execution/issuesMode.d.ts +4 -0
  170. package/dist/tools/github_search_pull_requests/execution/pullRequestsMode.d.ts +4 -0
  171. package/dist/tools/github_search_pull_requests/execution/releasesMode.d.ts +4 -0
  172. package/dist/tools/github_search_pull_requests/execution/types.d.ts +6 -0
  173. package/dist/tools/github_search_pull_requests/execution.d.ts +1 -4
  174. package/dist/tools/github_search_pull_requests/scheme.d.ts +11 -1
  175. package/dist/tools/github_search_repos/execution/pagination.d.ts +39 -0
  176. package/dist/tools/github_search_repos/execution/queryVariants.d.ts +38 -0
  177. package/dist/tools/github_search_repos/execution/ranking.d.ts +4 -0
  178. package/dist/tools/github_search_repos/execution.d.ts +3 -71
  179. package/dist/tools/github_search_repos/scheme.d.ts +8 -0
  180. package/dist/tools/github_view_repo_structure/types.d.ts +2 -0
  181. package/dist/tools/local_fetch_content/fetchContent/extraction.d.ts +15 -0
  182. package/dist/tools/local_fetch_content/fetchContent/pagination.d.ts +38 -0
  183. package/dist/tools/local_fetch_content/fetchContent/validation.d.ts +26 -0
  184. package/dist/tools/local_fetch_content/fetchContent.d.ts +2 -0
  185. package/dist/tools/local_fetch_content/scheme.d.ts +25 -1
  186. package/dist/tools/local_find_files/scheme.d.ts +32 -0
  187. package/dist/tools/local_ripgrep/rankingProfile/rankingProfiles.d.ts +70 -0
  188. package/dist/tools/local_ripgrep/rankingProfile/rankingResults.d.ts +47 -0
  189. package/dist/tools/local_ripgrep/rankingProfile/rankingScoring.d.ts +41 -0
  190. package/dist/tools/local_ripgrep/rankingProfile.d.ts +16 -95
  191. package/dist/tools/local_ripgrep/ripgrepResultBuilder/buildResult.d.ts +10 -0
  192. package/dist/tools/local_ripgrep/ripgrepResultBuilder/searchNext.d.ts +46 -0
  193. package/dist/tools/local_ripgrep/ripgrepResultBuilder.d.ts +2 -18
  194. package/dist/tools/local_ripgrep/scheme.d.ts +95 -0
  195. package/dist/tools/local_view_structure/scheme.d.ts +31 -0
  196. package/dist/tools/lsp/semantic_content/scheme.d.ts +48 -0
  197. package/dist/tools/lsp/semantic_content/semanticAnchored.d.ts +7 -0
  198. package/dist/tools/lsp/semantic_content/semanticEnvelopes/callEnvelopes.d.ts +5 -0
  199. package/dist/tools/lsp/semantic_content/semanticEnvelopes/envelopeHelpers.d.ts +20 -0
  200. package/dist/tools/lsp/semantic_content/semanticEnvelopes/locationEnvelopes.d.ts +13 -0
  201. package/dist/tools/lsp/semantic_content/semanticEnvelopes.d.ts +3 -0
  202. package/dist/tools/lsp/semantic_content/semanticFileOps/anchor.d.ts +24 -0
  203. package/dist/tools/lsp/semantic_content/semanticFileOps/documentSymbols.d.ts +27 -0
  204. package/dist/tools/lsp/semantic_content/semanticFileOps/workspaceSymbolsAndDiagnostics.d.ts +20 -0
  205. package/dist/tools/lsp/semantic_content/semanticFileOps.d.ts +8 -0
  206. package/dist/tools/lsp/semantic_content/semanticPresentation.d.ts +53 -0
  207. package/dist/tools/lsp/shared/semanticTypes.d.ts +6 -0
  208. package/dist/tools/package_search/execution.d.ts +8 -0
  209. package/dist/tools/package_search/scheme.d.ts +43 -2
  210. package/dist/tools/providerMappers/codeSearch.d.ts +66 -0
  211. package/dist/tools/providerMappers/fileContent.d.ts +28 -0
  212. package/dist/tools/providerMappers/pullRequests.d.ts +158 -0
  213. package/dist/tools/providerMappers/repoSearch.d.ts +30 -0
  214. package/dist/tools/providerMappers/repoStructure.d.ts +20 -0
  215. package/dist/tools/providerMappers/shared.d.ts +23 -0
  216. package/dist/tools/providerMappers.d.ts +9 -294
  217. package/dist/tools/toolConfig.d.ts +0 -2
  218. package/dist/tools/toolMetadata/descriptionOverrides.d.ts +4 -0
  219. package/dist/tools/toolSchemaImports.d.ts +13 -0
  220. package/dist/utils/contextUtils.d.ts +5 -16
  221. package/dist/utils/core/types.d.ts +2 -24
  222. package/dist/utils/exec/spawn/env.d.ts +5 -0
  223. package/dist/utils/exec/spawn/wrappers.d.ts +29 -0
  224. package/dist/utils/exec/spawn.d.ts +2 -34
  225. package/dist/utils/http/cache/conditional.d.ts +21 -0
  226. package/dist/utils/http/cache/dataCache.d.ts +6 -0
  227. package/dist/utils/http/cache/key.d.ts +1 -0
  228. package/dist/utils/http/cache/management.d.ts +9 -0
  229. package/dist/utils/http/cache/store.d.ts +28 -0
  230. package/dist/utils/http/cache.d.ts +4 -16
  231. package/dist/utils/markdownOutline.d.ts +0 -2
  232. package/dist/utils/package/npm/npmDeprecation.d.ts +5 -0
  233. package/dist/utils/package/npm/npmDetailsFetchers.d.ts +15 -0
  234. package/dist/utils/package/npm/npmMappers.d.ts +12 -0
  235. package/dist/utils/package/npm/npmRegistry.d.ts +79 -0
  236. package/dist/utils/package/npm/npmSearchStrategies.d.ts +6 -0
  237. package/dist/utils/package/npm.d.ts +2 -8
  238. package/dist/utils/pagination/boundary.d.ts +5 -5
  239. package/dist/utils/response/bulk/pagination.d.ts +6 -0
  240. package/dist/utils/response/bulk/queries.d.ts +19 -0
  241. package/dist/utils/response/bulk/response.d.ts +4 -0
  242. package/dist/utils/response/bulk.d.ts +2 -6
  243. package/package.json +9 -3
  244. package/dist/tools/local_binary_inspect/archiveOps.d.ts +0 -24
  245. package/dist/tools/local_binary_inspect/binaryInspector.d.ts +0 -86
  246. package/dist/tools/local_binary_inspect/binaryOps.d.ts +0 -27
  247. package/dist/tools/local_binary_inspect/decompressOps.d.ts +0 -16
  248. package/dist/tools/local_binary_inspect/execution.d.ts +0 -4
  249. package/dist/tools/local_binary_inspect/scheme.d.ts +0 -144
  250. package/dist/tools/local_ripgrep/lspBoost.d.ts +0 -54
  251. package/dist/utils/parsers/ripgrep.d.ts +0 -11
@@ -360,9 +360,33 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
360
360
  nextPage: z.ZodOptional<z.ZodNumber>;
361
361
  pageSize: z.ZodOptional<z.ZodNumber>;
362
362
  totalItems: z.ZodOptional<z.ZodNumber>;
363
+ perPage: z.ZodOptional<z.ZodNumber>;
364
+ totalFound: z.ZodOptional<z.ZodNumber>;
365
+ returned: z.ZodOptional<z.ZodNumber>;
366
+ totalMatches: z.ZodOptional<z.ZodNumber>;
367
+ reportedTotalMatches: z.ZodOptional<z.ZodNumber>;
368
+ reachableTotalMatches: z.ZodOptional<z.ZodNumber>;
369
+ totalMatchesKind: z.ZodOptional<z.ZodEnum<{
370
+ exact: "exact";
371
+ reported: "reported";
372
+ lowerBound: "lowerBound";
373
+ }>>;
374
+ totalMatchesCapped: z.ZodOptional<z.ZodBoolean>;
375
+ totalResults: z.ZodOptional<z.ZodNumber>;
376
+ itemsPerPage: z.ZodOptional<z.ZodNumber>;
363
377
  }, z.core.$strip>>;
364
378
  summary: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
365
379
  warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
380
+ next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
381
+ tool: z.ZodString;
382
+ query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
383
+ why: z.ZodOptional<z.ZodString>;
384
+ confidence: z.ZodOptional<z.ZodEnum<{
385
+ exact: "exact";
386
+ heuristic: "heuristic";
387
+ }>>;
388
+ }, z.core.$strip>>>;
389
+ hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
366
390
  }, z.core.$strip>;
367
391
  }, z.core.$strip>, z.ZodObject<{
368
392
  id: z.ZodString;
@@ -651,9 +675,33 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
651
675
  nextPage: z.ZodOptional<z.ZodNumber>;
652
676
  pageSize: z.ZodOptional<z.ZodNumber>;
653
677
  totalItems: z.ZodOptional<z.ZodNumber>;
678
+ perPage: z.ZodOptional<z.ZodNumber>;
679
+ totalFound: z.ZodOptional<z.ZodNumber>;
680
+ returned: z.ZodOptional<z.ZodNumber>;
681
+ totalMatches: z.ZodOptional<z.ZodNumber>;
682
+ reportedTotalMatches: z.ZodOptional<z.ZodNumber>;
683
+ reachableTotalMatches: z.ZodOptional<z.ZodNumber>;
684
+ totalMatchesKind: z.ZodOptional<z.ZodEnum<{
685
+ exact: "exact";
686
+ reported: "reported";
687
+ lowerBound: "lowerBound";
688
+ }>>;
689
+ totalMatchesCapped: z.ZodOptional<z.ZodBoolean>;
690
+ totalResults: z.ZodOptional<z.ZodNumber>;
691
+ itemsPerPage: z.ZodOptional<z.ZodNumber>;
654
692
  }, z.core.$strip>>;
655
693
  summary: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
656
694
  warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
695
+ next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
696
+ tool: z.ZodString;
697
+ query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
698
+ why: z.ZodOptional<z.ZodString>;
699
+ confidence: z.ZodOptional<z.ZodEnum<{
700
+ exact: "exact";
701
+ heuristic: "heuristic";
702
+ }>>;
703
+ }, z.core.$strip>>>;
704
+ hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
657
705
  }, z.core.$strip>;
658
706
  }, z.core.$strip>]>>;
659
707
  }, z.core.$strip>;
@@ -0,0 +1,7 @@
1
+ import { acquirePooledClient } from '@octocodeai/octocode-engine/lsp/manager';
2
+ import type { SymbolAnchor } from '../shared/resolveSymbolAnchor.js';
3
+ import type { LspSemanticEnvelope, SymbolAnchoredSemanticQuery } from '../shared/semanticTypes.js';
4
+ declare const CONSUMER_SCOPED_TYPES: ReadonlySet<string>;
5
+ export { CONSUMER_SCOPED_TYPES };
6
+ export declare function warmLikelyConsumers(client: NonNullable<Awaited<ReturnType<typeof acquirePooledClient>>>, anchor: SymbolAnchor, workspaceRoot: string): Promise<void>;
7
+ export declare function dispatchAnchoredSemantic(query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, client: NonNullable<Awaited<ReturnType<typeof acquirePooledClient>>>): Promise<LspSemanticEnvelope>;
@@ -0,0 +1,5 @@
1
+ import { acquirePooledClient } from '@octocodeai/octocode-engine/lsp/manager';
2
+ import { type LspSemanticEnvelope, type SymbolAnchoredSemanticQuery } from '../../shared/semanticTypes.js';
3
+ import type { SymbolAnchor } from '../../shared/resolveSymbolAnchor.js';
4
+ export declare function callsEnvelope(query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, client: NonNullable<Awaited<ReturnType<typeof acquirePooledClient>>>): Promise<LspSemanticEnvelope>;
5
+ export declare function typeHierarchyEnvelope(query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, client: NonNullable<Awaited<ReturnType<typeof acquirePooledClient>>>): Promise<LspSemanticEnvelope>;
@@ -0,0 +1,20 @@
1
+ import { type LspGetSemanticsQuery, type LspSemanticEnvelope, type SemanticEmptyCategory, type SemanticContentType } from '../../shared/semanticTypes.js';
2
+ import type { SymbolAnchor } from '../../shared/resolveSymbolAnchor.js';
3
+ export declare const DEFAULT_SYMBOLS_PER_PAGE = 40;
4
+ export declare const DEFAULT_LOCATIONS_PER_PAGE = 40;
5
+ export declare const DEFAULT_CALLS_PER_PAGE = 10;
6
+ export type PaginationInfo = {
7
+ currentPage: number;
8
+ totalPages: number;
9
+ totalResults: number;
10
+ hasMore: boolean;
11
+ itemsPerPage: number;
12
+ nextPage?: number;
13
+ };
14
+ export declare function emptyCategoryForReason(type: SemanticContentType, reason: string): SemanticEmptyCategory;
15
+ export declare function failedAnchorEnvelope(query: LspGetSemanticsQuery, reason: string): LspSemanticEnvelope;
16
+ export declare function emptyEnvelope(type: SemanticContentType, anchor: SymbolAnchor, reason: string, serverAvailable?: boolean): LspSemanticEnvelope;
17
+ export declare function paginateItems<T>(items: readonly T[], requestedPage: number, requestedItemsPerPage: number): {
18
+ pageItems: T[];
19
+ pagination: PaginationInfo;
20
+ };
@@ -0,0 +1,13 @@
1
+ import type { LSPRange, ReferenceLocation, ReferencesByFile, CodeSnippet } from '@octocodeai/octocode-engine/lsp/types';
2
+ import { type LspSemanticEnvelope, type SymbolAnchoredSemanticQuery } from '../../shared/semanticTypes.js';
3
+ import type { SymbolAnchor } from '../../shared/resolveSymbolAnchor.js';
4
+ export declare function locationsEnvelope(query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, kind: 'definition' | 'typeDefinition' | 'implementation', provider: string, locations: CodeSnippet[]): LspSemanticEnvelope;
5
+ export declare function referencesEnvelope(query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, locations: CodeSnippet[]): LspSemanticEnvelope;
6
+ export declare function hoverEnvelope(_query: SymbolAnchoredSemanticQuery, anchor: SymbolAnchor, hover: unknown): Promise<LspSemanticEnvelope>;
7
+ export declare function buildReferencesByFile(locations: readonly ReferenceLocation[]): ReferencesByFile[];
8
+ export declare function normalizeHover(hover: unknown): {
9
+ markdown?: string;
10
+ text?: string;
11
+ range?: LSPRange;
12
+ };
13
+ export declare function stringifyHoverPart(part: unknown): string;
@@ -0,0 +1,3 @@
1
+ export { DEFAULT_SYMBOLS_PER_PAGE, DEFAULT_LOCATIONS_PER_PAGE, DEFAULT_CALLS_PER_PAGE, type PaginationInfo, emptyCategoryForReason, failedAnchorEnvelope, emptyEnvelope, paginateItems, } from './semanticEnvelopes/envelopeHelpers.js';
2
+ export { locationsEnvelope, referencesEnvelope, hoverEnvelope, buildReferencesByFile, normalizeHover, stringifyHoverPart, } from './semanticEnvelopes/locationEnvelopes.js';
3
+ export { callsEnvelope, typeHierarchyEnvelope, } from './semanticEnvelopes/callEnvelopes.js';
@@ -0,0 +1,24 @@
1
+ import type { SemanticContentType, WorkspaceSymbolSemanticQuery } from '../../shared/semanticTypes.js';
2
+ export declare function isNativeJsTsFile(uri: string): boolean;
3
+ /**
4
+ * Throw when a real language server cannot answer a semantic operation. We do
5
+ * NOT fabricate a syntactic/same-file stand-in: a faked answer is worse than an
6
+ * honest failure because the agent would trust it. The thrown ToolError is
7
+ * routed by the execution boundary into the standard `status:"error"` envelope
8
+ * (errorCode `lspServerUnavailable`), and the message directs the agent to text
9
+ * search instead. documentSymbols/structural search keep their tree-sitter path
10
+ * and never reach here.
11
+ */
12
+ export declare function throwLspUnavailable(uri: string, op: SemanticContentType): never;
13
+ export declare function toLocalPath(value: string, workspaceRoot: string): string;
14
+ export declare function workspaceSymbolAnchorExtensions(): string[];
15
+ export declare function workspaceSymbolAnchorIncludeGlobs(): string[];
16
+ export declare function findWorkspaceSymbolAnchorByName(query: WorkspaceSymbolSemanticQuery, workspaceRoot: string): Promise<string | undefined>;
17
+ export declare function resolveWorkspaceSymbolAnchor(query: WorkspaceSymbolSemanticQuery, workspaceRoot: string): Promise<string>;
18
+ export declare function lspErrorMessage(error: unknown): string;
19
+ /**
20
+ * Native JS/TS document symbols via oxc, parsed into the LSP `DocumentSymbol[]`
21
+ * shape. Returns `null` when oxc declines the input so the caller can fall back
22
+ * to the "no symbols" empty state.
23
+ */
24
+ export declare function nativeDocumentSymbols(uri: string, content: string): unknown[] | null;
@@ -0,0 +1,27 @@
1
+ import type { LSPRange } from '@octocodeai/octocode-engine/lsp/types';
2
+ import { type LspGetSemanticsQuery, type LspSemanticEnvelope } from '../../shared/semanticTypes.js';
3
+ export type CompactSymbol = {
4
+ name: string;
5
+ kind: string;
6
+ line: number;
7
+ character: number;
8
+ endLine: number;
9
+ childCount: number;
10
+ containerName?: string;
11
+ };
12
+ type LspPositionLike = {
13
+ line: number;
14
+ character: number;
15
+ };
16
+ export declare function getDocumentSymbols(query: LspGetSemanticsQuery): Promise<LspSemanticEnvelope | Record<string, unknown>>;
17
+ export declare function flattenDocumentSymbols(symbols: readonly unknown[]): CompactSymbol[];
18
+ export declare function flattenDocumentSymbol(value: unknown, output: CompactSymbol[], containerName?: string): void;
19
+ export declare function getSymbolRange(value: {
20
+ range?: unknown;
21
+ location?: unknown;
22
+ }): LSPRange | undefined;
23
+ export declare function isLspRange(value: unknown): value is LSPRange;
24
+ export declare function isPosition(value: unknown): value is LspPositionLike;
25
+ export declare function countTopLevelDocumentSymbols(symbols: readonly unknown[]): number;
26
+ export declare function countBy<T>(items: readonly T[], keyForItem: (item: T) => string): Record<string, number>;
27
+ export {};
@@ -0,0 +1,20 @@
1
+ import type { LspSemanticEnvelope, DiagnosticSemanticQuery, WorkspaceSymbolSemanticQuery } from '../../shared/semanticTypes.js';
2
+ import type { CompactSymbol } from './documentSymbols.js';
3
+ type CompactWorkspaceSymbol = CompactSymbol & {
4
+ uri: string;
5
+ };
6
+ type DiagnosticItem = {
7
+ severity?: number;
8
+ message: string;
9
+ line: number;
10
+ endLine: number;
11
+ character: number;
12
+ code?: string | number;
13
+ source?: string;
14
+ };
15
+ export declare function getWorkspaceSymbols(query: WorkspaceSymbolSemanticQuery): Promise<LspSemanticEnvelope | Record<string, unknown>>;
16
+ export declare function compactWorkspaceSymbols(raw: unknown[]): CompactWorkspaceSymbol[];
17
+ export declare function getFileDiagnostics(query: DiagnosticSemanticQuery): Promise<LspSemanticEnvelope | Record<string, unknown>>;
18
+ export declare function extractDiagnostics(raw: unknown): DiagnosticItem[];
19
+ export declare function parseDiagnostic(item: unknown): DiagnosticItem[];
20
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Barrel for the semanticFileOps/ split (anchor & workspace resolution vs.
3
+ * documentSymbols vs. workspaceSymbols/diagnostics operations). Kept so no
4
+ * other file in the repo needs to change its import path.
5
+ */
6
+ export { isNativeJsTsFile, throwLspUnavailable, toLocalPath, workspaceSymbolAnchorExtensions, workspaceSymbolAnchorIncludeGlobs, findWorkspaceSymbolAnchorByName, resolveWorkspaceSymbolAnchor, lspErrorMessage, nativeDocumentSymbols, } from './semanticFileOps/anchor.js';
7
+ export { type CompactSymbol, getDocumentSymbols, flattenDocumentSymbols, flattenDocumentSymbol, getSymbolRange, isLspRange, isPosition, countTopLevelDocumentSymbols, countBy, } from './semanticFileOps/documentSymbols.js';
8
+ export { getWorkspaceSymbols, compactWorkspaceSymbols, getFileDiagnostics, extractDiagnostics, parseDiagnostic, } from './semanticFileOps/workspaceSymbolsAndDiagnostics.js';
@@ -0,0 +1,53 @@
1
+ import type { CallHierarchyItem, IncomingCall, LSPRange, OutgoingCall } from '@octocodeai/octocode-engine/lsp/types';
2
+ import { type CompactLocation, type LspGetSemanticsQuery, type LspSemanticEnvelope } from '../shared/semanticTypes.js';
3
+ export type CompactCallTarget = {
4
+ name: string;
5
+ kind: string;
6
+ uri: string;
7
+ line: number;
8
+ endLine: number;
9
+ selectionLine?: number;
10
+ };
11
+ export type CompactCall = {
12
+ direction: 'incoming' | 'outgoing';
13
+ item: CompactCallTarget;
14
+ ranges: Array<{
15
+ line: number;
16
+ character: number;
17
+ }>;
18
+ rangeCount: number;
19
+ rangeSampleCount: number;
20
+ contentPreview?: string;
21
+ };
22
+ export declare function attachSemanticRawEvidence<T extends object>(result: T): T;
23
+ export declare function formatSemanticResult(query: LspGetSemanticsQuery, result: LspSemanticEnvelope | Record<string, unknown>): LspSemanticEnvelope | Record<string, unknown>;
24
+ export declare function withSemanticNext(result: LspSemanticEnvelope | Record<string, unknown>): LspSemanticEnvelope | Record<string, unknown>;
25
+ export declare function isSemanticEnvelope(value: LspSemanticEnvelope | Record<string, unknown>): value is LspSemanticEnvelope;
26
+ export declare function compactSemanticEnvelope(envelope: LspSemanticEnvelope): LspSemanticEnvelope;
27
+ export declare function compactSemanticPayload(payload: LspSemanticEnvelope['payload']): LspSemanticEnvelope['payload'];
28
+ export declare function formatSymbolRow(value: unknown): string;
29
+ export declare function formatLocationRow(location: CompactLocation | string): string;
30
+ export declare function formatReferenceFileRow(value: unknown): string;
31
+ export declare function formatCallRow(value: unknown): string;
32
+ export declare function formatCallTargetRow(value: unknown): string;
33
+ export declare function formatRangeRow(value: unknown): string;
34
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
35
+ export declare function stringField(record: Record<string, unknown>, key: string, fallback?: string): string;
36
+ export declare function numberField(record: Record<string, unknown>, key: string, fallback?: number): number;
37
+ export declare function arrayField(record: Record<string, unknown>, key: string): unknown[];
38
+ export declare function oneLine(value: string, maxLength: number): string;
39
+ export declare function compactIncomingCall(call: IncomingCall & {
40
+ direction: 'incoming';
41
+ }, contextLines: number): CompactCall;
42
+ export declare function compactOutgoingCall(call: OutgoingCall & {
43
+ direction: 'outgoing';
44
+ }, contextLines: number): CompactCall;
45
+ export declare function compactCallItem(item: CallHierarchyItem): CompactCallTarget;
46
+ export declare function compactRanges(ranges: readonly LSPRange[]): {
47
+ line: number;
48
+ character: number;
49
+ }[];
50
+ export declare function contentPreview(item: CallHierarchyItem, contextLines: number): {
51
+ contentPreview?: string;
52
+ };
53
+ export declare function symbolKindName(kind: unknown): string;
@@ -161,4 +161,10 @@ export type LspSemanticEnvelope = {
161
161
  pagination?: unknown;
162
162
  warnings?: string[];
163
163
  hints?: string[];
164
+ next?: Record<string, {
165
+ tool: string;
166
+ query: Record<string, unknown>;
167
+ why?: string;
168
+ confidence?: 'exact' | 'heuristic';
169
+ }>;
164
170
  };
@@ -2,6 +2,7 @@ import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
2
  import type { z } from 'zod';
3
3
  import type { NpmPackageQuerySchema } from '@octocodeai/octocode-core/schemas';
4
4
  type NpmSearchQuery = z.input<typeof NpmPackageQuerySchema>;
5
+ import type { PackageResult } from '../../utils/package/common.js';
5
6
  import type { ToolExecutionArgs } from '../../types/execution.js';
6
7
  type PackageData = {
7
8
  name: string;
@@ -13,6 +14,12 @@ type PackageData = {
13
14
  repositoryDirectory?: string;
14
15
  repositoryId?: string;
15
16
  next?: Record<string, unknown>;
17
+ warnings?: string[];
18
+ diagnostics?: Array<{
19
+ level: 'info' | 'warning' | 'error';
20
+ message: string;
21
+ code?: string;
22
+ }>;
16
23
  };
17
24
  type PackageRepositoryData = {
18
25
  repository: string;
@@ -25,6 +32,7 @@ type CompactPackageData = {
25
32
  packages: PackageData[];
26
33
  repositories?: Record<string, PackageRepositoryData>;
27
34
  };
35
+ export declare function formatPackageData(pkg: PackageResult): PackageData;
28
36
  export declare function compactPackageRepositories(packages: PackageData[]): CompactPackageData;
29
37
  type PackagePagination = {
30
38
  currentPage: number;
@@ -25,14 +25,41 @@ export declare const NpmSearchOutputLocalSchema: z.ZodObject<{
25
25
  repository: z.ZodOptional<z.ZodString>;
26
26
  repositoryDirectory: z.ZodOptional<z.ZodString>;
27
27
  repositoryId: z.ZodOptional<z.ZodString>;
28
- next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
28
+ next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
29
+ tool: z.ZodString;
30
+ query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
31
+ why: z.ZodOptional<z.ZodString>;
32
+ confidence: z.ZodOptional<z.ZodEnum<{
33
+ exact: "exact";
34
+ heuristic: "heuristic";
35
+ }>>;
36
+ }, z.core.$strip>>>;
37
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
39
+ level: z.ZodEnum<{
40
+ error: "error";
41
+ info: "info";
42
+ warning: "warning";
43
+ }>;
44
+ message: z.ZodString;
45
+ field: z.ZodOptional<z.ZodString>;
46
+ code: z.ZodOptional<z.ZodString>;
47
+ }, z.core.$strip>>>;
29
48
  }, z.core.$loose>>>;
30
49
  repositories: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
31
50
  repository: z.ZodString;
32
51
  owner: z.ZodString;
33
52
  repo: z.ZodString;
34
53
  repositoryDirectory: z.ZodOptional<z.ZodString>;
35
- next: z.ZodRecord<z.ZodString, z.ZodUnknown>;
54
+ next: z.ZodRecord<z.ZodString, z.ZodObject<{
55
+ tool: z.ZodString;
56
+ query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
57
+ why: z.ZodOptional<z.ZodString>;
58
+ confidence: z.ZodOptional<z.ZodEnum<{
59
+ exact: "exact";
60
+ heuristic: "heuristic";
61
+ }>>;
62
+ }, z.core.$strip>>;
36
63
  }, z.core.$loose>>>;
37
64
  pagination: z.ZodOptional<z.ZodObject<{
38
65
  currentPage: z.ZodNumber;
@@ -41,6 +68,20 @@ export declare const NpmSearchOutputLocalSchema: z.ZodObject<{
41
68
  nextPage: z.ZodOptional<z.ZodNumber>;
42
69
  pageSize: z.ZodOptional<z.ZodNumber>;
43
70
  totalItems: z.ZodOptional<z.ZodNumber>;
71
+ perPage: z.ZodOptional<z.ZodNumber>;
72
+ totalFound: z.ZodOptional<z.ZodNumber>;
73
+ returned: z.ZodOptional<z.ZodNumber>;
74
+ totalMatches: z.ZodOptional<z.ZodNumber>;
75
+ reportedTotalMatches: z.ZodOptional<z.ZodNumber>;
76
+ reachableTotalMatches: z.ZodOptional<z.ZodNumber>;
77
+ totalMatchesKind: z.ZodOptional<z.ZodEnum<{
78
+ exact: "exact";
79
+ reported: "reported";
80
+ lowerBound: "lowerBound";
81
+ }>>;
82
+ totalMatchesCapped: z.ZodOptional<z.ZodBoolean>;
83
+ totalResults: z.ZodOptional<z.ZodNumber>;
84
+ itemsPerPage: z.ZodOptional<z.ZodNumber>;
44
85
  }, z.core.$strip>>;
45
86
  }, z.core.$loose>>;
46
87
  status: z.ZodOptional<z.ZodString>;
@@ -0,0 +1,66 @@
1
+ import type { CodeSearchResult } from '../../providers/types.js';
2
+ import type { z } from 'zod';
3
+ import type { GitHubCodeSearchQuerySchema } from '@octocodeai/octocode-core/schemas';
4
+ import type { WithOptionalMeta } from '../../types/execution.js';
5
+ type GitHubCodeSearchQuery = z.infer<typeof GitHubCodeSearchQuerySchema>;
6
+ /**
7
+ * Char-boundary truncation mirroring the Rust engine's `truncate_unicode`:
8
+ * keeps at most `maxChars` Unicode scalars and appends `...` when it cuts.
9
+ * Never slices UTF-8 mid-codepoint or mid-token — the single data-layer bound
10
+ * for GitHub code-search match fragments (the render layer must not re-trim).
11
+ */
12
+ export declare function truncateSnippetChars(value: string, maxChars?: number): string;
13
+ export declare function mapCodeSearchToolQuery(query: WithOptionalMeta<GitHubCodeSearchQuery>): {
14
+ keywords: string[];
15
+ projectId: string;
16
+ owner: string;
17
+ path: string;
18
+ filename: string;
19
+ extension: string;
20
+ language: string | undefined;
21
+ match: "file" | "path";
22
+ limit: number | undefined;
23
+ page: number;
24
+ mainResearchGoal: string;
25
+ researchGoal: string;
26
+ reasoning: string;
27
+ };
28
+ export interface CodeSearchGroupedMatch {
29
+ path: string;
30
+ value?: string;
31
+ pathOnly?: boolean;
32
+ matchIndices?: Array<{
33
+ start: number;
34
+ end: number;
35
+ lineOffset: number;
36
+ }>;
37
+ url?: string;
38
+ }
39
+ export interface CodeSearchGroupedResult {
40
+ id: string;
41
+ queryId?: string;
42
+ owner: string;
43
+ repo: string;
44
+ matches: CodeSearchGroupedMatch[];
45
+ }
46
+ export interface CodeSearchPagination {
47
+ currentPage: number;
48
+ totalPages: number;
49
+ perPage: number;
50
+ totalMatches: number;
51
+ reportedTotalMatches?: number;
52
+ reachableTotalMatches?: number;
53
+ totalMatchesKind?: 'exact' | 'reported' | 'lowerBound';
54
+ totalMatchesCapped?: boolean;
55
+ hasMore: boolean;
56
+ nextPage?: number;
57
+ uniqueFileCount?: number;
58
+ }
59
+ export interface CodeSearchFlatResult {
60
+ results: CodeSearchGroupedResult[];
61
+ pagination?: CodeSearchPagination;
62
+ nonExistentScope?: boolean;
63
+ incompleteResults?: boolean;
64
+ }
65
+ export declare function mapCodeSearchProviderResult(data: CodeSearchResult, query: WithOptionalMeta<GitHubCodeSearchQuery>): CodeSearchFlatResult;
66
+ export {};
@@ -0,0 +1,28 @@
1
+ import type { FileContentResult as ProviderFileContentResult } from '../../providers/types.js';
2
+ import type { z } from 'zod';
3
+ import type { WithOptionalMeta } from '../../types/execution.js';
4
+ import { FileContentQueryLocalSchema } from '../github_fetch_content/scheme.js';
5
+ type LocalFileContentQuery = z.infer<typeof FileContentQueryLocalSchema> & {
6
+ minify: import('../../scheme/fields.js').MinifyMode;
7
+ };
8
+ export declare function mapFileContentToolQuery(query: LocalFileContentQuery): {
9
+ projectId: string;
10
+ path: string;
11
+ ref: string;
12
+ startLine: number;
13
+ endLine: number;
14
+ matchString: string;
15
+ contextLines: number;
16
+ fullContent: boolean;
17
+ forceRefresh: boolean;
18
+ charOffset: number;
19
+ charLength: number;
20
+ minify: "none" | "standard" | "symbols";
21
+ matchStringIsRegex: boolean;
22
+ matchStringCaseSensitive: boolean;
23
+ mainResearchGoal: string;
24
+ researchGoal: string;
25
+ reasoning: string;
26
+ };
27
+ export declare function mapFileContentProviderResult(data: ProviderFileContentResult, query: WithOptionalMeta<LocalFileContentQuery>): Record<string, unknown>;
28
+ export {};
@@ -0,0 +1,158 @@
1
+ import type { PullRequestSearchResult as ProviderPullRequestSearchResult } from '../../providers/types.js';
2
+ import type { z } from 'zod';
3
+ import type { GitHubPullRequestSearchQueryLocalSchema } from '../github_search_pull_requests/scheme.js';
4
+ import type { WithOptionalMeta } from '../../types/execution.js';
5
+ type GitHubPullRequestSearchQuery = z.infer<typeof GitHubPullRequestSearchQueryLocalSchema>;
6
+ type PRDefaultKeys = 'order' | 'limit' | 'page';
7
+ type PartialPRQuery = WithOptionalMeta<Omit<GitHubPullRequestSearchQuery, PRDefaultKeys> & Partial<Pick<GitHubPullRequestSearchQuery, PRDefaultKeys>>>;
8
+ export declare function mapPullRequestToolQuery(query: PartialPRQuery): {
9
+ projectId: string;
10
+ owner: string;
11
+ query: string;
12
+ number: number;
13
+ state: "open" | "closed" | "merged" | "all" | undefined;
14
+ author: string;
15
+ assignee: string;
16
+ commenter: string;
17
+ involves: string;
18
+ mentions: string;
19
+ reviewRequested: string;
20
+ reviewedBy: string;
21
+ labels: string[];
22
+ noLabel: boolean;
23
+ noMilestone: boolean;
24
+ noProject: boolean;
25
+ noAssignee: boolean;
26
+ baseBranch: string;
27
+ headBranch: string;
28
+ created: string;
29
+ updated: string;
30
+ closed: string;
31
+ mergedAt: string;
32
+ comments: string;
33
+ reactions: string;
34
+ interactions: string;
35
+ draft: boolean;
36
+ match: ("title" | "body" | "comments")[];
37
+ milestone: string;
38
+ language: string;
39
+ checks: "success" | "failure" | "pending";
40
+ review: "none" | "approved" | "changes_requested" | "required";
41
+ locked: boolean;
42
+ visibility: "public" | "private";
43
+ teamMentions: string;
44
+ project: string;
45
+ archived: boolean | undefined;
46
+ content: unknown;
47
+ reviewMode: "full" | "summary";
48
+ filePage: number;
49
+ commentPage: number;
50
+ commitPage: number;
51
+ itemsPerPage: number;
52
+ sort: "created" | "updated" | "best-match" | "comments" | "reactions" | undefined;
53
+ order: "asc" | "desc" | undefined;
54
+ limit: number;
55
+ page: number;
56
+ charOffset: number;
57
+ charLength: number;
58
+ mainResearchGoal: string;
59
+ researchGoal: string;
60
+ reasoning: string;
61
+ };
62
+ export declare function mapPullRequestProviderResultData(data: ProviderPullRequestSearchResult, options?: {
63
+ includeFileChanges?: boolean;
64
+ }): {
65
+ pullRequests: {
66
+ sanitizationWarnings?: string[];
67
+ fileChanges?: {
68
+ path: string;
69
+ status: string;
70
+ additions: number;
71
+ deletions: number;
72
+ patch?: string;
73
+ }[];
74
+ reviewSummary: {
75
+ totalComments: number;
76
+ inlineComments: number;
77
+ discussionComments: number;
78
+ commenters: string[];
79
+ latestCommentAt?: string;
80
+ themes: string[];
81
+ };
82
+ commits: {
83
+ sha: string;
84
+ message: string;
85
+ author: string;
86
+ date: string;
87
+ }[];
88
+ reviews: {
89
+ id: string;
90
+ user: string;
91
+ state: string;
92
+ body: string;
93
+ submittedAt?: string;
94
+ commitId?: string;
95
+ }[];
96
+ comments: {
97
+ bodyPagination: {
98
+ charOffset: number;
99
+ charLength: number;
100
+ totalChars: number;
101
+ hasMore: boolean;
102
+ nextCharOffset?: number;
103
+ };
104
+ id: string;
105
+ author: string;
106
+ body: string;
107
+ createdAt: string;
108
+ updatedAt: string;
109
+ commentType?: "discussion" | "review_inline";
110
+ path?: string;
111
+ line?: number;
112
+ in_reply_to_id?: number;
113
+ }[];
114
+ url: string;
115
+ state: "open" | "closed" | "merged";
116
+ draft: boolean;
117
+ author: string;
118
+ assignees: string[];
119
+ labels: string[];
120
+ sourceBranch: string;
121
+ targetBranch: string;
122
+ sourceSha: string;
123
+ targetSha: string;
124
+ createdAt: string;
125
+ updatedAt: string;
126
+ closedAt: string;
127
+ mergedAt: string;
128
+ commentsCount: number;
129
+ changedFilesCount: number;
130
+ additions: number;
131
+ deletions: number;
132
+ bodyPagination: {
133
+ charOffset: number;
134
+ charLength: number;
135
+ totalChars: number;
136
+ hasMore: boolean;
137
+ nextCharOffset?: number;
138
+ };
139
+ number: number;
140
+ title: string;
141
+ body: string;
142
+ }[];
143
+ resultData: Record<string, unknown>;
144
+ pagination: {
145
+ nextPage?: number;
146
+ hasMore: boolean;
147
+ uniqueFileCount?: number;
148
+ totalMatchesCapped?: boolean;
149
+ totalMatchesKind?: "exact" | "reported" | "lowerBound";
150
+ reachableTotalMatches?: number;
151
+ reportedTotalMatches?: number;
152
+ totalMatches?: number;
153
+ currentPage: number;
154
+ totalPages: number;
155
+ perPage: number;
156
+ };
157
+ };
158
+ export {};
@@ -0,0 +1,30 @@
1
+ import type { RepoSearchResult as ProviderRepoSearchResult } from '../../providers/types.js';
2
+ import type { z } from 'zod';
3
+ import type { GitHubReposSearchSingleQuerySchema } from '@octocodeai/octocode-core/schemas';
4
+ import type { GitHubRepositoryOutput } from '@octocodeai/octocode-core/extra-types';
5
+ import type { WithOptionalMeta } from '../../types/execution.js';
6
+ type GitHubReposSearchSingleQuery = z.infer<typeof GitHubReposSearchSingleQuerySchema>;
7
+ export declare function mapRepoSearchToolQuery(query: WithOptionalMeta<GitHubReposSearchSingleQuery>): {
8
+ keywords: string[];
9
+ topics: string[];
10
+ owner: string;
11
+ stars: string;
12
+ size: string;
13
+ created: string;
14
+ updated: string;
15
+ language: string;
16
+ archived: boolean | undefined;
17
+ visibility: "public" | "private" | undefined;
18
+ forks: string | undefined;
19
+ license: string | undefined;
20
+ goodFirstIssues: string | undefined;
21
+ match: ("description" | "name" | "readme")[];
22
+ sort: "stars" | "forks" | "updated" | "created" | "best-match" | undefined;
23
+ limit: number | undefined;
24
+ page: number;
25
+ mainResearchGoal: string;
26
+ researchGoal: string;
27
+ reasoning: string;
28
+ };
29
+ export declare function mapRepoSearchProviderRepositories(repositories: ProviderRepoSearchResult['repositories']): GitHubRepositoryOutput[];
30
+ export {};