@octocodeai/octocode-tools-core 16.3.0 → 16.6.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 (181) hide show
  1. package/README.md +564 -0
  2. package/dist/config.d.ts +7 -0
  3. package/dist/direct.js +39 -41
  4. package/dist/errors/pathUtils.d.ts +1 -1
  5. package/dist/github/directoryFetch.d.ts +2 -1
  6. package/dist/github/githubAPI.d.ts +32 -1
  7. package/dist/github/history.d.ts +3 -0
  8. package/dist/github/prTransformation.d.ts +1 -1
  9. package/dist/github/repoStructureRecursive.d.ts +6 -0
  10. package/dist/index.d.ts +16 -30
  11. package/dist/index.js +44 -46
  12. package/dist/oql/adapters/compile.d.ts +25 -0
  13. package/dist/oql/adapters/github.d.ts +3 -0
  14. package/dist/oql/adapters/local.d.ts +7 -0
  15. package/dist/oql/adapters/materialize.d.ts +11 -0
  16. package/dist/oql/adapters/pagination.d.ts +21 -0
  17. package/dist/oql/adapters/researchTargets.d.ts +50 -0
  18. package/dist/oql/adapters/resultMap.d.ts +20 -0
  19. package/dist/oql/adapters/ruleYaml.d.ts +11 -0
  20. package/dist/oql/adapters/runner.d.ts +14 -0
  21. package/dist/oql/adapters/v2.d.ts +32 -0
  22. package/dist/oql/capabilities.d.ts +31 -0
  23. package/dist/oql/defaults.d.ts +26 -0
  24. package/dist/oql/diagnostics.d.ts +25 -0
  25. package/dist/oql/diffLanes.d.ts +29 -0
  26. package/dist/oql/envelope.d.ts +19 -0
  27. package/dist/oql/features.d.ts +7 -0
  28. package/dist/oql/index.d.ts +26 -0
  29. package/dist/oql/index.js +49 -0
  30. package/dist/oql/normalize.d.ts +5 -0
  31. package/dist/oql/planner.d.ts +7 -0
  32. package/dist/oql/research/analyze.d.ts +134 -0
  33. package/dist/oql/research/packets.d.ts +80 -0
  34. package/dist/oql/run.d.ts +32 -0
  35. package/dist/oql/schema.d.ts +1018 -0
  36. package/dist/oql/schemeText.d.ts +138 -0
  37. package/dist/oql/shorthand.d.ts +177 -0
  38. package/dist/oql/targetParams.d.ts +20 -0
  39. package/dist/oql/transformers/contract.d.ts +19 -0
  40. package/dist/oql/transformers/github/code.d.ts +17 -0
  41. package/dist/oql/transformers/github/common.d.ts +8 -0
  42. package/dist/oql/transformers/language.d.ts +1 -0
  43. package/dist/oql/transformers/registry.d.ts +16 -0
  44. package/dist/oql/transformers/types.d.ts +11 -0
  45. package/dist/oql/types.d.ts +633 -0
  46. package/dist/oql/v2params.d.ts +22 -0
  47. package/dist/providers/providerQueries.d.ts +9 -0
  48. package/dist/providers/providerResults.d.ts +2 -0
  49. package/dist/providers/types.d.ts +1 -1
  50. package/dist/schema.d.ts +13 -0
  51. package/dist/schema.js +8 -0
  52. package/dist/scheme/coreSchemas.d.ts +5 -5
  53. package/dist/scheme/fields.d.ts +6 -6
  54. package/dist/serverConfig.d.ts +1 -2
  55. package/dist/session.d.ts +2 -24
  56. package/dist/shared/config/defaults.d.ts +14 -0
  57. package/dist/shared/config/index.d.ts +9 -0
  58. package/dist/shared/config/index.js +9 -0
  59. package/dist/shared/config/loader.d.ts +7 -0
  60. package/dist/shared/config/resolver.d.ts +2 -0
  61. package/dist/shared/config/resolverCache.d.ts +12 -0
  62. package/dist/shared/config/resolverSections.d.ts +10 -0
  63. package/dist/shared/config/runtimeSurface.d.ts +21 -0
  64. package/dist/shared/config/schemas.d.ts +11 -0
  65. package/dist/shared/config/types.d.ts +92 -0
  66. package/dist/shared/config/validator.d.ts +2 -0
  67. package/dist/shared/credentials/constants.d.ts +2 -0
  68. package/dist/shared/credentials/credentialCache.d.ts +13 -0
  69. package/dist/shared/credentials/credentialEncryption.d.ts +10 -0
  70. package/dist/shared/credentials/credentialUtils.d.ts +4 -0
  71. package/dist/shared/credentials/envTokens.d.ts +9 -0
  72. package/dist/shared/credentials/ghCli.d.ts +1 -0
  73. package/dist/shared/credentials/index.d.ts +3 -0
  74. package/dist/shared/credentials/index.js +8 -0
  75. package/dist/shared/credentials/schemas.d.ts +22 -0
  76. package/dist/shared/credentials/storage.d.ts +30 -0
  77. package/dist/shared/credentials/testing.d.ts +2 -0
  78. package/dist/shared/credentials/testing.js +8 -0
  79. package/dist/shared/credentials/tokenRefresh.d.ts +24 -0
  80. package/dist/shared/credentials/tokenResolution.d.ts +30 -0
  81. package/dist/shared/credentials/types.d.ts +28 -0
  82. package/dist/shared/fs-utils.d.ts +2 -0
  83. package/dist/shared/fs-utils.js +8 -0
  84. package/dist/shared/index.d.ts +6 -0
  85. package/dist/shared/languageSelectors.d.ts +23 -0
  86. package/dist/shared/paths.d.ts +31 -0
  87. package/dist/shared/paths.js +8 -0
  88. package/dist/shared/platform/index.d.ts +1 -0
  89. package/dist/shared/platform/index.js +8 -0
  90. package/dist/shared/platform/platform.d.ts +8 -0
  91. package/dist/shared/session/index.d.ts +5 -0
  92. package/dist/shared/session/index.js +8 -0
  93. package/dist/shared/session/schemas.d.ts +103 -0
  94. package/dist/shared/session/sessionCache.d.ts +9 -0
  95. package/dist/shared/session/sessionDiskIO.d.ts +6 -0
  96. package/dist/shared/session/statsDefaults.d.ts +4 -0
  97. package/dist/shared/session/storage.d.ts +20 -0
  98. package/dist/shared/session/types.d.ts +53 -0
  99. package/dist/tools/directToolCatalog.d.ts +15 -56
  100. package/dist/tools/directToolCatalog.exec.d.ts +11 -0
  101. package/dist/tools/directToolCatalog.meta.d.ts +82 -0
  102. package/dist/tools/github_clone_repo/cache.d.ts +5 -1
  103. package/dist/tools/github_clone_repo/scheme.d.ts +56 -9
  104. package/dist/tools/github_clone_repo/types.d.ts +3 -1
  105. package/dist/tools/github_fetch_content/scheme.d.ts +112 -4
  106. package/dist/tools/github_fetch_content/types.d.ts +39 -0
  107. package/dist/tools/github_search_code/scheme.d.ts +6 -6
  108. package/dist/tools/github_search_pull_requests/contentResponse.d.ts +0 -1
  109. package/dist/tools/github_search_pull_requests/execution.d.ts +1 -11
  110. package/dist/tools/github_search_pull_requests/scheme.d.ts +6 -2
  111. package/dist/tools/github_search_repos/scheme.d.ts +7 -6
  112. package/dist/tools/github_view_repo_structure/execution.d.ts +0 -9
  113. package/dist/tools/github_view_repo_structure/scheme.d.ts +10 -6
  114. package/dist/tools/local_binary_inspect/archiveOps.d.ts +2 -0
  115. package/dist/tools/local_binary_inspect/binaryInspector.d.ts +48 -7
  116. package/dist/tools/local_binary_inspect/binaryOps.d.ts +16 -7
  117. package/dist/tools/local_binary_inspect/scheme.d.ts +10 -7
  118. package/dist/tools/local_fetch_content/scheme.d.ts +2 -2
  119. package/dist/tools/local_find_files/scheme.d.ts +2 -2
  120. package/dist/tools/local_ripgrep/lspBoost.d.ts +54 -0
  121. package/dist/tools/local_ripgrep/rankingProfile.d.ts +113 -0
  122. package/dist/tools/local_ripgrep/ripgrepResultBuilder.d.ts +10 -1
  123. package/dist/tools/local_ripgrep/scheme.d.ts +29 -4
  124. package/dist/tools/local_ripgrep/structuralSearch.d.ts +3 -4
  125. package/dist/tools/local_view_structure/scheme.d.ts +2 -2
  126. package/dist/tools/local_view_structure/structureFilters.d.ts +1 -3
  127. package/dist/tools/local_view_structure/structureResponse.d.ts +1 -0
  128. package/dist/tools/lsp/semantic_content/scheme.d.ts +174 -10
  129. package/dist/tools/lsp/shared/callHierarchyTraversal.d.ts +2 -2
  130. package/dist/tools/lsp/shared/resolveSymbolAnchor.d.ts +2 -2
  131. package/dist/tools/lsp/shared/semanticTypes.d.ts +36 -6
  132. package/dist/tools/oql_search/execution.d.ts +7 -0
  133. package/dist/tools/package_search/execution.d.ts +10 -0
  134. package/dist/tools/package_search/scheme.d.ts +9 -7
  135. package/dist/tools/providerMappers.d.ts +24 -5
  136. package/dist/tools/toolConfig.d.ts +1 -0
  137. package/dist/tools/toolMetadata/proxies.d.ts +0 -6
  138. package/dist/tools/toolNames.d.ts +2 -0
  139. package/dist/tools/utils.d.ts +3 -7
  140. package/dist/types/bulk.d.ts +0 -2
  141. package/dist/types/execution.d.ts +1 -2
  142. package/dist/types/server.d.ts +0 -1
  143. package/dist/types/session.d.ts +0 -19
  144. package/dist/types/toolResults.d.ts +2 -3
  145. package/dist/utils/contextUtils.d.ts +49 -2
  146. package/dist/utils/core/lines.d.ts +16 -0
  147. package/dist/utils/core/types.d.ts +12 -1
  148. package/dist/utils/file/filters.d.ts +2 -11
  149. package/dist/utils/markdownOutline.d.ts +10 -0
  150. package/dist/utils/parsers/diff.d.ts +18 -0
  151. package/dist/utils/response/error.d.ts +38 -4
  152. package/dist/utils/response/groupedFinalizer.d.ts +0 -25
  153. package/package.json +51 -14
  154. package/dist/commands/BaseCommandBuilder.d.ts +0 -14
  155. package/dist/commands/FindCommandBuilder.d.ts +0 -23
  156. package/dist/commands/LsCommandBuilder.d.ts +0 -15
  157. package/dist/commands/RipgrepCommandBuilder.d.ts +0 -27
  158. package/dist/hints/dynamic.d.ts +0 -6
  159. package/dist/hints/index.d.ts +0 -2
  160. package/dist/hints/types.d.ts +0 -1
  161. package/dist/tools/github_clone_repo/hints.d.ts +0 -2
  162. package/dist/tools/github_fetch_content/hints.d.ts +0 -2
  163. package/dist/tools/github_search_code/hints.d.ts +0 -2
  164. package/dist/tools/github_search_pull_requests/hints.d.ts +0 -2
  165. package/dist/tools/github_search_repos/hints.d.ts +0 -2
  166. package/dist/tools/github_view_repo_structure/hints.d.ts +0 -2
  167. package/dist/tools/local_fetch_content/hints.d.ts +0 -2
  168. package/dist/tools/local_find_files/hints.d.ts +0 -2
  169. package/dist/tools/local_ripgrep/grepFallbackExecutor.d.ts +0 -3
  170. package/dist/tools/local_ripgrep/hints.d.ts +0 -2
  171. package/dist/tools/local_ripgrep/ripgrepParser.d.ts +0 -9
  172. package/dist/tools/local_view_structure/hints.d.ts +0 -2
  173. package/dist/tools/local_view_structure/structureParser.d.ts +0 -3
  174. package/dist/tools/local_view_structure/structureWalker.d.ts +0 -24
  175. package/dist/tools/lsp/semantic_content/hints.d.ts +0 -4
  176. package/dist/tools/package_search/hints.d.ts +0 -2
  177. package/dist/types/metadata.d.ts +0 -69
  178. package/dist/utils/exec/commandAvailability.d.ts +0 -19
  179. package/dist/utils/exec/ripgrepBinary.d.ts +0 -3
  180. package/dist/utils/pagination/outputSizeLimit.d.ts +0 -16
  181. package/dist/utils/response/structuredPagination.d.ts +0 -9
@@ -1,69 +0,0 @@
1
- export type HintStatus = 'empty' | 'error';
2
- export interface HintContext {
3
- fileSize?: number;
4
- resultSize?: number;
5
- tokenEstimate?: number;
6
- entryCount?: number;
7
- matchCount?: number;
8
- fileCount?: number;
9
- isLarge?: boolean;
10
- errorType?: 'size_limit' | 'not_found' | 'directory' | 'permission' | 'pattern_too_broad' | 'symbol_not_found' | 'file_not_found' | 'timeout' | 'not_a_function' | 'rate_limit' | 'lsp_unavailable';
11
- originalError?: string;
12
- status?: number;
13
- isRateLimited?: boolean;
14
- retryAfter?: number;
15
- rateLimitRemaining?: number;
16
- hasPattern?: boolean;
17
- hasPagination?: boolean;
18
- path?: string;
19
- hasOwnerRepo?: boolean;
20
- match?: 'file' | 'path';
21
- searchEngine?: 'rg' | 'grep';
22
- wasFilteredToEmpty?: boolean;
23
- hasConfigFiles?: boolean;
24
- owner?: string;
25
- repo?: string;
26
- branch?: string;
27
- extension?: string;
28
- filename?: string;
29
- keywords?: string[];
30
- state?: string;
31
- author?: string;
32
- query?: string;
33
- prNumber?: number;
34
- locationCount?: number;
35
- hasExternalPackage?: boolean;
36
- isFallback?: boolean;
37
- searchRadius?: number;
38
- lineHint?: number;
39
- symbolName?: string;
40
- uri?: string;
41
- hasMultipleFiles?: boolean;
42
- hasMorePages?: boolean;
43
- currentPage?: number;
44
- totalPages?: number;
45
- direction?: 'incoming' | 'outgoing';
46
- callCount?: number;
47
- depth?: number;
48
- hasMoreContent?: boolean;
49
- isPartial?: boolean;
50
- endLine?: number;
51
- totalLines?: number;
52
- nextCharOffset?: number;
53
- totalChars?: number;
54
- filteredAll?: boolean;
55
- matchedPaths?: string[];
56
- totalMatches?: number;
57
- hasMore?: boolean;
58
- flagFiles?: string[];
59
- language?: string;
60
- topic?: string;
61
- prMatch?: string[];
62
- type?: string;
63
- }
64
- type HintGenerator = (context: HintContext) => (string | undefined)[];
65
- export interface ToolHintGenerators {
66
- empty: HintGenerator;
67
- error: HintGenerator;
68
- }
69
- export {};
@@ -1,19 +0,0 @@
1
- interface CommandAvailabilityResult {
2
- available: boolean;
3
- command: string;
4
- version?: string;
5
- error?: string;
6
- }
7
- export declare const REQUIRED_COMMANDS: {
8
- readonly rg: {
9
- readonly name: "ripgrep";
10
- readonly versionFlag: "--version";
11
- readonly tool: "localSearchCode";
12
- };
13
- };
14
- type CommandName = keyof typeof REQUIRED_COMMANDS;
15
- export declare function checkCommandAvailability(command: CommandName, forceCheck?: boolean): Promise<CommandAvailabilityResult>;
16
- export declare function checkAllCommandsAvailability(): Promise<Map<CommandName, CommandAvailabilityResult>>;
17
- export declare function getMissingCommandError(command: CommandName): string;
18
- export declare function clearAvailabilityCache(): void;
19
- export {};
@@ -1,3 +0,0 @@
1
- export declare function resolveRipgrepBinary(): string;
2
- export declare function allowRipgrepCommandName(binaryPath: string): void;
3
- export declare function resolveRgFromPath(): string | null;
@@ -1,16 +0,0 @@
1
- import type { PaginationInfo } from '../../types/toolResults.js';
2
- interface OutputSizeLimitOptions {
3
- charOffset?: number;
4
- charLength?: number;
5
- maxOutputChars?: number;
6
- recommendedCharLength?: number;
7
- }
8
- interface OutputSizeLimitResult {
9
- content: string;
10
- wasLimited: boolean;
11
- pagination?: PaginationInfo;
12
- warnings: string[];
13
- paginationHints: string[];
14
- }
15
- export declare function applyOutputSizeLimit(content: string, options: OutputSizeLimitOptions): OutputSizeLimitResult;
16
- export {};
@@ -1,9 +0,0 @@
1
- import type { BulkToolResponse } from '../../types/bulk.js';
2
- import type { FlatQueryResult } from '../../types/toolResults.js';
3
- interface PaginationRequest {
4
- offset?: number;
5
- length?: number;
6
- }
7
- export declare function applyQueryOutputPagination(queryResult: FlatQueryResult, originalQuery: Record<string, unknown>, toolName: string): FlatQueryResult;
8
- export declare function applyBulkResponsePagination(response: BulkToolResponse, request: PaginationRequest, toolName: string): BulkToolResponse;
9
- export {};