@octocodeai/octocode-tools-core 16.5.1 → 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 (90) hide show
  1. package/README.md +113 -95
  2. package/dist/direct.js +38 -33
  3. package/dist/github/githubAPI.d.ts +22 -0
  4. package/dist/github/history.d.ts +3 -0
  5. package/dist/github/prTransformation.d.ts +1 -1
  6. package/dist/index.d.ts +6 -8
  7. package/dist/index.js +45 -40
  8. package/dist/oql/adapters/compile.d.ts +25 -0
  9. package/dist/oql/adapters/github.d.ts +3 -0
  10. package/dist/oql/adapters/local.d.ts +7 -0
  11. package/dist/oql/adapters/materialize.d.ts +11 -0
  12. package/dist/oql/adapters/pagination.d.ts +21 -0
  13. package/dist/oql/adapters/researchTargets.d.ts +50 -0
  14. package/dist/oql/adapters/resultMap.d.ts +20 -0
  15. package/dist/oql/adapters/ruleYaml.d.ts +11 -0
  16. package/dist/oql/adapters/runner.d.ts +14 -0
  17. package/dist/oql/adapters/v2.d.ts +32 -0
  18. package/dist/oql/capabilities.d.ts +31 -0
  19. package/dist/oql/defaults.d.ts +26 -0
  20. package/dist/oql/diagnostics.d.ts +25 -0
  21. package/dist/oql/diffLanes.d.ts +29 -0
  22. package/dist/oql/envelope.d.ts +19 -0
  23. package/dist/oql/features.d.ts +7 -0
  24. package/dist/oql/index.d.ts +26 -0
  25. package/dist/oql/index.js +49 -0
  26. package/dist/oql/normalize.d.ts +5 -0
  27. package/dist/oql/planner.d.ts +7 -0
  28. package/dist/oql/research/analyze.d.ts +134 -0
  29. package/dist/oql/research/packets.d.ts +80 -0
  30. package/dist/oql/run.d.ts +32 -0
  31. package/dist/oql/schema.d.ts +1018 -0
  32. package/dist/oql/schemeText.d.ts +138 -0
  33. package/dist/oql/shorthand.d.ts +177 -0
  34. package/dist/oql/targetParams.d.ts +20 -0
  35. package/dist/oql/transformers/contract.d.ts +19 -0
  36. package/dist/oql/transformers/github/code.d.ts +17 -0
  37. package/dist/oql/transformers/github/common.d.ts +8 -0
  38. package/dist/oql/transformers/language.d.ts +1 -0
  39. package/dist/oql/transformers/registry.d.ts +16 -0
  40. package/dist/oql/transformers/types.d.ts +11 -0
  41. package/dist/oql/types.d.ts +633 -0
  42. package/dist/oql/v2params.d.ts +22 -0
  43. package/dist/providers/types.d.ts +1 -1
  44. package/dist/schema.d.ts +13 -0
  45. package/dist/schema.js +8 -0
  46. package/dist/serverConfig.d.ts +0 -1
  47. package/dist/session.d.ts +2 -24
  48. package/dist/shared/config/defaults.d.ts +1 -2
  49. package/dist/shared/config/index.d.ts +2 -3
  50. package/dist/shared/config/index.js +2 -3
  51. package/dist/shared/config/resolverSections.d.ts +1 -3
  52. package/dist/shared/config/runtimeSurface.d.ts +2 -2
  53. package/dist/shared/config/schemas.d.ts +0 -1
  54. package/dist/shared/config/types.d.ts +0 -8
  55. package/dist/shared/credentials/index.js +1 -2
  56. package/dist/shared/index.d.ts +0 -1
  57. package/dist/shared/languageSelectors.d.ts +23 -0
  58. package/dist/shared/paths.d.ts +0 -2
  59. package/dist/shared/paths.js +1 -1
  60. package/dist/shared/session/index.js +1 -2
  61. package/dist/tools/directToolCatalog.d.ts +15 -56
  62. package/dist/tools/directToolCatalog.exec.d.ts +11 -0
  63. package/dist/tools/directToolCatalog.meta.d.ts +82 -0
  64. package/dist/tools/github_clone_repo/cache.d.ts +1 -1
  65. package/dist/tools/github_clone_repo/types.d.ts +2 -0
  66. package/dist/tools/github_fetch_content/scheme.d.ts +104 -0
  67. package/dist/tools/github_fetch_content/types.d.ts +27 -0
  68. package/dist/tools/lsp/semantic_content/scheme.d.ts +170 -2
  69. package/dist/tools/lsp/shared/resolveSymbolAnchor.d.ts +2 -2
  70. package/dist/tools/lsp/shared/semanticTypes.d.ts +34 -5
  71. package/dist/tools/oql_search/execution.d.ts +7 -0
  72. package/dist/tools/package_search/execution.d.ts +10 -0
  73. package/dist/tools/providerMappers.d.ts +7 -7
  74. package/dist/tools/toolConfig.d.ts +1 -0
  75. package/dist/tools/toolNames.d.ts +2 -0
  76. package/dist/types/server.d.ts +0 -1
  77. package/dist/types/session.d.ts +0 -19
  78. package/dist/utils/contextUtils.d.ts +15 -1
  79. package/dist/utils/core/types.d.ts +2 -1
  80. package/dist/utils/markdownOutline.d.ts +10 -0
  81. package/dist/utils/response/groupedFinalizer.d.ts +0 -23
  82. package/package.json +11 -3
  83. package/dist/commands/BaseCommandBuilder.d.ts +0 -14
  84. package/dist/commands/FindCommandBuilder.d.ts +0 -23
  85. package/dist/commands/LsCommandBuilder.d.ts +0 -15
  86. package/dist/shared/logger/index.d.ts +0 -2
  87. package/dist/shared/logger/logger.d.ts +0 -17
  88. package/dist/utils/pagination/outputSizeLimit.d.ts +0 -16
  89. package/dist/utils/ranking/evidenceRanker.d.ts +0 -86
  90. package/dist/utils/response/structuredPagination.d.ts +0 -9
@@ -39,6 +39,13 @@ export interface HistoryCommitFile {
39
39
  additions: number;
40
40
  deletions: number;
41
41
  patch?: string;
42
+ patchPagination?: {
43
+ charOffset: number;
44
+ charLength: number;
45
+ totalChars: number;
46
+ hasMore: boolean;
47
+ nextCharOffset?: number;
48
+ };
42
49
  diff?: DiffPreview;
43
50
  previousFilename?: string;
44
51
  }
@@ -62,9 +69,24 @@ export interface HistoryCommit {
62
69
  deletions?: number;
63
70
  status?: string;
64
71
  patch?: string;
72
+ patchPagination?: {
73
+ charOffset: number;
74
+ charLength: number;
75
+ totalChars: number;
76
+ hasMore: boolean;
77
+ nextCharOffset?: number;
78
+ };
65
79
  diff?: DiffPreview;
66
80
  previousFilename?: string;
67
81
  files?: HistoryCommitFile[];
82
+ filesPagination?: {
83
+ currentPage: number;
84
+ totalPages: number;
85
+ itemsPerPage: number;
86
+ totalFiles: number;
87
+ hasMore: boolean;
88
+ nextFilePage?: number;
89
+ };
68
90
  }
69
91
  export interface HistoryResult {
70
92
  type: 'file' | 'repo';
@@ -11,6 +11,9 @@ export declare function fetchHistory(params: {
11
11
  author?: string;
12
12
  page: number;
13
13
  perPage: number;
14
+ filePage?: number;
15
+ itemsPerPage?: number;
14
16
  includeDiff: boolean;
17
+ charOffset?: number;
15
18
  charLength?: number;
16
19
  }, authInfo?: AuthInfo): Promise<GitHubAPIResponse<HistoryResult>>;
@@ -64,7 +64,7 @@ export declare function formatPRForResponse(pr: GitHubPullRequestItem, options?:
64
64
  reviews: import("./githubAPI.js").PRReviewInfo[];
65
65
  file_changes: {
66
66
  filename: string;
67
- status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged";
67
+ status: "modified" | "unchanged" | "added" | "removed" | "renamed" | "copied" | "changed";
68
68
  additions: number;
69
69
  deletions: number;
70
70
  patch: string;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from './security/bridge.js';
2
- export * from './commands/BaseCommandBuilder.js';
3
2
  export * from './config.js';
4
3
  export * from './errors/domainErrors.js';
5
4
  export * from './errors/errorFactories.js';
@@ -82,6 +81,7 @@ export * from './tools/local_view_structure/execution.js';
82
81
  export * from './tools/local_view_structure/local_view_structure.js';
83
82
  export * from './tools/local_view_structure/scheme.js';
84
83
  export * from './tools/local_view_structure/structureFilters.js';
84
+ export * from './tools/oql_search/execution.js';
85
85
  export * from './tools/lsp/semantic_content/execution.js';
86
86
  export * from './tools/lsp/semantic_content/index.js';
87
87
  export * from './tools/lsp/semantic_content/scheme.js';
@@ -104,6 +104,8 @@ export * from './tools/toolMetadata/types.js';
104
104
  export * from './tools/directToolCatalog.js';
105
105
  export * from './tools/toolNames.js';
106
106
  export * from './tools/utils.js';
107
+ export { OqlSearchInputSchema } from './oql/schema.js';
108
+ export type { OqlSearchInput } from './oql/types.js';
107
109
  export * from './types/bulk.js';
108
110
  export * from './types/execution.js';
109
111
  export * from './types/promise.js';
@@ -136,7 +138,6 @@ export * from './utils/pagination/boundary.js';
136
138
  export * from './utils/pagination/charLimit.js';
137
139
  export * from './utils/pagination/core.js';
138
140
  export * from './utils/pagination/hints.js';
139
- export * from './utils/pagination/outputSizeLimit.js';
140
141
  export * from './utils/pagination/types.js';
141
142
  export * from './utils/parsers/diff.js';
142
143
  export * from './utils/parsers/ripgrep.js';
@@ -147,7 +148,6 @@ export * from './utils/response/charSavings.js';
147
148
  export * from './utils/response/error.js';
148
149
  export * from './utils/response/groupedFinalizer.js';
149
150
  export * from './utils/response/pathRelativize.js';
150
- export * from './utils/response/structuredPagination.js';
151
151
  export type { GitHubPullRequestItem, Repository } from './github/githubAPI.js';
152
152
  export { isGitHubAPIError, isGitHubAPISuccess, isRepository, } from './github/githubAPI.js';
153
153
  export type { ProviderType, ProviderConfig, ProviderCapabilities, ProviderResponse, ICodeHostProvider, } from './providers/types.js';
@@ -165,11 +165,9 @@ export { storeCredentials, getCredentials, getCredentialsSync, deleteCredentials
165
165
  export { isWindows, isMac, isLinux, HOME, getAppDataPath, getLocalAppDataPath, getPlatformName, getArchitecture, } from './shared/platform/index.js';
166
166
  export type { ToolCharSavingsStats, GitHubCacheHitStats, StatsCounterMap, SessionTotalUsageStats, SessionStats, PersistedSession, PersistedStats, SessionUpdateResult, SessionOptions, } from './shared/session/index.js';
167
167
  export { SESSION_FILE, STATS_FILE, getSessionId, getOrCreateSession, updateSessionStats, resetSessionStats, flushSession, flushSessionSync, deleteSession, incrementToolCalls, incrementErrors, incrementRateLimits, incrementRateLimitByProvider, incrementGitHubCacheHits, incrementGitHubCacheRateLimits, incrementPackageRegistryFailures, incrementToolCharSavings, _resetSessionState, } from './shared/session/index.js';
168
- export type { OctocodeConfig, ResolvedConfig, ValidationResult, LoadConfigResult, GitHubConfigOptions, LocalConfigOptions, ToolsConfigOptions, NetworkConfigOptions, TelemetryConfigOptions, LspConfigOptions, OutputConfigOptions, OutputPaginationConfigOptions, RequiredGitHubConfig, RequiredLocalConfig, RequiredToolsConfig, RequiredNetworkConfig, RequiredTelemetryConfig, RequiredLspConfig, RequiredOutputConfig, RequiredOutputPaginationConfig, } from './shared/config/index.js';
169
- export { CONFIG_SCHEMA_VERSION, CONFIG_FILE_NAME, DEFAULT_CONFIG, DEFAULT_GITHUB_CONFIG, DEFAULT_LOCAL_CONFIG, DEFAULT_TOOLS_CONFIG, DEFAULT_NETWORK_CONFIG, DEFAULT_TELEMETRY_CONFIG, DEFAULT_LSP_CONFIG, DEFAULT_OUTPUT_CONFIG, MIN_TIMEOUT, MAX_TIMEOUT, MIN_RETRIES, MAX_RETRIES, MIN_OUTPUT_DEFAULT_CHAR_LENGTH, MAX_OUTPUT_DEFAULT_CHAR_LENGTH, CONFIG_FILE_PATH, loadConfig, loadConfigSync, configExists, getConfigPath, getOctocodeDir, validateConfig, getConfig, getConfigSync, reloadConfig, resolveConfig, resolveConfigSync, invalidateConfigCache, getConfigValue, _resetConfigCache, _getCacheState, parseLoggingEnv, OctocodeConfigSchema, } from './shared/config/index.js';
170
- export { createLogger, setLogHandler, _getLogHandler, } from './shared/logger/index.js';
171
- export type { LogLevel, LogEntry } from './shared/logger/index.js';
172
- export { OCTOCODE_HOME, getDefaultOctocodeHome, paths, ensureHome, ensureTmp, ensureClone, ensureRepos, ensureLogs, ensureTree, ensureBinary, ensureUnzip, } from './shared/paths.js';
168
+ export type { OctocodeConfig, ResolvedConfig, ValidationResult, LoadConfigResult, GitHubConfigOptions, LocalConfigOptions, ToolsConfigOptions, NetworkConfigOptions, LspConfigOptions, OutputConfigOptions, OutputPaginationConfigOptions, RequiredGitHubConfig, RequiredLocalConfig, RequiredToolsConfig, RequiredNetworkConfig, RequiredLspConfig, RequiredOutputConfig, RequiredOutputPaginationConfig, } from './shared/config/index.js';
169
+ export { CONFIG_SCHEMA_VERSION, CONFIG_FILE_NAME, DEFAULT_CONFIG, DEFAULT_GITHUB_CONFIG, DEFAULT_LOCAL_CONFIG, DEFAULT_TOOLS_CONFIG, DEFAULT_NETWORK_CONFIG, DEFAULT_LSP_CONFIG, DEFAULT_OUTPUT_CONFIG, MIN_TIMEOUT, MAX_TIMEOUT, MIN_RETRIES, MAX_RETRIES, MIN_OUTPUT_DEFAULT_CHAR_LENGTH, MAX_OUTPUT_DEFAULT_CHAR_LENGTH, CONFIG_FILE_PATH, loadConfig, loadConfigSync, configExists, getConfigPath, getOctocodeDir, validateConfig, getConfig, getConfigSync, reloadConfig, resolveConfig, resolveConfigSync, invalidateConfigCache, getConfigValue, _resetConfigCache, _getCacheState, OctocodeConfigSchema, } from './shared/config/index.js';
170
+ export { OCTOCODE_HOME, getDefaultOctocodeHome, paths, ensureHome, ensureTmp, ensureClone, ensureRepos, ensureTree, ensureBinary, ensureUnzip, } from './shared/paths.js';
173
171
  export { getDirectorySizeBytes, formatBytes } from './shared/fs-utils.js';
174
172
  export { completeMetadata } from '@octocodeai/octocode-core';
175
173
  export { z } from 'zod';