@octocodeai/octocode-tools-core 16.6.2 → 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 (277) hide show
  1. package/README.md +29 -55
  2. package/dist/direct.js +34 -36
  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 -0
  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 +6 -7
  42. package/dist/index.js +36 -45
  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/graphProof.d.ts +6 -0
  48. package/dist/oql/adapters/graphView/filters.d.ts +25 -0
  49. package/dist/oql/adapters/graphView/nativeEdges.d.ts +5 -0
  50. package/dist/oql/adapters/graphView.d.ts +29 -0
  51. package/dist/oql/adapters/local/code.d.ts +3 -0
  52. package/dist/oql/adapters/local/codeBoolean.d.ts +3 -0
  53. package/dist/oql/adapters/local/fileRowOps.d.ts +11 -0
  54. package/dist/oql/adapters/local/files.d.ts +3 -0
  55. package/dist/oql/adapters/local/filesBoolean.d.ts +10 -0
  56. package/dist/oql/adapters/local/filesContentLeaf.d.ts +12 -0
  57. package/dist/oql/adapters/local/filesUniverse.d.ts +6 -0
  58. package/dist/oql/adapters/local/findToolType.d.ts +10 -0
  59. package/dist/oql/adapters/local/predicates.d.ts +18 -0
  60. package/dist/oql/adapters/local/scope.d.ts +14 -0
  61. package/dist/oql/adapters/local/searchToolType.d.ts +7 -0
  62. package/dist/oql/adapters/local/structureContent.d.ts +6 -0
  63. package/dist/oql/adapters/local/types.d.ts +34 -0
  64. package/dist/oql/adapters/local.d.ts +3 -7
  65. package/dist/oql/adapters/researchTargets/diff.d.ts +16 -0
  66. package/dist/oql/adapters/researchTargets/graph.d.ts +3 -0
  67. package/dist/oql/adapters/researchTargets/history.d.ts +20 -0
  68. package/dist/oql/adapters/researchTargets/pagination.d.ts +54 -0
  69. package/dist/oql/adapters/researchTargets/repositories.d.ts +4 -0
  70. package/dist/oql/adapters/researchTargets/research.d.ts +3 -0
  71. package/dist/oql/adapters/researchTargets/rows.d.ts +16 -0
  72. package/dist/oql/adapters/researchTargets/semantics.d.ts +3 -0
  73. package/dist/oql/adapters/researchTargets/shared.d.ts +11 -0
  74. package/dist/oql/adapters/researchTargets.d.ts +4 -46
  75. package/dist/oql/adapters/resultMap.d.ts +7 -0
  76. package/dist/oql/adapters/runner.d.ts +7 -0
  77. package/dist/oql/defaults.d.ts +1 -1
  78. package/dist/oql/index.js +35 -37
  79. package/dist/oql/normalize/batch.d.ts +2 -0
  80. package/dist/oql/normalize/materialize.d.ts +2 -0
  81. package/dist/oql/normalize/params.d.ts +2 -0
  82. package/dist/oql/normalize/query.d.ts +2 -0
  83. package/dist/oql/normalize/scope.d.ts +2 -0
  84. package/dist/oql/normalize/shared.d.ts +7 -0
  85. package/dist/oql/normalize/source.d.ts +2 -0
  86. package/dist/oql/normalize/where.d.ts +2 -0
  87. package/dist/oql/normalize.d.ts +19 -4
  88. package/dist/oql/planner/planDiagnostics.d.ts +13 -0
  89. package/dist/oql/planner/predicateRouting.d.ts +35 -0
  90. package/dist/oql/predicateUtils.d.ts +3 -0
  91. package/dist/oql/research/analyze/manifest-scan.d.ts +4 -0
  92. package/dist/oql/research/analyze/source-graph.d.ts +7 -0
  93. package/dist/oql/research/analyze/symbol-scoring.d.ts +4 -0
  94. package/dist/oql/research/analyze/types.d.ts +163 -0
  95. package/dist/oql/research/analyze/utils.d.ts +16 -0
  96. package/dist/oql/research/analyze.d.ts +2 -133
  97. package/dist/oql/research/packets/builders.d.ts +4 -0
  98. package/dist/oql/research/packets/types.d.ts +91 -0
  99. package/dist/oql/research/packets.d.ts +21 -80
  100. package/dist/oql/run/batch.d.ts +3 -0
  101. package/dist/oql/run/continuations/records.d.ts +19 -0
  102. package/dist/oql/run/continuations/registry.d.ts +22 -0
  103. package/dist/oql/run/continuations/semantics.d.ts +3 -0
  104. package/dist/oql/run/continuations/types.d.ts +12 -0
  105. package/dist/oql/run/dryRun.d.ts +11 -0
  106. package/dist/oql/run/paths.d.ts +15 -0
  107. package/dist/oql/run/proofGrades.d.ts +8 -0
  108. package/dist/oql/run/select.d.ts +10 -0
  109. package/dist/oql/run/single.d.ts +22 -0
  110. package/dist/oql/run.d.ts +4 -31
  111. package/dist/oql/schema/predicates.d.ts +12 -0
  112. package/dist/oql/schema.d.ts +74 -43
  113. package/dist/oql/schemeText.d.ts +21 -23
  114. package/dist/oql/shorthand/predicates.d.ts +15 -0
  115. package/dist/oql/shorthand/query-controls.d.ts +18 -0
  116. package/dist/oql/shorthand/target-params.d.ts +9 -0
  117. package/dist/oql/shorthand/types.d.ts +159 -0
  118. package/dist/oql/shorthand/utils.d.ts +7 -0
  119. package/dist/oql/shorthand.d.ts +2 -171
  120. package/dist/oql/targetParams.d.ts +0 -13
  121. package/dist/oql/transformers/github/code.d.ts +1 -9
  122. package/dist/oql/transformers/github/common.d.ts +7 -1
  123. package/dist/oql/types/diagnostics.d.ts +22 -0
  124. package/dist/oql/types/envelope.d.ts +78 -0
  125. package/dist/oql/types/guards.d.ts +9 -0
  126. package/dist/oql/types/planner.d.ts +46 -0
  127. package/dist/oql/types/predicates.d.ts +93 -0
  128. package/dist/oql/types/query.d.ts +143 -0
  129. package/dist/oql/types/recordData.d.ts +127 -0
  130. package/dist/oql/types/recordRows.d.ts +48 -0
  131. package/dist/oql/types/results.d.ts +118 -0
  132. package/dist/oql/types/targets.d.ts +22 -0
  133. package/dist/oql/types.d.ts +17 -630
  134. package/dist/providers/github/paginationMetadata.d.ts +12 -0
  135. package/dist/providers/providerResults.d.ts +0 -1
  136. package/dist/responses.d.ts +4 -35
  137. package/dist/schema.js +2 -2
  138. package/dist/scheme/pagination.d.ts +116 -0
  139. package/dist/scheme/responseEnvelope.d.ts +67 -1
  140. package/dist/shared/config/index.d.ts +1 -8
  141. package/dist/shared/config/index.js +1 -2
  142. package/dist/shared/credentials/index.d.ts +1 -1
  143. package/dist/shared/credentials/index.js +2 -1
  144. package/dist/shared/credentials/storage.d.ts +0 -2
  145. package/dist/shared/credentials/testing.js +1 -1
  146. package/dist/shared/languageSelectors/classify.d.ts +15 -0
  147. package/dist/shared/languageSelectors/data.d.ts +12 -0
  148. package/dist/shared/languageSelectors.d.ts +3 -23
  149. package/dist/shared/paths.d.ts +4 -4
  150. package/dist/shared/paths.js +1 -1
  151. package/dist/shared/session/index.js +1 -1
  152. package/dist/shared/session/statsDefaults.d.ts +1 -2
  153. package/dist/tools/directToolCatalog/toolCatalogDefinitions.d.ts +68 -0
  154. package/dist/tools/directToolCatalog/toolCommandPatternQueries.d.ts +4 -0
  155. package/dist/tools/directToolCatalog/toolCommandPatterns.d.ts +4 -0
  156. package/dist/tools/directToolCatalog/toolInputPreparation.d.ts +12 -0
  157. package/dist/tools/directToolCatalog/toolSchemaIntrospection.d.ts +19 -0
  158. package/dist/tools/directToolCatalog.exec.d.ts +5 -0
  159. package/dist/tools/directToolCatalog.meta.d.ts +10 -67
  160. package/dist/tools/github_clone_repo/cache.d.ts +1 -5
  161. package/dist/tools/github_clone_repo/cachePaths.d.ts +5 -0
  162. package/dist/tools/github_clone_repo/scheme.d.ts +0 -1
  163. package/dist/tools/github_fetch_content/finalizer/entryParsers.d.ts +9 -0
  164. package/dist/tools/github_fetch_content/finalizer/types.d.ts +101 -0
  165. package/dist/tools/github_fetch_content/finalizer.d.ts +1 -7
  166. package/dist/tools/github_fetch_content/scheme.d.ts +43 -9
  167. package/dist/tools/github_fetch_content/types.d.ts +1 -2
  168. package/dist/tools/github_search_code/execution.d.ts +9 -0
  169. package/dist/tools/github_search_code/finalizer/build.d.ts +4 -0
  170. package/dist/tools/github_search_code/finalizer/groups.d.ts +23 -0
  171. package/dist/tools/github_search_code/finalizer/ranking.d.ts +12 -0
  172. package/dist/tools/github_search_code/finalizer.d.ts +2 -6
  173. package/dist/tools/github_search_code/scheme.d.ts +31 -6
  174. package/dist/tools/github_search_pull_requests/contentResponse/commentsShaping.d.ts +68 -0
  175. package/dist/tools/github_search_pull_requests/contentResponse/fileSurfaces.d.ts +52 -0
  176. package/dist/tools/github_search_pull_requests/contentResponse/nextCalls.d.ts +17 -0
  177. package/dist/tools/github_search_pull_requests/contentResponse/pagination.d.ts +63 -0
  178. package/dist/tools/github_search_pull_requests/contentResponse.d.ts +1 -15
  179. package/dist/tools/github_search_pull_requests/execution/commitsMode.d.ts +4 -0
  180. package/dist/tools/github_search_pull_requests/execution/issuesMode.d.ts +4 -0
  181. package/dist/tools/github_search_pull_requests/execution/pullRequestsMode.d.ts +4 -0
  182. package/dist/tools/github_search_pull_requests/execution/releasesMode.d.ts +4 -0
  183. package/dist/tools/github_search_pull_requests/execution/types.d.ts +6 -0
  184. package/dist/tools/github_search_pull_requests/execution.d.ts +1 -4
  185. package/dist/tools/github_search_pull_requests/scheme.d.ts +11 -2
  186. package/dist/tools/github_search_repos/execution/pagination.d.ts +39 -0
  187. package/dist/tools/github_search_repos/execution/queryVariants.d.ts +38 -0
  188. package/dist/tools/github_search_repos/execution/ranking.d.ts +4 -0
  189. package/dist/tools/github_search_repos/execution.d.ts +3 -13
  190. package/dist/tools/github_search_repos/scheme.d.ts +7 -2
  191. package/dist/tools/github_view_repo_structure/scheme.d.ts +0 -1
  192. package/dist/tools/github_view_repo_structure/types.d.ts +2 -0
  193. package/dist/tools/local_fetch_content/fetchContent/extraction.d.ts +15 -0
  194. package/dist/tools/local_fetch_content/fetchContent/pagination.d.ts +38 -0
  195. package/dist/tools/local_fetch_content/fetchContent/validation.d.ts +26 -0
  196. package/dist/tools/local_fetch_content/fetchContent.d.ts +2 -0
  197. package/dist/tools/local_fetch_content/scheme.d.ts +90 -0
  198. package/dist/tools/local_find_files/scheme.d.ts +81 -0
  199. package/dist/tools/local_ripgrep/rankingProfile/rankingProfiles.d.ts +70 -0
  200. package/dist/tools/local_ripgrep/rankingProfile/rankingResults.d.ts +47 -0
  201. package/dist/tools/local_ripgrep/rankingProfile/rankingScoring.d.ts +41 -0
  202. package/dist/tools/local_ripgrep/rankingProfile.d.ts +16 -95
  203. package/dist/tools/local_ripgrep/ripgrepResultBuilder/buildResult.d.ts +10 -0
  204. package/dist/tools/local_ripgrep/ripgrepResultBuilder/searchNext.d.ts +46 -0
  205. package/dist/tools/local_ripgrep/ripgrepResultBuilder.d.ts +2 -18
  206. package/dist/tools/local_ripgrep/scheme.d.ts +170 -0
  207. package/dist/tools/local_view_structure/scheme.d.ts +83 -0
  208. package/dist/tools/lsp/semantic_content/scheme.d.ts +56 -8
  209. package/dist/tools/lsp/semantic_content/semanticAnchored.d.ts +7 -0
  210. package/dist/tools/lsp/semantic_content/semanticEnvelopes/callEnvelopes.d.ts +5 -0
  211. package/dist/tools/lsp/semantic_content/semanticEnvelopes/envelopeHelpers.d.ts +20 -0
  212. package/dist/tools/lsp/semantic_content/semanticEnvelopes/locationEnvelopes.d.ts +13 -0
  213. package/dist/tools/lsp/semantic_content/semanticEnvelopes.d.ts +3 -0
  214. package/dist/tools/lsp/semantic_content/semanticFileOps/anchor.d.ts +24 -0
  215. package/dist/tools/lsp/semantic_content/semanticFileOps/documentSymbols.d.ts +27 -0
  216. package/dist/tools/lsp/semantic_content/semanticFileOps/workspaceSymbolsAndDiagnostics.d.ts +20 -0
  217. package/dist/tools/lsp/semantic_content/semanticFileOps.d.ts +8 -0
  218. package/dist/tools/lsp/semantic_content/semanticPresentation.d.ts +53 -0
  219. package/dist/tools/lsp/shared/readiness.d.ts +17 -0
  220. package/dist/tools/lsp/shared/semanticTypes.d.ts +6 -0
  221. package/dist/tools/package_search/execution.d.ts +8 -0
  222. package/dist/tools/package_search/scheme.d.ts +45 -6
  223. package/dist/tools/providerMappers/codeSearch.d.ts +66 -0
  224. package/dist/tools/providerMappers/fileContent.d.ts +28 -0
  225. package/dist/tools/providerMappers/pullRequests.d.ts +158 -0
  226. package/dist/tools/providerMappers/repoSearch.d.ts +30 -0
  227. package/dist/tools/providerMappers/repoStructure.d.ts +20 -0
  228. package/dist/tools/providerMappers/shared.d.ts +23 -0
  229. package/dist/tools/providerMappers.d.ts +9 -294
  230. package/dist/tools/toolConfig.d.ts +0 -2
  231. package/dist/tools/toolMetadata/descriptionOverrides.d.ts +4 -0
  232. package/dist/tools/toolNames.d.ts +1 -0
  233. package/dist/tools/toolSchemaImports.d.ts +13 -0
  234. package/dist/utils/contextUtils.d.ts +5 -16
  235. package/dist/utils/core/types.d.ts +2 -24
  236. package/dist/utils/exec/spawn/env.d.ts +5 -0
  237. package/dist/utils/exec/spawn/wrappers.d.ts +29 -0
  238. package/dist/utils/exec/spawn.d.ts +2 -34
  239. package/dist/utils/http/cache/conditional.d.ts +21 -0
  240. package/dist/utils/http/cache/dataCache.d.ts +6 -0
  241. package/dist/utils/http/cache/key.d.ts +1 -0
  242. package/dist/utils/http/cache/management.d.ts +9 -0
  243. package/dist/utils/http/cache/store.d.ts +28 -0
  244. package/dist/utils/http/cache.d.ts +4 -16
  245. package/dist/utils/markdownOutline.d.ts +0 -2
  246. package/dist/utils/package/npm/npmDeprecation.d.ts +5 -0
  247. package/dist/utils/package/npm/npmDetailsFetchers.d.ts +15 -0
  248. package/dist/utils/package/npm/npmMappers.d.ts +12 -0
  249. package/dist/utils/package/npm/npmRegistry.d.ts +79 -0
  250. package/dist/utils/package/npm/npmSearchStrategies.d.ts +6 -0
  251. package/dist/utils/package/npm.d.ts +2 -8
  252. package/dist/utils/pagination/boundary.d.ts +5 -5
  253. package/dist/utils/response/bulk/pagination.d.ts +6 -0
  254. package/dist/utils/response/bulk/queries.d.ts +19 -0
  255. package/dist/utils/response/bulk/response.d.ts +4 -0
  256. package/dist/utils/response/bulk.d.ts +2 -5
  257. package/dist/utils/response/groupedFinalizer.d.ts +7 -2
  258. package/package.json +10 -3
  259. package/dist/oql/adapters/v2.d.ts +0 -32
  260. package/dist/oql/v2params.d.ts +0 -22
  261. package/dist/shared/config/defaults.d.ts +0 -14
  262. package/dist/shared/config/loader.d.ts +0 -7
  263. package/dist/shared/config/resolver.d.ts +0 -2
  264. package/dist/shared/config/resolverCache.d.ts +0 -12
  265. package/dist/shared/config/resolverSections.d.ts +0 -10
  266. package/dist/shared/config/runtimeSurface.d.ts +0 -22
  267. package/dist/shared/config/types.d.ts +0 -92
  268. package/dist/shared/config/validator.d.ts +0 -2
  269. package/dist/shared/credentials/envTokens.d.ts +0 -9
  270. package/dist/tools/local_binary_inspect/archiveOps.d.ts +0 -24
  271. package/dist/tools/local_binary_inspect/binaryInspector.d.ts +0 -86
  272. package/dist/tools/local_binary_inspect/binaryOps.d.ts +0 -27
  273. package/dist/tools/local_binary_inspect/decompressOps.d.ts +0 -16
  274. package/dist/tools/local_binary_inspect/execution.d.ts +0 -4
  275. package/dist/tools/local_binary_inspect/scheme.d.ts +0 -47
  276. package/dist/tools/local_ripgrep/lspBoost.d.ts +0 -54
  277. package/dist/utils/parsers/ripgrep.d.ts +0 -11
@@ -0,0 +1,101 @@
1
+ import type { z } from 'zod';
2
+ import type { FileContentQuerySchema } from '@octocodeai/octocode-core/schemas';
3
+ type FileContentQuery = z.infer<typeof FileContentQuerySchema>;
4
+ import type { PaginationInfo } from '../../../types/toolResults.js';
5
+ import type { QueryWithPagination } from '../../../utils/response/groupedFinalizer.js';
6
+ import type { GitHubFetchContentOutputLocal } from '../scheme.js';
7
+ import type { WithOptionalMeta } from '../../../types/execution.js';
8
+ export type PartialFileContentQuery = WithOptionalMeta<FileContentQuery> & QueryWithPagination;
9
+ export type FileEntry = {
10
+ path: string;
11
+ content: string;
12
+ localPath?: string;
13
+ repoRoot?: string;
14
+ fileSize?: number;
15
+ contentView?: 'none' | 'standard' | 'symbols';
16
+ totalLines?: number;
17
+ sourceChars?: number;
18
+ sourceBytes?: number;
19
+ resolvedBranch?: string;
20
+ pagination?: PaginationInfo;
21
+ isPartial?: boolean;
22
+ startLine?: number;
23
+ endLine?: number;
24
+ matchRanges?: Array<{
25
+ start: number;
26
+ end: number;
27
+ }>;
28
+ lastModified?: string;
29
+ lastModifiedBy?: string;
30
+ warnings?: string[];
31
+ matchNotFound?: boolean;
32
+ searchedFor?: string;
33
+ cached?: boolean;
34
+ next?: FileContentNextMap;
35
+ };
36
+ export type FileContentNextMap = {
37
+ continueChars?: {
38
+ tool: 'ghGetFileContent';
39
+ query: Record<string, unknown>;
40
+ };
41
+ cloneForSemantics?: {
42
+ tool: 'ghCloneRepo';
43
+ query: Record<string, unknown>;
44
+ why: string;
45
+ confidence: 'exact';
46
+ };
47
+ };
48
+ export type DirectoryEntry = {
49
+ path: string;
50
+ localPath: string;
51
+ repoRoot?: string;
52
+ fileCount: number;
53
+ totalSize: number;
54
+ complete?: boolean;
55
+ verified?: boolean;
56
+ commitSha?: string;
57
+ hasSubdirectories?: boolean;
58
+ skippedSummary?: Record<string, number>;
59
+ directoryEntryCount?: number;
60
+ eligibleFileCount?: number;
61
+ savedFileCount?: number;
62
+ skipped?: {
63
+ nonFile: number;
64
+ missingDownloadUrl: number;
65
+ oversized: number;
66
+ binary: number;
67
+ fileLimit: number;
68
+ fetchFailed: number;
69
+ totalSizeLimit: number;
70
+ pathTraversal: number;
71
+ };
72
+ limits?: {
73
+ maxDirectoryFiles: number;
74
+ maxTotalSize: number;
75
+ maxFileSize: number;
76
+ };
77
+ warnings?: string[];
78
+ files?: Array<{
79
+ path: string;
80
+ size: number;
81
+ type: string;
82
+ }>;
83
+ cached?: boolean;
84
+ resolvedBranch?: string;
85
+ };
86
+ export type RepoGroup = {
87
+ id: string;
88
+ owner: string;
89
+ repo: string;
90
+ files?: FileEntry[];
91
+ directories?: DirectoryEntry[];
92
+ data?: RepoGroupData;
93
+ };
94
+ export type RepoGroupData = {
95
+ owner: string;
96
+ repo: string;
97
+ files?: FileEntry[];
98
+ directories?: DirectoryEntry[];
99
+ };
100
+ export type FileContentResponse = GitHubFetchContentOutputLocal;
101
+ export {};
@@ -1,10 +1,4 @@
1
- import type { z } from 'zod';
2
- import type { FileContentQuerySchema } from '@octocodeai/octocode-core/schemas';
3
- type FileContentQuery = z.infer<typeof FileContentQuerySchema>;
4
1
  import type { BulkFinalizer } from '../../types/bulk.js';
5
- import { type QueryWithPagination } from '../../utils/response/groupedFinalizer.js';
6
2
  import type { GitHubFetchContentOutputLocal } from './scheme.js';
7
- import type { WithOptionalMeta } from '../../types/execution.js';
8
- type PartialFileContentQuery = WithOptionalMeta<FileContentQuery> & QueryWithPagination;
3
+ import type { PartialFileContentQuery } from './finalizer/types.js';
9
4
  export declare function buildGithubFetchContentFinalizer<TQuery extends PartialFileContentQuery>(): BulkFinalizer<TQuery, GitHubFetchContentOutputLocal>;
10
- export {};
@@ -63,27 +63,61 @@ export declare const GitHubFetchContentOutputLocalSchema: z.ZodObject<{
63
63
  standard: "standard";
64
64
  symbols: "symbols";
65
65
  }>>;
66
- isSkeleton: z.ZodOptional<z.ZodBoolean>;
67
66
  totalLines: z.ZodOptional<z.ZodNumber>;
68
67
  sourceChars: z.ZodOptional<z.ZodNumber>;
69
68
  sourceBytes: z.ZodOptional<z.ZodNumber>;
70
69
  resolvedBranch: z.ZodOptional<z.ZodString>;
71
- pagination: z.ZodOptional<z.ZodObject<{
70
+ modified: z.ZodOptional<z.ZodString>;
71
+ fileSize: z.ZodOptional<z.ZodNumber>;
72
+ pagination: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
73
+ charOffset: z.ZodNumber;
74
+ charLength: z.ZodNumber;
75
+ totalChars: z.ZodNumber;
76
+ hasMore: z.ZodBoolean;
77
+ nextCharOffset: z.ZodOptional<z.ZodNumber>;
78
+ currentPage: z.ZodOptional<z.ZodNumber>;
79
+ totalPages: z.ZodOptional<z.ZodNumber>;
80
+ chunkMode: z.ZodOptional<z.ZodEnum<{
81
+ semantic: "semantic";
82
+ "char-limit": "char-limit";
83
+ }>>;
84
+ nextPage: z.ZodOptional<z.ZodNumber>;
85
+ }, z.core.$strip>, z.ZodObject<{
72
86
  currentPage: z.ZodNumber;
73
87
  totalPages: z.ZodNumber;
74
88
  hasMore: z.ZodBoolean;
75
89
  nextPage: z.ZodOptional<z.ZodNumber>;
76
- nextMatchPage: z.ZodOptional<z.ZodNumber>;
90
+ pageSize: z.ZodOptional<z.ZodNumber>;
91
+ totalItems: z.ZodOptional<z.ZodNumber>;
92
+ perPage: z.ZodOptional<z.ZodNumber>;
93
+ totalFound: z.ZodOptional<z.ZodNumber>;
94
+ returned: z.ZodOptional<z.ZodNumber>;
95
+ totalMatches: z.ZodOptional<z.ZodNumber>;
96
+ reportedTotalMatches: z.ZodOptional<z.ZodNumber>;
97
+ reachableTotalMatches: z.ZodOptional<z.ZodNumber>;
98
+ totalMatchesKind: z.ZodOptional<z.ZodEnum<{
99
+ exact: "exact";
100
+ reported: "reported";
101
+ lowerBound: "lowerBound";
102
+ }>>;
103
+ totalMatchesCapped: z.ZodOptional<z.ZodBoolean>;
104
+ totalResults: z.ZodOptional<z.ZodNumber>;
105
+ itemsPerPage: z.ZodOptional<z.ZodNumber>;
77
106
  charOffset: z.ZodOptional<z.ZodNumber>;
78
107
  charLength: z.ZodOptional<z.ZodNumber>;
79
108
  totalChars: z.ZodOptional<z.ZodNumber>;
80
109
  nextCharOffset: z.ZodOptional<z.ZodNumber>;
81
- filesPerPage: z.ZodOptional<z.ZodNumber>;
82
- totalFiles: z.ZodOptional<z.ZodNumber>;
83
- entriesPerPage: z.ZodOptional<z.ZodNumber>;
84
- totalEntries: z.ZodOptional<z.ZodNumber>;
85
- matchesPerPage: z.ZodOptional<z.ZodNumber>;
86
- totalMatches: z.ZodOptional<z.ZodNumber>;
110
+ }, z.core.$strip>]>>;
111
+ next: z.ZodOptional<z.ZodObject<{
112
+ continueChars: z.ZodOptional<z.ZodObject<{
113
+ query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
114
+ why: z.ZodOptional<z.ZodString>;
115
+ confidence: z.ZodOptional<z.ZodEnum<{
116
+ exact: "exact";
117
+ heuristic: "heuristic";
118
+ }>>;
119
+ tool: z.ZodLiteral<"ghGetFileContent">;
120
+ }, z.core.$strip>>;
87
121
  }, z.core.$strip>>;
88
122
  isPartial: z.ZodOptional<z.ZodBoolean>;
89
123
  startLine: z.ZodOptional<z.ZodNumber>;
@@ -2,7 +2,7 @@ import type { z } from 'zod';
2
2
  import type { FileContentQuerySchema } from '@octocodeai/octocode-core/schemas';
3
3
  import type { MinifyMode } from '../../scheme/fields.js';
4
4
  type FileContentQuery = z.infer<typeof FileContentQuerySchema>;
5
- import type { PaginationInfo } from '../../utils/core/types.js';
5
+ import type { PaginationInfo } from '../../types/toolResults.js';
6
6
  export type FileContentExecutionQuery = FileContentQuery & {
7
7
  noTimestamp?: boolean;
8
8
  minify: MinifyMode;
@@ -18,7 +18,6 @@ export interface GitHubFileContentApiData {
18
18
  path?: string;
19
19
  content?: string;
20
20
  contentView?: 'none' | 'standard' | 'symbols';
21
- isSkeleton?: boolean;
22
21
  branch?: string;
23
22
  resolvedBranch?: string;
24
23
  startLine?: number;
@@ -4,5 +4,14 @@ import type { GitHubCodeSearchQuerySchema } from '@octocodeai/octocode-core/sche
4
4
  type GitHubCodeSearchQuery = z.infer<typeof GitHubCodeSearchQuerySchema>;
5
5
  import type { ToolExecutionArgs, WithOptionalMeta } from '../../types/execution.js';
6
6
  type PartialCodeSearchQuery = WithOptionalMeta<GitHubCodeSearchQuery>;
7
+ export declare function hasValidCodeSearchParams(query: PartialCodeSearchQuery): boolean;
8
+ export type RepoState = {
9
+ kind: 'notFound';
10
+ } | {
11
+ kind: 'archived';
12
+ } | {
13
+ kind: 'renamed';
14
+ fullName: string;
15
+ };
7
16
  export declare function searchMultipleGitHubCode(args: ToolExecutionArgs<PartialCodeSearchQuery>): Promise<CallToolResult>;
8
17
  export {};
@@ -0,0 +1,4 @@
1
+ import type { BulkFinalizer } from '../../../types/bulk.js';
2
+ import { type QueryWithPagination } from '../../../utils/response/groupedFinalizer.js';
3
+ import type { GitHubCodeSearchOutputLocal } from '../scheme.js';
4
+ export declare function buildGhSearchCodeFinalizer<TQuery extends QueryWithPagination>(): BulkFinalizer<TQuery, GitHubCodeSearchOutputLocal>;
@@ -0,0 +1,23 @@
1
+ import { type QueryWithPagination } from '../../../utils/response/groupedFinalizer.js';
2
+ import type { ToolContinuation } from '../../../scheme/pagination.js';
3
+ import { type CodeSearchGroupedMatch, type CodeSearchGroupedResult, type CodeSearchPagination } from '../../providerMappers.js';
4
+ export type PerQueryGroups = {
5
+ id: string;
6
+ groups: CodeSearchGroupedResult[];
7
+ };
8
+ export type CodeSearchFileResult = {
9
+ owner: string;
10
+ repo: string;
11
+ path: string;
12
+ matches: Array<Omit<CodeSearchGroupedMatch, 'path'>>;
13
+ };
14
+ export type CodeSearchResultRecord = {
15
+ id: string;
16
+ data: {
17
+ files: CodeSearchFileResult[];
18
+ pagination?: CodeSearchPagination;
19
+ };
20
+ };
21
+ export declare function mergeGroups(perQuery: readonly PerQueryGroups[]): CodeSearchGroupedResult[];
22
+ export declare function buildResultRecords(queries: readonly QueryWithPagination[], groups: readonly CodeSearchGroupedResult[], paginationByQuery: ReadonlyMap<string, CodeSearchPagination>): CodeSearchResultRecord[];
23
+ export declare function buildNextMap(resultRecords: readonly CodeSearchResultRecord[], queries: readonly QueryWithPagination[], allKeywords: readonly string[]): Record<string, ToolContinuation> | undefined;
@@ -0,0 +1,12 @@
1
+ import type { FlatQueryResult } from '../../../types/toolResults.js';
2
+ import { type QueryWithPagination } from '../../../utils/response/groupedFinalizer.js';
3
+ import type { RepoState } from '../execution.js';
4
+ import { type CodeSearchFlatResult, type CodeSearchGroupedResult } from '../../providerMappers.js';
5
+ export declare function queryById(queries: readonly QueryWithPagination[]): ReadonlyMap<string, QueryWithPagination>;
6
+ export declare function hasScopedGitHubQuery(emptyQueries: readonly {
7
+ id: string;
8
+ }[], queries: readonly QueryWithPagination[]): boolean;
9
+ export declare function readPerQueryFlat(result: FlatQueryResult): CodeSearchFlatResult & {
10
+ repoState?: RepoState;
11
+ };
12
+ export declare function applyExactMatchRanking(groups: readonly CodeSearchGroupedResult[], keywords: readonly string[]): CodeSearchGroupedResult[];
@@ -1,6 +1,2 @@
1
- import type { BulkFinalizer } from '../../types/bulk.js';
2
- import { type QueryWithPagination } from '../../utils/response/groupedFinalizer.js';
3
- import type { GitHubCodeSearchOutputLocal } from './scheme.js';
4
- import { type CodeSearchGroupedResult } from '../providerMappers.js';
5
- export declare function applyExactMatchRanking(groups: readonly CodeSearchGroupedResult[], keywords: readonly string[]): CodeSearchGroupedResult[];
6
- export declare function buildGhSearchCodeFinalizer<TQuery extends QueryWithPagination>(): BulkFinalizer<TQuery, GitHubCodeSearchOutputLocal>;
1
+ export { applyExactMatchRanking } from './finalizer/ranking.js';
2
+ export { buildGhSearchCodeFinalizer } from './finalizer/build.js';
@@ -39,7 +39,7 @@ export declare const GitHubCodeSearchOutputLocalSchema: z.ZodObject<{
39
39
  results: z.ZodArray<z.ZodObject<{
40
40
  id: z.ZodString;
41
41
  data: z.ZodObject<{
42
- files: z.ZodArray<z.ZodObject<{
42
+ files: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
43
43
  owner: z.ZodString;
44
44
  repo: z.ZodString;
45
45
  path: z.ZodString;
@@ -54,22 +54,28 @@ export declare const GitHubCodeSearchOutputLocalSchema: z.ZodObject<{
54
54
  }, z.core.$strip>>>;
55
55
  url: z.ZodOptional<z.ZodString>;
56
56
  }, z.core.$strip>>;
57
- }, z.core.$strip>>;
57
+ }, z.core.$strip>]>>;
58
58
  pagination: z.ZodOptional<z.ZodObject<{
59
59
  currentPage: z.ZodNumber;
60
60
  totalPages: z.ZodNumber;
61
- perPage: z.ZodNumber;
62
- totalMatches: z.ZodNumber;
61
+ hasMore: z.ZodBoolean;
62
+ nextPage: z.ZodOptional<z.ZodNumber>;
63
+ pageSize: z.ZodOptional<z.ZodNumber>;
64
+ totalItems: z.ZodOptional<z.ZodNumber>;
65
+ perPage: z.ZodOptional<z.ZodNumber>;
66
+ totalFound: z.ZodOptional<z.ZodNumber>;
67
+ returned: z.ZodOptional<z.ZodNumber>;
68
+ totalMatches: z.ZodOptional<z.ZodNumber>;
63
69
  reportedTotalMatches: z.ZodOptional<z.ZodNumber>;
64
70
  reachableTotalMatches: z.ZodOptional<z.ZodNumber>;
71
+ totalResults: z.ZodOptional<z.ZodNumber>;
72
+ itemsPerPage: z.ZodOptional<z.ZodNumber>;
65
73
  totalMatchesKind: z.ZodOptional<z.ZodEnum<{
66
74
  exact: "exact";
67
75
  reported: "reported";
68
76
  lowerBound: "lowerBound";
69
77
  }>>;
70
78
  totalMatchesCapped: z.ZodOptional<z.ZodBoolean>;
71
- hasMore: z.ZodBoolean;
72
- nextPage: z.ZodOptional<z.ZodNumber>;
73
79
  uniqueFileCount: z.ZodOptional<z.ZodNumber>;
74
80
  }, z.core.$strip>>;
75
81
  }, z.core.$strip>;
@@ -80,6 +86,25 @@ export declare const GitHubCodeSearchOutputLocalSchema: z.ZodObject<{
80
86
  incompleteResults: z.ZodOptional<z.ZodLiteral<true>>;
81
87
  }, z.core.$strip>>>;
82
88
  warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
89
+ diagnostics: z.ZodOptional<z.ZodArray<z.ZodObject<{
90
+ level: z.ZodEnum<{
91
+ error: "error";
92
+ info: "info";
93
+ warning: "warning";
94
+ }>;
95
+ message: z.ZodString;
96
+ field: z.ZodOptional<z.ZodString>;
97
+ code: z.ZodOptional<z.ZodString>;
98
+ }, z.core.$strip>>>;
99
+ next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
100
+ tool: z.ZodString;
101
+ query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
102
+ why: z.ZodOptional<z.ZodString>;
103
+ confidence: z.ZodOptional<z.ZodEnum<{
104
+ exact: "exact";
105
+ heuristic: "heuristic";
106
+ }>>;
107
+ }, z.core.$strip>>>;
83
108
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
84
109
  id: z.ZodString;
85
110
  error: z.ZodString;
@@ -0,0 +1,68 @@
1
+ import type { NormalizedPrContentRequest } from '../contentRequest.js';
2
+ import { type QueryLike } from './pagination.js';
3
+ export declare function shapeComments(pr: Record<string, unknown>, query: QueryLike, request: NormalizedPrContentRequest): {
4
+ comments?: undefined;
5
+ commentPagination?: undefined;
6
+ } | {
7
+ comments: ({
8
+ createdAt: unknown;
9
+ updatedAt: unknown;
10
+ body: string;
11
+ bodyPagination: {
12
+ nextCharOffset?: number;
13
+ charOffset: number;
14
+ charLength: number;
15
+ totalChars: number;
16
+ hasMore: boolean;
17
+ };
18
+ in_reply_to_id?: unknown;
19
+ id: unknown;
20
+ author: unknown;
21
+ commentType: unknown;
22
+ path: unknown;
23
+ line: unknown;
24
+ } | {
25
+ createdAt: unknown;
26
+ updatedAt: unknown;
27
+ bodyPreview: string;
28
+ in_reply_to_id?: unknown;
29
+ id: unknown;
30
+ author: unknown;
31
+ commentType: unknown;
32
+ path: unknown;
33
+ line: unknown;
34
+ })[];
35
+ commentPagination: import("./pagination.js").Pagination;
36
+ };
37
+ export declare function shapeReviews(pr: Record<string, unknown>, query: QueryLike, request: NormalizedPrContentRequest): {
38
+ reviews?: undefined;
39
+ } | {
40
+ reviews: {
41
+ submittedAt: unknown;
42
+ commitId: unknown;
43
+ body?: string;
44
+ bodyPagination?: {
45
+ nextCharOffset?: number;
46
+ charOffset: number;
47
+ charLength: number;
48
+ totalChars: number;
49
+ hasMore: boolean;
50
+ };
51
+ id: unknown;
52
+ user: unknown;
53
+ state: unknown;
54
+ }[];
55
+ };
56
+ export declare function shapeCommits(pr: Record<string, unknown>, query: QueryLike, request: NormalizedPrContentRequest): {
57
+ commits?: undefined;
58
+ commitPagination?: undefined;
59
+ } | {
60
+ commits: {
61
+ files?: any[];
62
+ sha: unknown;
63
+ message: unknown;
64
+ author: unknown;
65
+ date: unknown;
66
+ }[];
67
+ commitPagination: import("./pagination.js").Pagination;
68
+ };
@@ -0,0 +1,52 @@
1
+ import type { NormalizedPrContentRequest } from '../contentRequest.js';
2
+ import { type QueryLike } from './pagination.js';
3
+ export declare function filePathOf(change: Record<string, unknown>): string;
4
+ export declare function shapeFileChange(change: Record<string, unknown>, includePatch: boolean): {
5
+ patch?: string;
6
+ path: string;
7
+ status: string;
8
+ additions: number;
9
+ deletions: number;
10
+ };
11
+ export declare function stripPatchComments(patch: string): string;
12
+ export declare function shapeFileSurfaces(pr: Record<string, unknown>, query: QueryLike, request: NormalizedPrContentRequest, shouldMinify?: boolean): {
13
+ changedFiles: ({
14
+ patch?: string;
15
+ path: string;
16
+ status: string;
17
+ additions: number;
18
+ deletions: number;
19
+ } | {
20
+ patchPagination?: {
21
+ nextCharOffset?: number;
22
+ charOffset: number;
23
+ charLength: number;
24
+ totalChars: number;
25
+ hasMore: boolean;
26
+ };
27
+ patch: string;
28
+ diff: import("../../../index.js").DiffPreview;
29
+ path: string;
30
+ status: string;
31
+ additions: number;
32
+ deletions: number;
33
+ })[];
34
+ filePagination: import("./pagination.js").Pagination;
35
+ filePathsPreview?: undefined;
36
+ filePathsPagination?: undefined;
37
+ } | {
38
+ changedFiles?: undefined;
39
+ filePagination?: undefined;
40
+ filePathsPreview?: undefined;
41
+ filePathsPagination?: undefined;
42
+ } | {
43
+ filePathsPreview: string[];
44
+ filePathsPagination: {
45
+ nextFilePage?: number;
46
+ totalFiles: number;
47
+ filesPerPage: number;
48
+ hasMore: boolean;
49
+ };
50
+ changedFiles?: undefined;
51
+ filePagination?: undefined;
52
+ };
@@ -0,0 +1,17 @@
1
+ import type { NormalizedPrContentRequest } from '../contentRequest.js';
2
+ import { type QueryLike } from './pagination.js';
3
+ export declare function nextCalls(query: QueryLike, prNumber: number, request: NormalizedPrContentRequest, firstChangedFilePath?: string): {
4
+ fullReview?: Record<string, unknown>;
5
+ getCommits?: Record<string, unknown>;
6
+ getReviews?: Record<string, unknown>;
7
+ getComments?: Record<string, unknown>;
8
+ getSelectedPatches?: Record<string, unknown>;
9
+ getAllPatches?: Record<string, unknown>;
10
+ getChangedFiles?: Record<string, unknown>;
11
+ getBody?: Record<string, unknown>;
12
+ target: {
13
+ owner: string;
14
+ repo: string;
15
+ prNumber: number;
16
+ };
17
+ };
@@ -0,0 +1,63 @@
1
+ export type QueryLike = {
2
+ owner?: string;
3
+ repo?: string;
4
+ prNumber?: number;
5
+ page?: number;
6
+ filePage?: number;
7
+ commentPage?: number;
8
+ commitPage?: number;
9
+ itemsPerPage?: number;
10
+ charOffset?: number;
11
+ commentBodyOffset?: number;
12
+ charLength?: number;
13
+ matchString?: string;
14
+ };
15
+ export declare function matchStringNeedle(query: QueryLike): string | undefined;
16
+ export declare function containsNeedle(value: unknown, needle: string): boolean;
17
+ export type Pagination = {
18
+ currentPage: number;
19
+ totalPages: number;
20
+ itemsPerPage: number;
21
+ totalItems: number;
22
+ hasMore: boolean;
23
+ nextPage?: number;
24
+ };
25
+ export type TextPagination = {
26
+ charOffset: number;
27
+ charLength: number;
28
+ totalChars: number;
29
+ hasMore: boolean;
30
+ nextCharOffset?: number;
31
+ };
32
+ export type ContentPaginationEntry = Record<string, unknown> & {
33
+ hasMore: boolean;
34
+ nextQuery?: Record<string, unknown>;
35
+ };
36
+ export type ContentPagination = Partial<Record<'body' | 'changedFiles' | 'comments' | 'commentBody' | 'commits' | 'patches' | 'filePaths', ContentPaginationEntry>>;
37
+ export declare function paginateItems<T>(items: T[], page?: number, itemsPerPage?: number): {
38
+ items: T[];
39
+ pagination: Pagination;
40
+ };
41
+ export declare function paginateText(value: string | undefined, charOffset?: number, charLength?: number): {
42
+ content: string;
43
+ pagination: {
44
+ nextCharOffset?: number;
45
+ charOffset: number;
46
+ charLength: number;
47
+ totalChars: number;
48
+ hasMore: boolean;
49
+ };
50
+ };
51
+ export declare function compactBody(value: unknown, max?: number): string | undefined;
52
+ export declare function baseQuery(query: QueryLike, prNumber: number): {
53
+ owner: string;
54
+ repo: string;
55
+ prNumber: number;
56
+ };
57
+ export declare function compactQuery(value: Record<string, unknown>): Record<string, unknown>;
58
+ export declare function continuationQuery(query: QueryLike, prNumber: number, patch: Record<string, unknown>): Record<string, unknown>;
59
+ export declare function textContinuationQuery(query: QueryLike, prNumber: number, content: Record<string, unknown>, pagination: TextPagination, extra?: Record<string, unknown>): Record<string, unknown> | undefined;
60
+ export declare function pageContinuationQuery(query: QueryLike, prNumber: number, content: Record<string, unknown>, pageKey: 'filePage' | 'commentPage' | 'commitPage', pagination: Pagination): Record<string, unknown> | undefined;
61
+ export declare function isRecord(value: unknown): value is Record<string, unknown>;
62
+ export declare function readPagination(value: unknown): Pagination | undefined;
63
+ export declare function readTextPagination(value: unknown): TextPagination | undefined;
@@ -1,17 +1,3 @@
1
1
  import type { NormalizedPrContentRequest } from './contentRequest.js';
2
- type QueryLike = {
3
- owner?: string;
4
- repo?: string;
5
- prNumber?: number;
6
- page?: number;
7
- filePage?: number;
8
- commentPage?: number;
9
- commitPage?: number;
10
- itemsPerPage?: number;
11
- charOffset?: number;
12
- commentBodyOffset?: number;
13
- charLength?: number;
14
- matchString?: string;
15
- };
2
+ import { type QueryLike } from './contentResponse/pagination.js';
16
3
  export declare function shapePullRequestForContent(pr: Record<string, unknown>, query: QueryLike, request: NormalizedPrContentRequest, shouldMinify?: boolean, showContentMap?: boolean): Record<string, unknown>;
17
- export {};
@@ -0,0 +1,4 @@
1
+ import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
2
+ import type { ProcessedBulkResult } from '../../../types/toolResults.js';
3
+ import type { GitHubPullRequestSearchInput, GitHubPullRequestSearchQuery } from './types.js';
4
+ export declare function handleCommitsMode(query: GitHubPullRequestSearchInput, parsedData: GitHubPullRequestSearchQuery | undefined, authInfo: AuthInfo | undefined): Promise<ProcessedBulkResult>;
@@ -0,0 +1,4 @@
1
+ import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
2
+ import type { ProcessedBulkResult } from '../../../types/toolResults.js';
3
+ import type { GitHubPullRequestSearchInput, GitHubPullRequestSearchQuery } from './types.js';
4
+ export declare function handleIssuesMode(query: GitHubPullRequestSearchInput, parsedData: GitHubPullRequestSearchQuery | undefined, authInfo: AuthInfo | undefined): Promise<ProcessedBulkResult>;
@@ -0,0 +1,4 @@
1
+ import { createLazyProviderContext } from '../../providerExecution.js';
2
+ import type { ProcessedBulkResult } from '../../../types/toolResults.js';
3
+ import type { GitHubPullRequestSearchInput, GitHubPullRequestSearchQuery } from './types.js';
4
+ export declare function handlePullRequestsMode(query: GitHubPullRequestSearchInput, parsedData: GitHubPullRequestSearchQuery | undefined, getProviderContext: ReturnType<typeof createLazyProviderContext>): Promise<ProcessedBulkResult>;
@@ -0,0 +1,4 @@
1
+ import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
2
+ import type { ProcessedBulkResult } from '../../../types/toolResults.js';
3
+ import type { GitHubPullRequestSearchInput, GitHubPullRequestSearchQuery } from './types.js';
4
+ export declare function handleReleasesMode(query: GitHubPullRequestSearchInput, parsedData: GitHubPullRequestSearchQuery | undefined, authInfo: AuthInfo | undefined): Promise<ProcessedBulkResult>;
@@ -0,0 +1,6 @@
1
+ import type { z } from 'zod';
2
+ import { GitHubPullRequestSearchQueryLocalSchema } from '../scheme.js';
3
+ import type { WithOptionalMeta } from '../../../types/execution.js';
4
+ export type GitHubPullRequestSearchQuery = z.infer<typeof GitHubPullRequestSearchQueryLocalSchema>;
5
+ export type GitHubPullRequestSearchInput = z.input<typeof GitHubPullRequestSearchQueryLocalSchema>;
6
+ export type PartialPRQuery = WithOptionalMeta<GitHubPullRequestSearchQuery>;
@@ -1,7 +1,4 @@
1
1
  import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
- import type { z } from 'zod';
3
- import { GitHubPullRequestSearchQueryLocalSchema } from './scheme.js';
4
2
  import type { ToolExecutionArgs } from '../../types/execution.js';
5
- type GitHubPullRequestSearchInput = z.input<typeof GitHubPullRequestSearchQueryLocalSchema>;
3
+ import type { GitHubPullRequestSearchInput } from './execution/types.js';
6
4
  export declare function searchMultipleGitHubPullRequests(args: ToolExecutionArgs<GitHubPullRequestSearchInput>): Promise<CallToolResult>;
7
- export {};
@@ -206,7 +206,6 @@ export declare const GitHubSearchPullRequestsOutputLocalSchema: z.ZodObject<{
206
206
  kind: z.ZodString;
207
207
  }, z.core.$loose>]>>>;
208
208
  error: z.ZodOptional<z.ZodString>;
209
- hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
210
209
  base: z.ZodOptional<z.ZodString>;
211
210
  shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
212
211
  responsePagination: z.ZodOptional<z.ZodObject<{
@@ -222,7 +221,17 @@ export declare const GitHubSearchPullRequestsOutputLocalSchema: z.ZodObject<{
222
221
  id: z.ZodOptional<z.ZodString>;
223
222
  status: z.ZodOptional<z.ZodString>;
224
223
  data: z.ZodOptional<z.ZodObject<{
225
- pull_requests: z.ZodOptional<z.ZodArray<z.ZodObject<{}, z.core.$loose>>>;
224
+ pull_requests: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{}, z.core.$loose>]>>>;
225
+ issues: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{}, z.core.$loose>]>>>;
226
+ next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
227
+ tool: z.ZodString;
228
+ query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
229
+ why: z.ZodOptional<z.ZodString>;
230
+ confidence: z.ZodOptional<z.ZodEnum<{
231
+ exact: "exact";
232
+ heuristic: "heuristic";
233
+ }>>;
234
+ }, z.core.$strip>>>;
226
235
  }, z.core.$loose>>;
227
236
  }, z.core.$loose>>>;
228
237
  }, z.core.$loose>;