@octocodeai/octocode-tools-core 18.3.0 → 19.1.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 (242) hide show
  1. package/README.md +19 -19
  2. package/dist/chunks/direct/chunk-3AA4F3QO.js +10 -0
  3. package/dist/chunks/direct/chunk-43RVQWTG.js +8 -0
  4. package/dist/chunks/direct/chunk-7DYE654A.js +8 -0
  5. package/dist/chunks/direct/chunk-A4WMBDEC.js +8 -0
  6. package/dist/chunks/direct/chunk-AWZG43MA.js +8 -0
  7. package/dist/chunks/direct/chunk-BICVXQ5F.js +8 -0
  8. package/dist/chunks/direct/chunk-BMM5H6QF.js +11 -0
  9. package/dist/chunks/direct/chunk-C6HFNIDL.js +8 -0
  10. package/dist/chunks/direct/chunk-CBCZVCTZ.js +8 -0
  11. package/dist/chunks/direct/chunk-CBIKUVP6.js +11 -0
  12. package/dist/chunks/direct/chunk-CKB2ME2J.js +8 -0
  13. package/dist/chunks/direct/chunk-DBI23PBG.js +9 -0
  14. package/dist/chunks/direct/chunk-DBSQWRFS.js +9 -0
  15. package/dist/chunks/direct/chunk-DKGYPFGX.js +8 -0
  16. package/dist/chunks/direct/chunk-EOLHXX5I.js +8 -0
  17. package/dist/chunks/direct/chunk-IFPXDKUV.js +8 -0
  18. package/dist/chunks/direct/chunk-J3WYA3IJ.js +8 -0
  19. package/dist/chunks/direct/chunk-MCMOWPYL.js +8 -0
  20. package/dist/chunks/direct/chunk-MPTAIBY7.js +8 -0
  21. package/dist/chunks/direct/chunk-NQRDACK3.js +8 -0
  22. package/dist/chunks/direct/chunk-O5ETB2W5.js +8 -0
  23. package/dist/chunks/direct/chunk-OA6NU4KO.js +8 -0
  24. package/dist/chunks/direct/chunk-QKDE2HIF.js +10 -0
  25. package/dist/chunks/direct/chunk-RRSY2ZPX.js +13 -0
  26. package/dist/chunks/direct/chunk-UKQLRZEW.js +8 -0
  27. package/dist/chunks/direct/chunk-USZL65FN.js +8 -0
  28. package/dist/chunks/direct/chunk-WH6GL3J2.js +8 -0
  29. package/dist/chunks/direct/chunk-Y5OCKUQX.js +9 -0
  30. package/dist/chunks/direct/chunk-ZO44CZN5.js +8 -0
  31. package/dist/chunks/direct/chunk-ZSXRT7JL.js +12 -0
  32. package/dist/chunks/direct/chunk-ZUNPQVMO.js +8 -0
  33. package/dist/chunks/direct/execution-3T4B776P.js +9 -0
  34. package/dist/chunks/direct/execution-5BJNS7D7.js +8 -0
  35. package/dist/chunks/direct/execution-5O6QHKBR.js +8 -0
  36. package/dist/chunks/direct/execution-A4NK3BQO.js +8 -0
  37. package/dist/chunks/direct/execution-K4UOPXRQ.js +9 -0
  38. package/dist/chunks/direct/execution-SWWZOOA7.js +13 -0
  39. package/dist/chunks/direct/execution-X4MUJL4L.js +8 -0
  40. package/dist/chunks/direct/execution-XA6PXPRB.js +8 -0
  41. package/dist/chunks/direct/historyExecutions-6F3AA5PY.js +14 -0
  42. package/dist/direct.d.ts +6 -1
  43. package/dist/direct.js +2 -46
  44. package/dist/github/canonicalRepo.d.ts +2 -1
  45. package/dist/github/client.d.ts +3 -8
  46. package/dist/github/codeSearch/compactFragment.d.ts +7 -0
  47. package/dist/github/codeSearch.d.ts +2 -3
  48. package/dist/github/commit.d.ts +8 -0
  49. package/dist/github/commitDetail.d.ts +20 -0
  50. package/dist/github/commitSearch.d.ts +17 -0
  51. package/dist/github/compare.d.ts +15 -0
  52. package/dist/github/directoryFetch/cacheMetadata.d.ts +25 -0
  53. package/dist/github/directoryFetch/helpers.d.ts +1 -3
  54. package/dist/github/directoryFetch/snapshot.d.ts +10 -0
  55. package/dist/github/fileContentProcess.d.ts +0 -1
  56. package/dist/github/fileContentRaw/cache.d.ts +9 -0
  57. package/dist/github/fileContentRaw/fetch.d.ts +1 -1
  58. package/dist/github/githubAPI.d.ts +19 -2
  59. package/dist/github/history/commitFiles.d.ts +12 -0
  60. package/dist/github/issues/fetchers.d.ts +1 -1
  61. package/dist/github/issues/types.d.ts +3 -1
  62. package/dist/github/prContentFetcher/collectionPaging.d.ts +27 -0
  63. package/dist/github/prContentFetcher/comments.d.ts +7 -5
  64. package/dist/github/prContentFetcher/commits.d.ts +13 -14
  65. package/dist/github/prContentFetcher/flags.d.ts +0 -1
  66. package/dist/github/prContentFetcher/transform.d.ts +1 -1
  67. package/dist/github/prTransformation.d.ts +3 -1
  68. package/dist/github/queryBuilders/codeAndRepo.d.ts +2 -1
  69. package/dist/github/repoSearch.d.ts +2 -1
  70. package/dist/github/repoStructure/fetchOrchestration.d.ts +1 -1
  71. package/dist/github/repoStructurePagination.d.ts +1 -1
  72. package/dist/github/repoStructureTree.d.ts +4 -2
  73. package/dist/graph/advancedOperations.d.ts +2 -2
  74. package/dist/graph/buildFileGraph.d.ts +8 -13
  75. package/dist/graph/coverage.d.ts +6 -0
  76. package/dist/graph/diagnosticSnapshot.d.ts +10 -0
  77. package/dist/graph/fileImportLinker.d.ts +28 -0
  78. package/dist/graph/importResolver.d.ts +1 -1
  79. package/dist/graph/languageImportResolver.d.ts +5 -0
  80. package/dist/graph/metadataImports.d.ts +7 -0
  81. package/dist/graph/packageExportTargets.d.ts +11 -0
  82. package/dist/graph/rustCargoMetadata.d.ts +31 -0
  83. package/dist/graph/rustCargoProcess.d.ts +16 -0
  84. package/dist/graph/rustModules.d.ts +7 -0
  85. package/dist/graph/rustWorkspace.d.ts +5 -0
  86. package/dist/graph/types.d.ts +94 -3
  87. package/dist/graph/workspacePackageResolver.d.ts +7 -2
  88. package/dist/index.d.ts +46 -19
  89. package/dist/index.js +36 -45
  90. package/dist/providers/github/GitHubProvider.d.ts +3 -1
  91. package/dist/providers/github/githubContent.d.ts +3 -2
  92. package/dist/providers/github/githubPullRequests.d.ts +3 -2
  93. package/dist/providers/github/githubSearch.d.ts +6 -3
  94. package/dist/providers/github/githubStructure.d.ts +3 -2
  95. package/dist/providers/providerQueries.d.ts +4 -0
  96. package/dist/providers/providerResults.d.ts +29 -1
  97. package/dist/providers/types.d.ts +0 -2
  98. package/dist/schema.d.ts +9 -3
  99. package/dist/schema.js +4 -12
  100. package/dist/scheme/fields.d.ts +8 -8
  101. package/dist/scheme/pagination.d.ts +1 -0
  102. package/dist/serverConfig.d.ts +1 -1
  103. package/dist/shared/session/index.d.ts +1 -1
  104. package/dist/shared/session/index.js +1 -1
  105. package/dist/shared/session/storage.d.ts +0 -1
  106. package/dist/toolContract/descriptions.d.ts +6 -6
  107. package/dist/toolContract/input/resources/tools/ghSearch.d.ts +21 -20
  108. package/dist/toolContract/input/resources/tools/githubHistorySchema.d.ts +14 -6
  109. package/dist/toolContract/input/resources/tools/githubRepositoriesOperation.d.ts +3 -3
  110. package/dist/toolContract/input/resources/tools/githubTreeOperation.d.ts +4 -2
  111. package/dist/toolContract/input/resources/tools/historyCommitInput.d.ts +9 -0
  112. package/dist/toolContract/input/resources/tools/historyIssueInput.d.ts +4 -4
  113. package/dist/toolContract/input/resources/tools/historyPullRequestInput.d.ts +13 -5
  114. package/dist/toolContract/input/resources/tools/localAnalyzeGraph.d.ts +74 -32
  115. package/dist/toolContract/input/resources/tools/localFilesOperation.d.ts +1 -1
  116. package/dist/toolContract/input/resources/tools/localSearch.d.ts +43 -43
  117. package/dist/toolContract/input/resources/tools/localTextOperation.d.ts +1 -1
  118. package/dist/toolContract/input/resources/tools/localTreeOperation.d.ts +2 -2
  119. package/dist/toolContract/input/resources/tools/lspGetSemantics.d.ts +11 -2
  120. package/dist/toolContract/input/resources/tools/npmSearch.d.ts +2 -1
  121. package/dist/toolContract/metadata.d.ts +1 -1
  122. package/dist/toolContract/runtime.d.ts +1 -1
  123. package/dist/toolContract/types.d.ts +0 -1
  124. package/dist/tools/directToolCatalog/toolCatalogDefinitions.d.ts +2 -4
  125. package/dist/tools/directToolCatalog/toolInputPreparation.d.ts +2 -5
  126. package/dist/tools/directToolCatalog.exec.d.ts +10 -7
  127. package/dist/tools/github_clone_repo/cache.d.ts +0 -2
  128. package/dist/tools/github_clone_repo/cacheArtifacts.d.ts +3 -1
  129. package/dist/tools/github_clone_repo/cachePaths.d.ts +3 -2
  130. package/dist/tools/github_clone_repo/gitCheckout.d.ts +5 -0
  131. package/dist/tools/github_clone_repo/scheme.d.ts +3 -3
  132. package/dist/tools/github_clone_repo/types.d.ts +6 -1
  133. package/dist/tools/github_fetch_content/finalizer/types.d.ts +10 -2
  134. package/dist/tools/github_fetch_content/scheme.d.ts +3 -4
  135. package/dist/tools/github_fetch_content/types.d.ts +4 -3
  136. package/dist/tools/github_search/scheme.d.ts +24 -23
  137. package/dist/tools/github_search_code/execution.d.ts +1 -1
  138. package/dist/tools/github_search_code/finalizer/groups.d.ts +1 -1
  139. package/dist/tools/github_search_code/finalizer/ranking.d.ts +1 -1
  140. package/dist/tools/github_search_code/scheme.d.ts +3 -3
  141. package/dist/tools/github_search_pull_requests/contentResponse/commentsShaping.d.ts +4 -1
  142. package/dist/tools/github_search_pull_requests/contentResponse/contentView.d.ts +3 -0
  143. package/dist/tools/github_search_pull_requests/contentResponse/fileSurfaces.d.ts +30 -2
  144. package/dist/tools/github_search_pull_requests/contentResponse/nextCalls.d.ts +1 -7
  145. package/dist/tools/github_search_pull_requests/contentResponse/pagination.d.ts +14 -2
  146. package/dist/tools/github_search_pull_requests/historyContinuations.d.ts +1 -1
  147. package/dist/tools/github_search_pull_requests/historyDiffContinuations.d.ts +2 -0
  148. package/dist/tools/github_search_pull_requests/historySchemes.d.ts +23 -22
  149. package/dist/tools/github_search_pull_requests/scheme.d.ts +17 -9
  150. package/dist/tools/github_search_pull_requests/splitSchemes.d.ts +35 -26
  151. package/dist/tools/github_search_pull_requests/types.d.ts +5 -0
  152. package/dist/tools/github_search_repos/execution/pagination.d.ts +0 -17
  153. package/dist/tools/github_search_repos/execution/queryVariants.d.ts +1 -23
  154. package/dist/tools/github_search_repos/execution.d.ts +0 -1
  155. package/dist/tools/github_search_repos/scheme.d.ts +6 -6
  156. package/dist/tools/github_view_repo_structure/execution.d.ts +1 -1
  157. package/dist/tools/github_view_repo_structure/scheme.d.ts +6 -5
  158. package/dist/tools/local_analyze_graph/analysisTypes.d.ts +16 -3
  159. package/dist/tools/local_analyze_graph/analyzeGraph.d.ts +1 -1
  160. package/dist/tools/local_analyze_graph/completeness.d.ts +3 -0
  161. package/dist/tools/local_analyze_graph/deadCodeScan.d.ts +9 -5
  162. package/dist/tools/local_analyze_graph/rootInference.d.ts +2 -0
  163. package/dist/tools/local_analyze_graph/scheme.d.ts +13 -25
  164. package/dist/tools/local_fetch_content/fetchContent/pagination.d.ts +7 -0
  165. package/dist/tools/local_fetch_content/scheme.d.ts +3 -3
  166. package/dist/tools/local_find_files/findFiles.d.ts +1 -1
  167. package/dist/tools/local_find_files/scheme.d.ts +4 -4
  168. package/dist/tools/local_ripgrep/execution.d.ts +0 -1
  169. package/dist/tools/local_ripgrep/rankingProfile/rankingProfiles.d.ts +1 -2
  170. package/dist/tools/local_ripgrep/rankingProfile/rankingResults.d.ts +2 -2
  171. package/dist/tools/local_ripgrep/rankingProfile/rankingScoring.d.ts +1 -3
  172. package/dist/tools/local_ripgrep/ripgrepResultBuilder/buildResult.d.ts +0 -4
  173. package/dist/tools/local_ripgrep/ripgrepResultBuilder/searchNext.d.ts +1 -0
  174. package/dist/tools/local_ripgrep/scheme.d.ts +13 -5
  175. package/dist/tools/local_ripgrep/structuralCompleteness.d.ts +9 -0
  176. package/dist/tools/local_search/execution.d.ts +0 -1
  177. package/dist/tools/local_search/scheme.d.ts +46 -46
  178. package/dist/tools/local_view_structure/scheme.d.ts +5 -5
  179. package/dist/tools/lsp/semantic_content/scheme.d.ts +29 -7
  180. package/dist/tools/lsp/semantic_content/semanticAnchored.d.ts +2 -9
  181. package/dist/tools/lsp/semantic_content/semanticEnvelopes/callEnvelopes.d.ts +2 -2
  182. package/dist/tools/lsp/semantic_content/semanticEnvelopes/envelopeHelpers.d.ts +2 -1
  183. package/dist/tools/lsp/semantic_content/semanticEnvelopes/locationEnvelopes.d.ts +2 -3
  184. package/dist/tools/lsp/semantic_content/semanticFileOps/anchor.d.ts +0 -1
  185. package/dist/tools/lsp/semantic_content/semanticPresentation.d.ts +1 -0
  186. package/dist/tools/lsp/semantic_content/semanticSnapshot.d.ts +16 -0
  187. package/dist/tools/lsp/shared/callHierarchyTraversal.d.ts +2 -1
  188. package/dist/tools/lsp/shared/semanticTypes.d.ts +19 -10
  189. package/dist/tools/package_search/execution.d.ts +3 -4
  190. package/dist/tools/package_search/pagination.d.ts +1 -0
  191. package/dist/tools/package_search/scheme.d.ts +5 -4
  192. package/dist/tools/providerMappers/codeSearch.d.ts +2 -9
  193. package/dist/tools/providerMappers/fileContent.d.ts +1 -1
  194. package/dist/tools/providerMappers/pullRequests.d.ts +24 -4
  195. package/dist/tools/providerMappers/repoSearch.d.ts +4 -4
  196. package/dist/tools/providerMappers/repoStructure.d.ts +4 -3
  197. package/dist/tools/toolAvailability.d.ts +19 -0
  198. package/dist/tools/toolConfig.d.ts +1 -3
  199. package/dist/types/toolResults.d.ts +1 -0
  200. package/dist/utils/contextUtils.d.ts +1 -1
  201. package/dist/utils/core/types.d.ts +0 -2
  202. package/dist/utils/exec/npm.d.ts +2 -0
  203. package/dist/utils/file/byteOffset.d.ts +1 -1
  204. package/dist/utils/package/common.d.ts +0 -3
  205. package/dist/utils/package/npm/npmDeprecation.d.ts +1 -2
  206. package/dist/utils/package/npm/npmDetailsFetchers.d.ts +3 -15
  207. package/dist/utils/package/npm/npmMappers.d.ts +0 -4
  208. package/dist/utils/package/npm/npmRegistry.d.ts +9 -1
  209. package/dist/utils/package/npm/npmSearchStrategies.d.ts +2 -5
  210. package/dist/utils/package/types.d.ts +3 -0
  211. package/dist/utils/pagination/types.d.ts +1 -0
  212. package/dist/utils/response/callToolResult.d.ts +3 -1
  213. package/package.json +19 -15
  214. package/dist/errors/pathUtils.d.ts +0 -1
  215. package/dist/github/directoryFetch.d.ts +0 -3
  216. package/dist/github/fileContentRaw.d.ts +0 -2
  217. package/dist/github/issues.d.ts +0 -3
  218. package/dist/github/prContentFetcher.d.ts +0 -2
  219. package/dist/github/queryBuilders.d.ts +0 -4
  220. package/dist/github/repoStructure.d.ts +0 -1
  221. package/dist/shared/index.d.ts +0 -6
  222. package/dist/shared/languageSelectors.d.ts +0 -3
  223. package/dist/toolContract/schemas.d.ts +0 -31
  224. package/dist/tools/directToolCatalog.d.ts +0 -15
  225. package/dist/tools/directToolCatalog.meta.d.ts +0 -28
  226. package/dist/tools/github_search_code/finalizer.d.ts +0 -2
  227. package/dist/tools/github_search_repos/execution/ranking.d.ts +0 -4
  228. package/dist/tools/local_ripgrep/rankingProfile.d.ts +0 -35
  229. package/dist/tools/local_ripgrep/ripgrepResultBuilder.d.ts +0 -2
  230. package/dist/tools/lsp/semantic_content/index.d.ts +0 -3
  231. package/dist/tools/lsp/semantic_content/semanticEnvelopes.d.ts +0 -3
  232. package/dist/tools/lsp/semantic_content/semanticFileOps.d.ts +0 -8
  233. package/dist/tools/providerMappers.d.ts +0 -11
  234. package/dist/tools/toolMetadata/baseSchema.d.ts +0 -1
  235. package/dist/tools/toolMetadata/descriptions.d.ts +0 -1
  236. package/dist/tools/toolMetadata/proxies.d.ts +0 -4
  237. package/dist/tools/toolSchemaImports.d.ts +0 -16
  238. package/dist/utils/exec/spawn.d.ts +0 -2
  239. package/dist/utils/file/filters.d.ts +0 -2
  240. package/dist/utils/http/cache.d.ts +0 -5
  241. package/dist/utils/package/npm.d.ts +0 -2
  242. package/dist/utils/response/bulk.d.ts +0 -2
@@ -0,0 +1,28 @@
1
+ import type { prepareMetadataImports } from './metadataImports.js';
2
+ import type { prepareRustResolver } from './rustWorkspace.js';
3
+ import type { WorkspacePackageExports } from './workspacePackageResolver.js';
4
+ import type { PackageExportMode } from './packageExportTargets.js';
5
+ import type { GraphCoverage, RawGraphFacts } from './types.js';
6
+ /** One coverage policy for every source import, reexport, and module load. */
7
+ export declare function createFileImportLinker(options: {
8
+ relativePath: string;
9
+ parsed: RawGraphFacts;
10
+ knownFiles: Set<string>;
11
+ getWorkspacePackageExports: () => WorkspacePackageExports;
12
+ metadata: ReturnType<typeof prepareMetadataImports>;
13
+ resolveRust: Awaited<ReturnType<typeof prepareRustResolver>>;
14
+ coverage: GraphCoverage;
15
+ }): {
16
+ extension: string;
17
+ javascript: boolean;
18
+ python: boolean;
19
+ cFamily: boolean;
20
+ auxiliaryTargets: Set<string>;
21
+ resolve: (specifier: string, line: number, options?: {
22
+ moduleDeclaration?: boolean;
23
+ resolutionHint?: string;
24
+ moduleScope?: string[];
25
+ importedName?: string;
26
+ exportMode?: PackageExportMode;
27
+ }) => string | null;
28
+ };
@@ -3,4 +3,4 @@
3
3
  * `knownFiles`, or `null` when it's external/bare or doesn't resolve within
4
4
  * the scanned set (dangling import, or a target outside the scan scope).
5
5
  */
6
- export declare function resolveImportSpecifier(specifier: string, importingFileRelativePath: string, knownFiles: ReadonlySet<string>, workspacePackageExports?: ReadonlyMap<string, string>): string | null;
6
+ export declare function resolveImportSpecifier(specifier: string, importingFileRelativePath: string, knownFiles: ReadonlySet<string>): string | null;
@@ -0,0 +1,5 @@
1
+ import type { ImportResolution } from './types.js';
2
+ /** Resolve exact syntax paths only; build-system search paths remain unsupported. */
3
+ export declare function resolveCInclude(specifier: string, importer: string, hint: string | undefined, files: ReadonlySet<string>): ImportResolution;
4
+ /** The selected root is a candidate Python import root, not a sys.path claim. */
5
+ export declare function resolvePythonImport(specifier: string, importer: string, importedName: string | undefined, hint: string | undefined, files: ReadonlySet<string>): ImportResolution;
@@ -0,0 +1,7 @@
1
+ import type { ImportResolution } from './types.js';
2
+ /** Only explicit package.json imports become leaves; never traverse their contents. */
3
+ export declare function prepareMetadataImports(root: string, knownFiles: Set<string>, excludeDirs: readonly string[], maxFiles: number): {
4
+ targets: Set<string>;
5
+ resolve: (specifier: string, importer: string) => ImportResolution | undefined;
6
+ truncated: () => boolean;
7
+ };
@@ -0,0 +1,11 @@
1
+ /** Syntax contexts, independent of the host process's own module format. */
2
+ export type PackageExportMode = 'import' | 'require' | 'static' | 'types' | 'types-import' | 'types-require';
3
+ type Selection = {
4
+ kind: 'target';
5
+ target: string;
6
+ } | {
7
+ kind: 'unmatched' | 'blocked' | 'invalid' | 'unsupported';
8
+ };
9
+ /** Node export key order/pattern specificity, with explicit unknown-context gaps. */
10
+ export declare function selectPackageExport(exports: unknown, subpath: string, mode: PackageExportMode): Selection;
11
+ export {};
@@ -0,0 +1,31 @@
1
+ export interface RustCargoDependencyAlias {
2
+ alias: string;
3
+ packageName: string;
4
+ targetId?: string;
5
+ external: boolean;
6
+ conditional: boolean;
7
+ }
8
+ export interface RustCargoTarget {
9
+ id: string;
10
+ packageId: string;
11
+ packageName: string;
12
+ crateName: string;
13
+ kind: string[];
14
+ edition?: string;
15
+ srcPath: string;
16
+ dependencyAliases: RustCargoDependencyAlias[];
17
+ }
18
+ export interface RustCargoDiagnostic {
19
+ code: string;
20
+ message: string;
21
+ }
22
+ export interface RustCargoMetadataResult {
23
+ status: 'ok' | 'unsupported';
24
+ targets: RustCargoTarget[];
25
+ diagnostics: RustCargoDiagnostic[];
26
+ }
27
+ /** Called only by the explicit rustWorkspace:'cargo' graph mode. Never builds code. */
28
+ export declare function resolveRustCargoMetadata(input: {
29
+ root: string;
30
+ files: readonly string[];
31
+ }): Promise<RustCargoMetadataResult>;
@@ -0,0 +1,16 @@
1
+ export declare const TIMEOUT_MS = 5000;
2
+ export declare const MAX_BUFFER = 1048576;
3
+ export declare class MetadataFailure extends Error {
4
+ readonly code: string;
5
+ constructor(code: string, message: string);
6
+ }
7
+ export declare function within(root: string, path: string): boolean;
8
+ export declare function remaining(deadline: number): number;
9
+ export declare function command(file: string, args: string[], cwd: string, env: NodeJS.ProcessEnv, deadline: number): Promise<string>;
10
+ /** Use host PATH entries only; project rust-toolchain overrides never select the executable. */
11
+ export declare function hostCargo(root: string, deadline: number): Promise<{
12
+ executable: string;
13
+ env: NodeJS.ProcessEnv;
14
+ }>;
15
+ /** Probe only ancestors of known Rust files, stopping at the supplied scan root. */
16
+ export declare function manifests(root: string, files: readonly string[], deadline: number): Promise<string[]>;
@@ -0,0 +1,7 @@
1
+ import type { ImportResolution, RawGraphFacts } from './types.js';
2
+ export type RustDependencies = ReadonlyMap<string, ReadonlyMap<string, {
3
+ root?: string;
4
+ external: boolean;
5
+ }>>;
6
+ /** Build the logical module forest from declarations; physical neighbors are not modules. */
7
+ export declare function createRustModuleResolver(facts: ReadonlyMap<string, RawGraphFacts>, files: ReadonlySet<string>, roots: readonly string[], dependencies?: RustDependencies, editions?: ReadonlyMap<string, string>): (specifier: string, file: string, scope?: string[], moduleDeclaration?: boolean, line?: number) => ImportResolution;
@@ -0,0 +1,5 @@
1
+ import type { RawGraphFacts, GraphCoverage } from './types.js';
2
+ export declare function prepareRustResolver(rootAbsolutePath: string, knownFiles: ReadonlySet<string>, parsedEntries: Array<{
3
+ relativePath: string;
4
+ parsed: RawGraphFacts;
5
+ }>, rustWorkspace: 'syntax' | 'cargo', coverage: GraphCoverage): Promise<(specifier: string, file: string, scope?: string[], moduleDeclaration?: boolean, line?: number) => import("./types.js").ImportResolution>;
@@ -1,17 +1,58 @@
1
+ export interface ImportResolution {
2
+ target: string | null;
3
+ status: 'resolved' | 'external' | 'unresolvedInternal' | 'unsupported';
4
+ additionalTargets?: string[];
5
+ /** Stable explanation for a bounded resolver's unavailable target or context. */
6
+ reason?: string;
7
+ }
1
8
  export interface DeclarationFact {
9
+ /** Source occurrence identity; never a canonical cross-file symbol ID. */
2
10
  id: string;
3
11
  name: string;
4
12
  kind: string;
5
13
  line: number;
6
14
  exported: boolean;
7
15
  }
16
+ export interface GraphCoverage {
17
+ /** Public response pagination; graph construction retains the full diagnostic list. */
18
+ diagnosticsPagination?: {
19
+ currentPage: number;
20
+ totalPages: number;
21
+ entriesPerPage: number;
22
+ totalEntries: number;
23
+ hasMore: boolean;
24
+ resultId: string;
25
+ outOfRange?: boolean;
26
+ terminalLimit?: boolean;
27
+ };
28
+ diagnosticCounts?: Record<string, number>;
29
+ basis: 'syntactic';
30
+ referenceBasis: 'lexical-occurrence';
31
+ languages: Array<{
32
+ language: string;
33
+ files: number;
34
+ linking: 'javascript-relative' | 'rust-modules' | 'python-modules' | 'c-relative-includes' | 'metadata' | 'unsupported';
35
+ }>;
36
+ imports: {
37
+ resolved: number;
38
+ external: number;
39
+ unresolvedInternal: number;
40
+ unsupported: number;
41
+ };
42
+ diagnostics: Array<{
43
+ file: string;
44
+ line?: number;
45
+ code: 'parse-recovery' | 'unsupported-linking' | 'unresolved-internal' | 'syntax-only';
46
+ message: string;
47
+ }>;
48
+ }
8
49
  export interface ImportFact {
9
50
  specifier: string;
10
51
  localName: string;
11
52
  importedName: string;
12
53
  line: number;
13
- /** Native syntax classification; `type` edges do not exist at runtime. */
14
- importKind: 'type' | 'value';
54
+ /** Native syntax classification; `module` denotes a Rust module declaration. */
55
+ importKind: 'type' | 'value' | 'module';
15
56
  /**
16
57
  * Canonical target resolved during graph construction with the complete
17
58
  * workspace package-export map. `null` means the specifier is external or
@@ -64,4 +105,54 @@ export interface FileNode {
64
105
  /** Exact syntactic provenance for every resolved file edge. */
65
106
  edgeKinds: Map<string, Set<FileGraphEdgeKind>>;
66
107
  }
67
- export type FileGraphEdgeKind = 'static-import' | 'type-import' | 'dynamic-import' | 'named-reexport' | 'star-reexport';
108
+ export type FileGraphEdgeKind = 'static-import' | 'type-import' | 'dynamic-import' | 'named-reexport' | 'star-reexport' | 'type-named-reexport' | 'type-star-reexport' | 'commonjs-require' | 'create-require' | 'metadata-import' | 'python-import' | 'rust-module' | 'rust-use' | 'c-include';
109
+ export interface RawGraphFacts {
110
+ language?: string;
111
+ commonJs?: Array<{
112
+ specifier?: string;
113
+ line: number;
114
+ kind: 'commonjs-require';
115
+ binding: 'unshadowed-global' | 'create-require';
116
+ reason?: string;
117
+ }>;
118
+ diagnostics?: string[];
119
+ rustRootUnsupported?: boolean;
120
+ modules?: Array<{
121
+ name: string;
122
+ line: number;
123
+ scope: string[];
124
+ inline: boolean;
125
+ path?: string;
126
+ unsupported?: boolean;
127
+ }>;
128
+ declarations?: Array<{
129
+ id: string;
130
+ name: string;
131
+ kind: string;
132
+ line: number;
133
+ exported?: boolean;
134
+ }>;
135
+ imports?: Array<{
136
+ specifier: string;
137
+ localName: string;
138
+ importedName: string;
139
+ line: number;
140
+ importKind?: string;
141
+ resolutionHint?: string;
142
+ moduleScope?: string[];
143
+ }>;
144
+ calls?: Array<{
145
+ caller: string;
146
+ callee: string;
147
+ kind?: string;
148
+ line?: number;
149
+ }>;
150
+ exports?: Array<{
151
+ name: string;
152
+ line: number;
153
+ localName?: string;
154
+ exportKind?: string;
155
+ /** Present only for a re-export (`export ... from '...'`). */
156
+ source?: string;
157
+ }>;
158
+ }
@@ -1,2 +1,7 @@
1
- /** Resolve only exact package exports declared by manifests in this scan. */
2
- export declare function buildWorkspacePackageExports(rootAbsolutePath: string, knownFiles: ReadonlySet<string>): Map<string, string>;
1
+ import { type PackageExportMode } from './packageExportTargets.js';
2
+ import type { ImportResolution } from './types.js';
3
+ export interface WorkspacePackageExports {
4
+ resolve(specifier: string, mode: PackageExportMode): ImportResolution | undefined;
5
+ }
6
+ /** Package export selection precedes bounded source projection and file existence checks. */
7
+ export declare function buildWorkspacePackageExports(rootAbsolutePath: string, knownFiles: ReadonlySet<string>): WorkspacePackageExports;
package/dist/index.d.ts CHANGED
@@ -3,24 +3,32 @@ export * from './config.js';
3
3
  export * from './errors/domainErrors.js';
4
4
  export * from './errors/errorFactories.js';
5
5
  export * from './errors/localToolErrors.js';
6
- export * from './errors/pathUtils.js';
6
+ export { redactPath } from '@octocodeai/octocode-engine/pathUtils';
7
7
  export * from './errors/ToolError.js';
8
8
  export * from './github/client.js';
9
9
  export * from './github/codeSearch.js';
10
- export * from './github/directoryFetch.js';
10
+ export { MAX_DIRECTORY_FILES, MAX_TOTAL_SIZE, } from './github/directoryFetch/helpers.js';
11
+ export { fetchDirectoryContents } from './github/directoryFetch/fetchDirectoryContents.js';
12
+ export { fetchFileContentToDisk } from './github/directoryFetch/fetchFileContentToDisk.js';
11
13
  export * from './github/errorConstants.js';
12
14
  export * from './github/errors.js';
13
15
  export * from './github/fileContent.js';
14
16
  export * from './github/fileContentProcess.js';
15
- export * from './github/fileContentRaw.js';
17
+ export { applyContentPagination, fetchFileTimestamp, } from './github/fileContentPagination.js';
18
+ export type { RawContentResult, RawContentFetchOptions, RawContentFetchResponse, } from './github/fileContentRaw/fetch.js';
19
+ export { fetchRawGitHubFileContent } from './github/fileContentRaw/fetch.js';
16
20
  export * from './github/prByNumber.js';
17
- export * from './github/prContentFetcher.js';
21
+ export { shouldEnrichPullRequestFromSearch } from './github/prContentFetcher/flags.js';
22
+ export { transformPullRequestItemFromSearch, transformPullRequestItemFromREST, } from './github/prContentFetcher/transform.js';
18
23
  export * from './github/prTransformation.js';
19
24
  export * from './github/pullRequestSearch.js';
20
25
  export * from './github/history.js';
21
- export * from './github/queryBuilders.js';
26
+ export { getOwnerQualifier } from './github/queryBuilders/base.js';
27
+ export { buildCodeSearchQuery, buildRepoSearchQuery, } from './github/queryBuilders/codeAndRepo.js';
28
+ export { buildPullRequestSearchQuery, shouldUseSearchForPRs, } from './github/queryBuilders/pullRequests.js';
29
+ export { buildIssueSearchQuery, shouldUseSearchForIssues, type IssueSearchParams, } from './github/queryBuilders/issues.js';
22
30
  export * from './github/repoSearch.js';
23
- export * from './github/repoStructure.js';
31
+ export { viewGitHubRepositoryStructureAPI } from './github/repoStructure/fetchOrchestration.js';
24
32
  export * from './github/repoStructurePagination.js';
25
33
  export * from './github/repoStructureRecursive.js';
26
34
  export * from './github/responseHeaders.js';
@@ -40,6 +48,8 @@ export * from './cacheMaintenance.js';
40
48
  export * from './session.js';
41
49
  export * from './tools/executionGuard.js';
42
50
  export * from './tools/github_clone_repo/cache.js';
51
+ export { cleanupStaleMaterializationArtifacts, tryRecoverStaleCloneLock, writeCloneLockMeta, } from './tools/github_clone_repo/cacheArtifacts.js';
52
+ export { getCloneBaseDir, getTreeBaseDir, getCloneDir, getTreeDir, } from './tools/github_clone_repo/cachePaths.js';
43
53
  export * from './tools/github_clone_repo/cloneRepo.js';
44
54
  export * from './tools/github_clone_repo/execution.js';
45
55
  export * from './tools/github_clone_repo/scheme.js';
@@ -66,25 +76,35 @@ export * from './tools/local_analyze_graph/scheme.js';
66
76
  export * from './tools/local_search/execution.js';
67
77
  export * from './tools/local_search/scheme.js';
68
78
  export * from './tools/lsp/semantic_content/execution.js';
69
- export * from './tools/lsp/semantic_content/index.js';
70
79
  export * from './tools/lsp/semantic_content/scheme.js';
71
80
  export * from './tools/lsp/shared/callHierarchyTraversal.js';
72
81
  export * from './tools/lsp/shared/resolveSymbolAnchor.js';
73
82
  export * from './tools/lsp/shared/semanticTypes.js';
74
83
  export * from './tools/package_search/execution.js';
84
+ export { foldKeywords, isPackageNotFoundError, } from './tools/package_search/queryHelpers.js';
85
+ export { buildPackagePagination } from './tools/package_search/pagination.js';
75
86
  export * from './tools/package_search/scheme.js';
76
87
  export * from './tools/providerExecution.js';
77
- export * from './tools/providerMappers.js';
88
+ export * from './tools/providerMappers/codeSearch.js';
89
+ export * from './tools/providerMappers/repoSearch.js';
90
+ export * from './tools/providerMappers/pullRequests.js';
91
+ export * from './tools/providerMappers/fileContent.js';
92
+ export * from './tools/providerMappers/repoStructure.js';
78
93
  export * from './tools/toolConfig.js';
79
94
  export type { ToolConfig, ToolDirectExecutionConfig, ToolDirectSecurity, } from './tools/toolCatalogFactory.js';
80
- export * from './tools/toolMetadata/baseSchema.js';
81
- export * from './tools/toolMetadata/descriptions.js';
95
+ export { baseSchemaDescriptions } from './toolContract/input/resources/global.js';
96
+ export { PUBLIC_TOOL_DESCRIPTIONS } from './toolContract/descriptions.js';
82
97
  export * from './tools/toolMetadata/metadataPresence.js';
83
98
  export * from './tools/toolMetadata/names.js';
84
- export * from './tools/toolMetadata/proxies.js';
85
99
  export * from './tools/toolMetadata/state.js';
86
100
  export * from './tools/toolMetadata/types.js';
87
- export * from './tools/directToolCatalog.js';
101
+ export * from './tools/directToolCatalog/toolCatalogDefinitions.js';
102
+ export * from './tools/directToolCatalog/toolCatalogFormatters.js';
103
+ export * from './tools/directToolCatalog/toolSchemaIntrospection.js';
104
+ export * from './tools/directToolCatalog/toolCommandPatterns.js';
105
+ export * from './tools/directToolCatalog/toolInputPreparation.js';
106
+ export * from './tools/directToolCatalog/toolSchemaRelations.js';
107
+ export { executeDirectTool } from './tools/directToolCatalog.exec.js';
88
108
  export * from './tools/toolNames.js';
89
109
  export * from './tools/utils.js';
90
110
  export * from './types/bulk.js';
@@ -103,16 +123,23 @@ export * from './utils/core/safeRegex.js';
103
123
  export * from './utils/environment/environmentDetection.js';
104
124
  export * from './utils/exec/npm.js';
105
125
  export * from './utils/exec/safe.js';
106
- export * from './utils/exec/spawn.js';
126
+ export * from './utils/exec/spawn/env.js';
127
+ export * from './utils/exec/spawn/wrappers.js';
107
128
  export * from './utils/file/byteOffset.js';
108
- export * from './utils/file/filters.js';
129
+ export { DISCOVERY_IGNORED_FILE_EXTENSIONS, DISCOVERY_IGNORED_FILE_NAMES, DISCOVERY_IGNORED_FOLDER_NAMES, getDiscoveryExtension, shouldIgnoreDiscoveryDir, shouldIgnoreDiscoveryFile, } from '@octocodeai/octocode-engine/security';
130
+ export type { DiscoveryExtensionOptions } from '@octocodeai/octocode-engine/security';
109
131
  export * from './utils/file/size.js';
110
132
  export * from './utils/file/toolHelpers.js';
111
- export * from './utils/http/cache.js';
133
+ export * from './utils/http/cache/key.js';
134
+ export * from './utils/http/cache/dataCache.js';
135
+ export * from './utils/http/cache/conditional.js';
136
+ export * from './utils/http/cache/management.js';
137
+ export * from './utils/http/cache/diskStore.js';
112
138
  export * from './utils/http/circuitBreaker.js';
113
139
  export * from './utils/http/fetch.js';
114
140
  export * from './utils/package/common.js';
115
- export * from './utils/package/npm.js';
141
+ export { getNpmRegistryUrl, checkNpmRegistryReachable, } from './utils/package/npm/npmRegistry.js';
142
+ export { isExactPackageName, searchNpmPackage, checkNpmDeprecation, } from './utils/package/npm/npmDeprecation.js';
116
143
  export * from './utils/package/schemas.js';
117
144
  export * from './utils/package/types.js';
118
145
  export * from './utils/pagination/boundary.js';
@@ -122,7 +149,8 @@ export * from './utils/pagination/hints.js';
122
149
  export * from './utils/pagination/types.js';
123
150
  export * from './utils/parsers/diff.js';
124
151
  export * from './utils/parsers/schemas.js';
125
- export * from './utils/response/bulk.js';
152
+ export { computeQueryTimeout } from './utils/response/bulk/queries.js';
153
+ export { executeBulkOperation } from './utils/response/bulk/response.js';
126
154
  export * from './utils/response/callToolResult.js';
127
155
  export * from './utils/response/normalizedError.js';
128
156
  export * from './utils/response/charSavings.js';
@@ -132,8 +160,7 @@ export * from './utils/response/pathRelativize.js';
132
160
  export type { GitHubPullRequestItem, Repository } from './github/githubAPI.js';
133
161
  export { isGitHubAPIError, isGitHubAPISuccess, isRepository, } from './github/githubAPI.js';
134
162
  export type { ProviderType, ProviderConfig, ProviderCapabilities, ProviderResponse, ICodeHostProvider, } from './providers/types.js';
135
- export type { CodeSearchQuery, FileContentQuery, RepoSearchQuery, PullRequestQuery, RepoStructureQuery, } from './providers/types.js';
136
- export type { UnifiedRepository, CodeSearchItem, CodeSearchResult, FileContentResult, RepoSearchResult, PullRequestSearchResult, RepoStructureResult, } from './providers/types.js';
163
+ export type { UnifiedRepository, CodeSearchItem, CodeSearchResult, FileContentResult, RepoSearchResult, PullRequestSearchResult, RepoStructureResult, } from './providers/providerResults.js';
137
164
  export { isProviderSuccess, isProviderError } from './providers/types.js';
138
165
  export type { GitHubAPIError, GitHubAPISuccess, OptimizedCodeSearchResult, DiffEntry, PullRequestSimple, GitHubPullRequestsSearchParams, ContentDirectoryEntry, CodeSearchResultItem, RepoSearchResultItem, IssueSearchResultItem, IssueComment, PRReviewInfo, CommitFileInfo, CommitInfo, PRCommentItem, GetContentParameters, SearchCodeParameters, SearchCodeResponse, SearchReposParameters, GitHubAPIResponse, } from './github/githubAPI.js';
139
166
  export { summarizeEntries, paginateEntries, buildEntryPaginationHints, buildWalkWarnings, } from './tools/local_view_structure/structureResponse.js';