@octocodeai/octocode-tools-core 18.1.2 → 18.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/README.md +113 -162
  2. package/dist/cacheMaintenance.d.ts +8 -0
  3. package/dist/direct.js +41 -51
  4. package/dist/github/client.d.ts +1 -1
  5. package/dist/github/codeSearch.d.ts +2 -2
  6. package/dist/github/commit.d.ts +48 -0
  7. package/dist/github/compare.d.ts +2 -2
  8. package/dist/github/directoryFetch/fetchDirectoryContents.d.ts +1 -1
  9. package/dist/github/directoryFetch/fetchFileContentToDisk.d.ts +1 -1
  10. package/dist/github/directoryFetch/refResolution.d.ts +6 -0
  11. package/dist/github/fileContent.d.ts +1 -1
  12. package/dist/github/fileContentRaw/fetch.d.ts +2 -2
  13. package/dist/github/githubAPI.d.ts +1 -2
  14. package/dist/github/history/commitFiles.d.ts +5 -0
  15. package/dist/github/history.d.ts +1 -1
  16. package/dist/github/issues/fetchers.d.ts +1 -1
  17. package/dist/github/issues/orchestrator.d.ts +1 -1
  18. package/dist/github/issues/types.d.ts +5 -0
  19. package/dist/github/prByNumber.d.ts +1 -1
  20. package/dist/github/prContentFetcher/commits.d.ts +1 -1
  21. package/dist/github/prContentFetcher/transform.d.ts +1 -1
  22. package/dist/github/pullRequestSearch.d.ts +1 -1
  23. package/dist/github/queryBuilders/codeAndRepo.d.ts +1 -1
  24. package/dist/github/repoSearch.d.ts +2 -2
  25. package/dist/github/repoStructure/contentResolution.d.ts +1 -1
  26. package/dist/github/repoStructure/fetchOrchestration.d.ts +2 -2
  27. package/dist/github/repoStructurePagination.d.ts +1 -1
  28. package/dist/graph/advancedOperations.d.ts +22 -0
  29. package/dist/{tools/local_dead_code/graphBuilder.d.ts → graph/buildFileGraph.d.ts} +6 -5
  30. package/dist/graph/cycleOperations.d.ts +12 -0
  31. package/dist/{tools/local_dead_code → graph}/importResolver.d.ts +1 -1
  32. package/dist/graph/operations.d.ts +7 -0
  33. package/dist/{tools/local_dead_code → graph}/reachability.d.ts +1 -1
  34. package/dist/{tools/local_dead_code → graph}/types.d.ts +11 -0
  35. package/dist/graph/workspacePackageResolver.d.ts +2 -0
  36. package/dist/index.d.ts +11 -30
  37. package/dist/index.js +45 -55
  38. package/dist/providers/github/githubContent.d.ts +1 -1
  39. package/dist/providers/github/githubPullRequests.d.ts +1 -1
  40. package/dist/providers/github/githubSearch.d.ts +1 -1
  41. package/dist/providers/github/githubStructure.d.ts +1 -1
  42. package/dist/providers/github/paginationMetadata.d.ts +4 -5
  43. package/dist/providers/providerQueries.d.ts +1 -3
  44. package/dist/providers/providerResults.d.ts +4 -0
  45. package/dist/providers/types.d.ts +1 -1
  46. package/dist/responses.d.ts +1 -1
  47. package/dist/schema.d.ts +2 -0
  48. package/dist/schema.js +13 -1
  49. package/dist/scheme/conditionalSchemas.d.ts +12 -0
  50. package/dist/scheme/fields.d.ts +2 -1
  51. package/dist/security/bridge.d.ts +7 -10
  52. package/dist/shared/credentials/index.js +2 -2
  53. package/dist/shared/paths.d.ts +1 -0
  54. package/dist/shared/paths.js +1 -1
  55. package/dist/shared/session/index.js +1 -1
  56. package/dist/toolContract/descriptions.d.ts +14 -0
  57. package/dist/toolContract/input/resources/global.d.ts +15 -0
  58. package/dist/toolContract/input/resources/toolRelations.d.ts +1 -0
  59. package/dist/toolContract/input/resources/toolVariants.d.ts +9 -0
  60. package/dist/toolContract/input/resources/tools/_toolkit.d.ts +75 -0
  61. package/dist/toolContract/input/resources/tools/ghCloneRepo.d.ts +12 -0
  62. package/dist/toolContract/input/resources/tools/ghGetFileContent.d.ts +30 -0
  63. package/dist/toolContract/input/resources/tools/ghSearch.d.ts +76 -0
  64. package/dist/toolContract/input/resources/tools/githubCodeOperation.d.ts +29 -0
  65. package/dist/toolContract/input/resources/tools/githubHistorySchema.d.ts +114 -0
  66. package/dist/toolContract/input/resources/tools/githubRepositoriesOperation.d.ts +54 -0
  67. package/dist/toolContract/input/resources/tools/githubTreeOperation.d.ts +26 -0
  68. package/dist/toolContract/input/resources/tools/historyCommitInput.d.ts +21 -0
  69. package/dist/toolContract/input/resources/tools/historyIssueInput.d.ts +59 -0
  70. package/dist/toolContract/input/resources/tools/historyPullRequestInput.d.ts +98 -0
  71. package/dist/toolContract/input/resources/tools/localAnalyzeGraph.d.ts +75 -0
  72. package/dist/toolContract/input/resources/tools/localFilesOperation.d.ts +70 -0
  73. package/dist/toolContract/input/resources/tools/localGetFileContent.d.ts +22 -0
  74. package/dist/toolContract/input/resources/tools/localSearch.d.ts +258 -0
  75. package/dist/toolContract/input/resources/tools/localTextOperation.d.ts +113 -0
  76. package/dist/toolContract/input/resources/tools/localTreeOperation.d.ts +44 -0
  77. package/dist/toolContract/input/resources/tools/lspGetSemantics.d.ts +37 -0
  78. package/dist/toolContract/input/resources/tools/npmSearch.d.ts +10 -0
  79. package/dist/toolContract/input/types/index.d.ts +24 -0
  80. package/dist/toolContract/metadata.d.ts +11 -0
  81. package/dist/toolContract/runtime.d.ts +11 -0
  82. package/dist/toolContract/schemas.d.ts +31 -0
  83. package/dist/toolContract/types.d.ts +11 -0
  84. package/dist/tools/directToolCatalog/toolCatalogDefinitions.d.ts +6 -16
  85. package/dist/tools/directToolCatalog/toolCatalogFormatters.d.ts +1 -1
  86. package/dist/tools/directToolCatalog/toolCommandPatternUnifiedSearchQueries.d.ts +6 -0
  87. package/dist/tools/directToolCatalog/toolInputPreparation.d.ts +2 -2
  88. package/dist/tools/directToolCatalog/toolSchemaIntrospection.d.ts +10 -0
  89. package/dist/tools/directToolCatalog/toolSchemaRelations.d.ts +9 -0
  90. package/dist/tools/directToolCatalog/toolSpecifications.d.ts +13 -0
  91. package/dist/tools/directToolCatalog.exec.d.ts +1 -1
  92. package/dist/tools/directToolCatalog.meta.d.ts +1 -0
  93. package/dist/tools/executionGuard.d.ts +1 -2
  94. package/dist/tools/github_clone_repo/cache.d.ts +1 -2
  95. package/dist/tools/github_clone_repo/cacheArtifacts.d.ts +3 -0
  96. package/dist/tools/github_clone_repo/cachePaths.d.ts +1 -1
  97. package/dist/tools/github_clone_repo/cloneRepo.d.ts +1 -1
  98. package/dist/tools/github_clone_repo/execution.d.ts +1 -1
  99. package/dist/tools/github_clone_repo/scheme.d.ts +24 -24
  100. package/dist/tools/github_fetch_content/execution.d.ts +1 -1
  101. package/dist/tools/github_fetch_content/finalizer/types.d.ts +19 -16
  102. package/dist/tools/github_fetch_content/scheme.d.ts +19 -16
  103. package/dist/tools/github_fetch_content/types.d.ts +4 -3
  104. package/dist/tools/github_search/execution.d.ts +4 -0
  105. package/dist/tools/github_search/finalizer.d.ts +3 -0
  106. package/dist/tools/github_search/scheme.d.ts +79 -0
  107. package/dist/tools/github_search_code/execution.d.ts +4 -2
  108. package/dist/tools/github_search_code/finalizer/groups.d.ts +3 -3
  109. package/dist/tools/github_search_code/finalizer/ranking.d.ts +1 -2
  110. package/dist/tools/github_search_code/scheme.d.ts +10 -16
  111. package/dist/tools/github_search_pull_requests/contentRequest.d.ts +1 -4
  112. package/dist/tools/github_search_pull_requests/contentResponse/commentsShaping.d.ts +8 -4
  113. package/dist/tools/github_search_pull_requests/contentResponse/fileSurfaces.d.ts +13 -10
  114. package/dist/tools/github_search_pull_requests/contentResponse/nextCalls.d.ts +3 -2
  115. package/dist/tools/github_search_pull_requests/contentResponse/pagination.d.ts +10 -3
  116. package/dist/tools/github_search_pull_requests/execution/commitsMode.d.ts +2 -2
  117. package/dist/tools/github_search_pull_requests/execution/issuesMode.d.ts +2 -2
  118. package/dist/tools/github_search_pull_requests/execution/pullRequestsMode.d.ts +1 -1
  119. package/dist/tools/github_search_pull_requests/execution.d.ts +1 -1
  120. package/dist/tools/github_search_pull_requests/historyContinuations.d.ts +15 -0
  121. package/dist/tools/github_search_pull_requests/historyExecutions.d.ts +6 -0
  122. package/dist/tools/github_search_pull_requests/historyPartialContinuations.d.ts +5 -0
  123. package/dist/tools/github_search_pull_requests/historySchemes.d.ts +58 -0
  124. package/dist/tools/github_search_pull_requests/historySearchPagination.d.ts +3 -0
  125. package/dist/tools/github_search_pull_requests/scheme.d.ts +14 -30
  126. package/dist/tools/github_search_pull_requests/splitExecutions.d.ts +1 -2
  127. package/dist/tools/github_search_pull_requests/splitSchemes.d.ts +197 -181
  128. package/dist/tools/github_search_repos/execution/pagination.d.ts +4 -4
  129. package/dist/tools/github_search_repos/execution/queryVariants.d.ts +3 -1
  130. package/dist/tools/github_search_repos/execution.d.ts +3 -1
  131. package/dist/tools/github_search_repos/scheme.d.ts +5 -7
  132. package/dist/tools/github_view_repo_structure/execution.d.ts +4 -2
  133. package/dist/tools/github_view_repo_structure/scheme.d.ts +2 -4
  134. package/dist/tools/github_view_repo_structure/types.d.ts +3 -0
  135. package/dist/tools/local_analyze_graph/analysisTypes.d.ts +46 -0
  136. package/dist/tools/local_analyze_graph/analyzeGraph.d.ts +3 -0
  137. package/dist/tools/{local_dead_code → local_analyze_graph}/deadCodeScan.d.ts +2 -1
  138. package/dist/tools/{local_dead_code → local_analyze_graph}/entrypoints.d.ts +1 -0
  139. package/dist/tools/local_analyze_graph/execution.d.ts +4 -0
  140. package/dist/tools/local_analyze_graph/pagination.d.ts +3 -0
  141. package/dist/tools/{local_dead_code → local_analyze_graph}/retention.d.ts +1 -1
  142. package/dist/tools/{local_dead_code → local_analyze_graph}/scheme.d.ts +31 -15
  143. package/dist/tools/local_fetch_content/execution.d.ts +1 -1
  144. package/dist/tools/local_fetch_content/scheme.d.ts +2 -4
  145. package/dist/tools/local_find_files/execution.d.ts +1 -1
  146. package/dist/tools/local_find_files/findFiles.d.ts +1 -1
  147. package/dist/tools/local_find_files/findFilesNext.d.ts +3 -3
  148. package/dist/tools/local_find_files/scheme.d.ts +6 -2
  149. package/dist/tools/local_ripgrep/captureBudget.d.ts +1 -0
  150. package/dist/tools/local_ripgrep/execution.d.ts +1 -1
  151. package/dist/tools/local_ripgrep/rankingProfile/rankingLexical.d.ts +20 -0
  152. package/dist/tools/local_ripgrep/rankingProfile/rankingResults.d.ts +1 -18
  153. package/dist/tools/local_ripgrep/rankingProfile.d.ts +5 -4
  154. package/dist/tools/local_ripgrep/ripgrepResultBuilder/searchNext.d.ts +4 -1
  155. package/dist/tools/local_ripgrep/scheme.d.ts +9 -7
  156. package/dist/tools/local_ripgrep/structuralSearch.d.ts +1 -1
  157. package/dist/tools/local_search/execution.d.ts +5 -0
  158. package/dist/tools/local_search/scheme.d.ts +260 -0
  159. package/dist/tools/local_view_structure/execution.d.ts +1 -1
  160. package/dist/tools/local_view_structure/scheme.d.ts +8 -5
  161. package/dist/tools/local_view_structure/viewStructureNext.d.ts +3 -3
  162. package/dist/tools/lsp/semantic_content/execution.d.ts +1 -1
  163. package/dist/tools/lsp/semantic_content/scheme.d.ts +4 -42
  164. package/dist/tools/lsp/semantic_content/semanticEnvelopes/envelopeHelpers.d.ts +1 -1
  165. package/dist/tools/lsp/semantic_content/semanticFileOps/anchor.d.ts +1 -1
  166. package/dist/tools/lsp/semantic_content/semanticPresentation.d.ts +0 -1
  167. package/dist/tools/lsp/shared/semanticTypes.d.ts +6 -3
  168. package/dist/tools/package_search/execution.d.ts +6 -13
  169. package/dist/tools/package_search/pagination.d.ts +21 -0
  170. package/dist/tools/package_search/queryHelpers.d.ts +3 -5
  171. package/dist/tools/package_search/scheme.d.ts +12 -7
  172. package/dist/tools/providerExecution.d.ts +3 -4
  173. package/dist/tools/providerMappers/codeSearch.d.ts +3 -4
  174. package/dist/tools/providerMappers/fileContent.d.ts +1 -2
  175. package/dist/tools/providerMappers/pullRequests.d.ts +6 -6
  176. package/dist/tools/providerMappers/repoSearch.d.ts +7 -4
  177. package/dist/tools/providerMappers/repoStructure.d.ts +2 -3
  178. package/dist/tools/toolCatalogFactory.d.ts +5 -6
  179. package/dist/tools/toolConfig.d.ts +6 -17
  180. package/dist/tools/toolMetadata/baseSchema.d.ts +1 -2
  181. package/dist/tools/toolMetadata/descriptions.d.ts +1 -1
  182. package/dist/tools/toolMetadata/names.d.ts +18 -2
  183. package/dist/tools/toolMetadata/state.d.ts +3 -3
  184. package/dist/tools/toolMetadata/types.d.ts +1 -1
  185. package/dist/tools/toolNames.d.ts +16 -3
  186. package/dist/tools/toolSchemaImports.d.ts +5 -4
  187. package/dist/tools/utils.d.ts +3 -6
  188. package/dist/types/bulk.d.ts +11 -1
  189. package/dist/types/execution.d.ts +6 -1
  190. package/dist/types/server.d.ts +0 -2
  191. package/dist/types/toolOutput.d.ts +10 -9
  192. package/dist/types/toolResults.d.ts +17 -1
  193. package/dist/utils/contextUtils.d.ts +4 -2
  194. package/dist/utils/file/toolHelpers.d.ts +1 -1
  195. package/dist/utils/http/cache/conditional.d.ts +9 -4
  196. package/dist/utils/http/cache/dataCache.d.ts +7 -2
  197. package/dist/utils/http/cache/diskStore.d.ts +30 -0
  198. package/dist/utils/http/cache/management.d.ts +5 -0
  199. package/dist/utils/http/cache/store.d.ts +1 -0
  200. package/dist/utils/http/cache/trace.d.ts +10 -0
  201. package/dist/utils/http/cache.d.ts +1 -0
  202. package/dist/utils/package/types.d.ts +5 -2
  203. package/dist/utils/pagination/charLimit.d.ts +0 -2
  204. package/dist/utils/response/bulk/pagination.d.ts +2 -1
  205. package/dist/utils/response/bulk/paginationDiagnostics.d.ts +2 -0
  206. package/dist/utils/response/bulk/queries.d.ts +0 -9
  207. package/dist/utils/response/bulk/response.d.ts +3 -2
  208. package/dist/utils/response/bulk.d.ts +1 -1
  209. package/dist/utils/response/callToolResult.d.ts +1 -1
  210. package/dist/utils/response/error.d.ts +3 -4
  211. package/dist/utils/response/groupedFinalizer.d.ts +2 -6
  212. package/dist/utils/response/normalizedError.d.ts +6 -0
  213. package/dist/utils/response/responseChannels.d.ts +4 -0
  214. package/package.json +7 -6
  215. package/dist/github/discussions.d.ts +0 -45
  216. package/dist/github/releases.d.ts +0 -45
  217. package/dist/scheme/responseEnvelope.d.ts +0 -88
  218. package/dist/tools/github_search_discussions/execution.d.ts +0 -15
  219. package/dist/tools/github_search_discussions/scheme.d.ts +0 -16
  220. package/dist/tools/github_search_pull_requests/execution/releasesMode.d.ts +0 -4
  221. package/dist/tools/local_dead_code/execution.d.ts +0 -4
  222. package/dist/tools/local_dead_code/local_dead_code.d.ts +0 -5
  223. package/dist/tools/local_find_files/pathPatternBraces.d.ts +0 -20
  224. package/dist/tools/toolMetadata/gateway.d.ts +0 -7
@@ -1,5 +1,5 @@
1
1
  import type { GitHubAPIError } from '../../github/githubAPI.js';
2
- import type { BaseQueryLocal } from '@octocodeai/octocode-core/extra-types';
2
+ import type { BaseQueryLocal } from '../../types/execution.js';
3
3
  type PartialBaseQuery = Partial<BaseQueryLocal>;
4
4
  export interface UnifiedErrorResult {
5
5
  status: 'error';
@@ -43,9 +43,8 @@ export type SafeParseOutcome<T> = {
43
43
  * Validate `input` against `schema`, returning either the parsed data or a
44
44
  * structured {@link UnifiedErrorResult} built via {@link createErrorResult}.
45
45
  *
46
- * Replaces the per-tool `safeParse issues.map(...).join('; ') →
47
- * createErrorResult('Validation error: …')` block. Pass `prefix: false` to
48
- * omit the "Validation error: " prefix (github_fetch_content parity).
46
+ * Replaces per-tool issue joining. Messages are direct by default; pass
47
+ * `prefix: true` only when a caller needs the legacy "Validation error: " label.
49
48
  */
50
49
  export declare function safeParseOrError<T>(schema: SafeParseableSchema<T>, query: PartialBaseQuery, options?: {
51
50
  toolName?: string;
@@ -1,12 +1,8 @@
1
1
  import type { BulkFinalizerOutput } from '../../types/bulk.js';
2
2
  import type { FlatQueryResult } from '../../types/toolResults.js';
3
- export type QueryWithPagination = {
4
- id?: unknown;
5
- charLength?: unknown;
6
- charOffset?: unknown;
7
- };
3
+ export type QueryWithPagination = object;
8
4
  export type FlatErrorEntry = {
9
- id: string;
5
+ index: number;
10
6
  error: string;
11
7
  status?: number;
12
8
  retryAfterSeconds?: number;
@@ -0,0 +1,6 @@
1
+ export interface NormalizedError {
2
+ name: string;
3
+ message: string;
4
+ code?: string;
5
+ }
6
+ export declare function normalizeError(error: unknown): NormalizedError;
@@ -0,0 +1,4 @@
1
+ export declare function buildResponseChannels<T extends object>(responseData: T, keysPriority: readonly string[]): {
2
+ text: string;
3
+ structuredContent: T;
4
+ };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@octocodeai/octocode-tools-core",
3
3
  "description": "Core tool implementations for Octocode: GitHub, local filesystem, LSP, and package search tools.",
4
- "version": "18.1.2",
4
+ "version": "18.2.0",
5
5
  "author": "Guy Bary <bgauryy@octocodeai.com>",
6
6
  "bugs": "https://github.com/bgauryy/octocode/issues",
7
7
  "dependencies": {
8
- "@modelcontextprotocol/sdk": "^1.29.0",
8
+ "@modelcontextprotocol/server": "^2.0.0",
9
9
  "@octocodeai/config": "18.0.1",
10
- "@octocodeai/octocode-core": "18.2.0",
11
- "@octocodeai/octocode-engine": "18.1.2",
10
+ "@octocodeai/octocode-core": "18.3.0",
11
+ "@octocodeai/octocode-engine": "18.2.0",
12
12
  "@octokit/oauth-methods": "^6.0.2",
13
13
  "@octokit/plugin-throttling": "^11.0.3",
14
14
  "@octokit/request": "^10.0.10",
@@ -92,8 +92,9 @@
92
92
  "directory": "packages/octocode-tools-core"
93
93
  },
94
94
  "scripts": {
95
- "build": "yarn readme:sync && yarn clean && node build.mjs && tsc --emitDeclarationOnly -p tsconfig.build.json",
96
- "build:dev": "yarn readme:sync && node build.mjs && tsc --emitDeclarationOnly -p tsconfig.build.json",
95
+ "build": "yarn readme:sync && yarn clean && node build.mjs && yarn build:types-deps && tsc --emitDeclarationOnly -p tsconfig.build.json",
96
+ "build:dev": "yarn readme:sync && node build.mjs && yarn build:types-deps && tsc --emitDeclarationOnly -p tsconfig.build.json",
97
+ "build:types-deps": "yarn workspace @octocodeai/config build",
97
98
  "clean": "rm -rf dist/",
98
99
  "lint": "eslint src",
99
100
  "lint:fix": "eslint src --fix",
@@ -1,45 +0,0 @@
1
- import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
2
- import type { GitHubAPIResponse } from './githubAPI.js';
3
- type DiscussionRow = {
4
- number: number;
5
- title: string;
6
- url: string;
7
- author?: string;
8
- category?: string;
9
- createdAt?: string;
10
- updatedAt?: string;
11
- /** True when a comment has been accepted as the answer (Q&A categories). */
12
- answered?: true;
13
- upvotes?: number;
14
- comments?: number;
15
- };
16
- export type DiscussionsResult = {
17
- type: 'discussions';
18
- owner: string;
19
- repo: string;
20
- totalCount: number;
21
- discussions: DiscussionRow[];
22
- pagination: {
23
- perPage: number;
24
- hasMore: boolean;
25
- /** Opaque cursor to pass back as `after` for the next page. */
26
- nextCursor?: string;
27
- };
28
- /**
29
- * Whether the repository has Discussions enabled at all. Omitted (not
30
- * `false`) when the repo-level probe itself failed/was inconclusive — a
31
- * `totalCount:0` response is otherwise ambiguous between "disabled" and
32
- * "enabled, nothing posted yet", which this field disambiguates without a
33
- * second call.
34
- */
35
- hasDiscussionsEnabled?: boolean;
36
- };
37
- type FetchDiscussionsParams = {
38
- owner: string;
39
- repo: string;
40
- keywords?: string[];
41
- perPage: number;
42
- after?: string;
43
- };
44
- export declare function fetchDiscussions(params: FetchDiscussionsParams, authInfo?: AuthInfo, sessionId?: string): Promise<GitHubAPIResponse<DiscussionsResult>>;
45
- export {};
@@ -1,45 +0,0 @@
1
- import type { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
2
- import type { GitHubAPIResponse } from './githubAPI.js';
3
- type ReleaseAsset = {
4
- name: string;
5
- size: number;
6
- downloadCount: number;
7
- url: string;
8
- };
9
- type ReleaseRow = {
10
- tagName: string;
11
- name?: string;
12
- publishedAt?: string;
13
- prerelease?: true;
14
- draft?: true;
15
- /** Marks the release GitHub reports as "latest" (stable, non-prerelease). */
16
- latest?: true;
17
- /** Downloadable assets (opt-in via includeAssets). */
18
- assets?: ReleaseAsset[];
19
- };
20
- export type ReleasesResult = {
21
- type: 'releases';
22
- owner: string;
23
- repo: string;
24
- releases: ReleaseRow[];
25
- /** The repo's latest stable release, surfaced even when it is not on this page. */
26
- latest?: {
27
- tagName: string;
28
- publishedAt?: string;
29
- };
30
- pagination: {
31
- currentPage: number;
32
- perPage: number;
33
- hasMore: boolean;
34
- nextPage?: number;
35
- };
36
- };
37
- type FetchReleasesParams = {
38
- owner: string;
39
- repo: string;
40
- page: number;
41
- perPage: number;
42
- includeAssets?: boolean;
43
- };
44
- export declare function fetchReleases(params: FetchReleasesParams, authInfo?: AuthInfo, sessionId?: string): Promise<GitHubAPIResponse<ReleasesResult>>;
45
- export {};
@@ -1,88 +0,0 @@
1
- import { z } from 'zod';
2
- export declare const responseEnvelopeFields: {
3
- readonly base: z.ZodOptional<z.ZodString>;
4
- readonly shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
5
- readonly responsePagination: z.ZodOptional<z.ZodObject<{
6
- currentPage: z.ZodNumber;
7
- totalPages: z.ZodNumber;
8
- hasMore: z.ZodBoolean;
9
- charOffset: z.ZodNumber;
10
- charLength: z.ZodNumber;
11
- totalChars: z.ZodNumber;
12
- nextCharOffset: z.ZodOptional<z.ZodNumber>;
13
- }, z.core.$strip>>;
14
- readonly next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
15
- tool: z.ZodString;
16
- query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
17
- why: z.ZodOptional<z.ZodString>;
18
- confidence: z.ZodOptional<z.ZodEnum<{
19
- exact: "exact";
20
- high: "high";
21
- medium: "medium";
22
- low: "low";
23
- }>>;
24
- }, z.core.$strip>>>;
25
- };
26
- export declare function withResponseEnvelope<S extends z.ZodObject>(schema: S): S;
27
- export declare function makeToolResultRowSchema<TData extends z.ZodTypeAny>(dataSchema: TData): z.ZodObject<{
28
- id: z.ZodString;
29
- status: z.ZodOptional<z.ZodEnum<{
30
- empty: "empty";
31
- error: "error";
32
- }>>;
33
- data: TData;
34
- next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
35
- tool: z.ZodString;
36
- query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
37
- why: z.ZodOptional<z.ZodString>;
38
- confidence: z.ZodOptional<z.ZodEnum<{
39
- exact: "exact";
40
- high: "high";
41
- medium: "medium";
42
- low: "low";
43
- }>>;
44
- }, z.core.$strip>>>;
45
- }, z.core.$strip>;
46
- export declare const GenericToolResultRowSchema: z.ZodObject<{
47
- id: z.ZodString;
48
- status: z.ZodOptional<z.ZodEnum<{
49
- empty: "empty";
50
- error: "error";
51
- }>>;
52
- data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
53
- next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
54
- tool: z.ZodString;
55
- query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
56
- why: z.ZodOptional<z.ZodString>;
57
- confidence: z.ZodOptional<z.ZodEnum<{
58
- exact: "exact";
59
- high: "high";
60
- medium: "medium";
61
- low: "low";
62
- }>>;
63
- }, z.core.$strip>>>;
64
- }, z.core.$strip>;
65
- export declare const bulkOutputEnvelopeFields: {
66
- readonly base: z.ZodOptional<z.ZodString>;
67
- readonly shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
68
- readonly responsePagination: z.ZodOptional<z.ZodObject<{
69
- currentPage: z.ZodNumber;
70
- totalPages: z.ZodNumber;
71
- hasMore: z.ZodBoolean;
72
- charOffset: z.ZodNumber;
73
- charLength: z.ZodNumber;
74
- totalChars: z.ZodNumber;
75
- nextCharOffset: z.ZodOptional<z.ZodNumber>;
76
- }, z.core.$strip>>;
77
- readonly next: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
78
- tool: z.ZodString;
79
- query: z.ZodRecord<z.ZodString, z.ZodUnknown>;
80
- why: z.ZodOptional<z.ZodString>;
81
- confidence: z.ZodOptional<z.ZodEnum<{
82
- exact: "exact";
83
- high: "high";
84
- medium: "medium";
85
- low: "low";
86
- }>>;
87
- }, z.core.$strip>>>;
88
- };
@@ -1,15 +0,0 @@
1
- import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
- import type { ToolExecutionArgs } from '../../types/execution.js';
3
- type PartialDiscussionsQuery = {
4
- owner?: string;
5
- repo?: string;
6
- keywordsToSearch?: string[];
7
- itemsPerPage?: number;
8
- limit?: number;
9
- after?: string;
10
- mainResearchGoal?: string;
11
- researchGoal?: string;
12
- reasoning?: string;
13
- };
14
- export declare function searchMultipleGitHubDiscussions(args: ToolExecutionArgs<PartialDiscussionsQuery>): Promise<CallToolResult>;
15
- export {};
@@ -1,16 +0,0 @@
1
- export declare const SearchDiscussionsLocalSchema: import("zod").ZodObject<{
2
- owner: import("zod").ZodString;
3
- repo: import("zod").ZodString;
4
- keywordsToSearch: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
5
- itemsPerPage: import("zod").ZodDefault<import("zod").ZodNumber>;
6
- after: import("zod").ZodOptional<import("zod").ZodString>;
7
- id: import("zod").ZodOptional<import("zod").ZodString>;
8
- mainResearchGoal: import("zod").ZodOptional<import("zod").ZodString>;
9
- researchGoal: import("zod").ZodOptional<import("zod").ZodString>;
10
- reasoning: import("zod").ZodOptional<import("zod").ZodString>;
11
- }, import("zod/v4/core").$strip>;
12
- export declare const SearchDiscussionsBulkLocalSchema: import("zod").ZodObject<{
13
- responseCharOffset: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodNumber>>;
14
- responseCharLength: import("zod").ZodOptional<import("zod").ZodPreprocess<import("zod").ZodNumber>>;
15
- queries: import("zod").ZodArray<import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>>;
16
- }, import("zod/v4/core").$strip>;
@@ -1,4 +0,0 @@
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>;
@@ -1,4 +0,0 @@
1
- import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
- import { type FindDeadCodeQuery } from './scheme.js';
3
- import type { ToolExecutionArgs } from '../../types/execution.js';
4
- export declare function executeFindDeadCode(args: ToolExecutionArgs<FindDeadCodeQuery>): Promise<CallToolResult>;
@@ -1,5 +0,0 @@
1
- import type { WithOptionalMeta } from '../../types/execution.js';
2
- import type { FindDeadCodeOutput, FindDeadCodeQuery as CoreFindDeadCodeQuery } from './scheme.js';
3
- type FindDeadCodeQuery = WithOptionalMeta<CoreFindDeadCodeQuery>;
4
- export declare function findDeadCode(query: FindDeadCodeQuery): Promise<FindDeadCodeOutput>;
5
- export {};
@@ -1,20 +0,0 @@
1
- import type { FileSystemQueryResult } from '../../utils/contextUtils.js';
2
- /**
3
- * Expand shell-style brace alternation (`{a,b,c}`) in a glob pattern into the
4
- * cartesian product of concrete patterns. The native glob compiler (a
5
- * hand-rolled glob-to-regex translator, see `octocode-engine`'s `fs_query.rs`)
6
- * has no brace support — a pattern like `packages/{react,react-reconciler}/**`
7
- * previously compiled to a regex that silently matched nothing, with no error.
8
- * Returns the input unchanged as a single-element array when it has no brace
9
- * groups, so patterns without braces see no behavior change.
10
- */
11
- export declare function expandBracePattern(pattern: string): string[];
12
- /**
13
- * Merge multiple native `queryFileSystem` results (one per expanded brace
14
- * alternative) into a single result shape, deduping entries that matched more
15
- * than one alternative. `totalDiscovered`/`skipped`/`permissionDenied` are
16
- * summed per-walk (not deduped) — each expanded pattern walks the tree
17
- * independently, so this is an upper bound on true unique discovery, not an
18
- * exact count; `wasCapped` is true if any alternative hit its cap.
19
- */
20
- export declare function mergeFileSystemQueryResults(results: readonly FileSystemQueryResult[]): FileSystemQueryResult;
@@ -1,7 +0,0 @@
1
- import type { ToolNames } from '@octocodeai/octocode-core/types';
2
- export interface ToolMetadataGateway {
3
- hasTool(toolName: string): boolean;
4
- getDescription(toolName: string): string;
5
- getToolName<TKey extends keyof ToolNames>(key: TKey): ToolNames[TKey];
6
- }
7
- export declare const DEFAULT_TOOL_METADATA_GATEWAY: ToolMetadataGateway;