@octocodeai/octocode-tools-core 16.6.0 → 16.6.3

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 (69) hide show
  1. package/README.md +179 -249
  2. package/dist/direct.js +37 -35
  3. package/dist/errors/localToolErrors.d.ts +1 -0
  4. package/dist/github/pullRequestSearch.d.ts +1 -0
  5. package/dist/index.d.ts +6 -4
  6. package/dist/index.js +39 -44
  7. package/dist/oql/adapters/graphProof.d.ts +6 -0
  8. package/dist/oql/adapters/graphView.d.ts +28 -0
  9. package/dist/oql/adapters/local.d.ts +1 -0
  10. package/dist/oql/adapters/resultMap.d.ts +7 -0
  11. package/dist/oql/adapters/runner.d.ts +7 -0
  12. package/dist/oql/envelope.d.ts +2 -0
  13. package/dist/oql/index.d.ts +2 -1
  14. package/dist/oql/index.js +37 -34
  15. package/dist/oql/schema.d.ts +24 -8
  16. package/dist/oql/schemeText.d.ts +27 -10
  17. package/dist/oql/transformers/github/common.d.ts +7 -1
  18. package/dist/oql/types.d.ts +19 -2
  19. package/dist/responses.d.ts +4 -35
  20. package/dist/schema.d.ts +1 -1
  21. package/dist/schema.js +2 -1
  22. package/dist/scheme/pagination.d.ts +51 -0
  23. package/dist/scheme/responseEnvelope.d.ts +67 -1
  24. package/dist/shared/config/index.d.ts +1 -8
  25. package/dist/shared/config/index.js +1 -2
  26. package/dist/shared/credentials/index.d.ts +1 -1
  27. package/dist/shared/credentials/index.js +2 -1
  28. package/dist/shared/credentials/storage.d.ts +0 -2
  29. package/dist/shared/credentials/testing.js +1 -1
  30. package/dist/shared/credentials/types.d.ts +1 -1
  31. package/dist/shared/paths.d.ts +6 -1
  32. package/dist/shared/paths.js +1 -1
  33. package/dist/shared/session/index.js +1 -1
  34. package/dist/tools/directToolCatalog.exec.d.ts +5 -0
  35. package/dist/tools/directToolCatalog.meta.d.ts +1 -0
  36. package/dist/tools/github_clone_repo/scheme.d.ts +0 -1
  37. package/dist/tools/github_fetch_content/scheme.d.ts +6 -89
  38. package/dist/tools/github_search_code/scheme.d.ts +4 -6
  39. package/dist/tools/github_search_pull_requests/scheme.d.ts +0 -1
  40. package/dist/tools/github_search_repos/execution.d.ts +58 -0
  41. package/dist/tools/github_search_repos/scheme.d.ts +3 -6
  42. package/dist/tools/github_view_repo_structure/scheme.d.ts +0 -1
  43. package/dist/tools/local_binary_inspect/binaryInspector.d.ts +0 -4
  44. package/dist/tools/local_binary_inspect/scheme.d.ts +97 -0
  45. package/dist/tools/local_fetch_content/scheme.d.ts +66 -0
  46. package/dist/tools/local_find_files/scheme.d.ts +49 -0
  47. package/dist/tools/local_ripgrep/scheme.d.ts +75 -0
  48. package/dist/tools/local_view_structure/scheme.d.ts +52 -0
  49. package/dist/tools/lsp/semantic_content/scheme.d.ts +8 -22
  50. package/dist/tools/lsp/shared/readiness.d.ts +17 -0
  51. package/dist/tools/lsp/shared/semanticTypes.d.ts +2 -2
  52. package/dist/tools/package_search/execution.d.ts +23 -0
  53. package/dist/tools/package_search/scheme.d.ts +10 -4
  54. package/dist/tools/toolNames.d.ts +2 -1
  55. package/dist/types/server.d.ts +1 -1
  56. package/dist/utils/response/bulk.d.ts +1 -0
  57. package/dist/utils/response/groupedFinalizer.d.ts +7 -2
  58. package/package.json +7 -3
  59. package/dist/oql/adapters/v2.d.ts +0 -32
  60. package/dist/oql/v2params.d.ts +0 -22
  61. package/dist/shared/config/defaults.d.ts +0 -14
  62. package/dist/shared/config/loader.d.ts +0 -7
  63. package/dist/shared/config/resolver.d.ts +0 -2
  64. package/dist/shared/config/resolverCache.d.ts +0 -12
  65. package/dist/shared/config/resolverSections.d.ts +0 -10
  66. package/dist/shared/config/runtimeSurface.d.ts +0 -21
  67. package/dist/shared/config/types.d.ts +0 -92
  68. package/dist/shared/config/validator.d.ts +0 -2
  69. package/dist/shared/credentials/envTokens.d.ts +0 -9
@@ -1,21 +0,0 @@
1
- /**
2
- * Which interface is driving the shared tool core right now.
3
- *
4
- * Some config defaults differ by surface (see `resolveLocal`):
5
- * - `cli`: `ENABLE_LOCAL` is IGNORED — local tools are always enabled (the CLI
6
- * is a local-first interface); clone defaults to ENABLED.
7
- * - `mcp`: `ENABLE_LOCAL` is honored and defaults to DISABLED; clone defaults
8
- * to DISABLED.
9
- *
10
- * Defaults to `mcp`, the primary consumer. The CLI binary calls
11
- * `setRuntimeSurface('cli')` at startup before any tool runs.
12
- *
13
- * State lives on `globalThis` (not a module-level variable) so a single shared
14
- * value is seen even when bundlers (esbuild) inline this module more than once
15
- * across different package subpath entry points (`/config`, `/direct`, …).
16
- */
17
- export type RuntimeSurface = 'cli' | 'mcp';
18
- export declare function setRuntimeSurface(surface: RuntimeSurface): void;
19
- export declare function getRuntimeSurface(): RuntimeSurface;
20
- /** Test helper: restore the default surface. */
21
- export declare function _resetRuntimeSurface(): void;
@@ -1,92 +0,0 @@
1
- export declare const CONFIG_SCHEMA_VERSION = 1;
2
- export declare const CONFIG_FILE_NAME = ".octocoderc";
3
- export interface GitHubConfigOptions {
4
- apiUrl?: string;
5
- }
6
- export interface LocalConfigOptions {
7
- enabled?: boolean;
8
- enableClone?: boolean;
9
- allowedPaths?: string[];
10
- workspaceRoot?: string;
11
- }
12
- export interface ToolsConfigOptions {
13
- enabled?: string[] | null;
14
- enableAdditional?: string[] | null;
15
- disabled?: string[] | null;
16
- }
17
- export interface NetworkConfigOptions {
18
- timeout?: number;
19
- maxRetries?: number;
20
- }
21
- export interface LspConfigOptions {
22
- configPath?: string;
23
- }
24
- export interface OutputPaginationConfigOptions {
25
- defaultCharLength?: number;
26
- }
27
- export type MinifyMode = 'none' | 'standard' | 'symbols';
28
- export interface OutputConfigOptions {
29
- format?: 'yaml' | 'json';
30
- pagination?: OutputPaginationConfigOptions;
31
- }
32
- export interface OctocodeConfig {
33
- $schema?: string;
34
- version?: number;
35
- github?: GitHubConfigOptions;
36
- local?: LocalConfigOptions;
37
- tools?: ToolsConfigOptions;
38
- network?: NetworkConfigOptions;
39
- lsp?: LspConfigOptions;
40
- output?: OutputConfigOptions;
41
- }
42
- export interface RequiredGitHubConfig {
43
- apiUrl: string;
44
- }
45
- export interface RequiredLocalConfig {
46
- enabled: boolean;
47
- enableClone: boolean;
48
- allowedPaths: string[];
49
- workspaceRoot: string | undefined;
50
- }
51
- export interface RequiredToolsConfig {
52
- enabled: string[] | null;
53
- enableAdditional: string[] | null;
54
- disabled: string[] | null;
55
- }
56
- export interface RequiredNetworkConfig {
57
- timeout: number;
58
- maxRetries: number;
59
- }
60
- export interface RequiredLspConfig {
61
- configPath: string | undefined;
62
- }
63
- export interface RequiredOutputPaginationConfig {
64
- defaultCharLength: number;
65
- }
66
- export interface RequiredOutputConfig {
67
- format: 'yaml' | 'json';
68
- pagination: RequiredOutputPaginationConfig;
69
- }
70
- export interface ResolvedConfig {
71
- version: number;
72
- github: RequiredGitHubConfig;
73
- local: RequiredLocalConfig;
74
- tools: RequiredToolsConfig;
75
- network: RequiredNetworkConfig;
76
- lsp: RequiredLspConfig;
77
- output: RequiredOutputConfig;
78
- source: 'file' | 'defaults' | 'mixed';
79
- configPath?: string;
80
- }
81
- export interface ValidationResult {
82
- valid: boolean;
83
- errors: string[];
84
- warnings: string[];
85
- config?: OctocodeConfig;
86
- }
87
- export interface LoadConfigResult {
88
- success: boolean;
89
- config?: OctocodeConfig;
90
- error?: string;
91
- path: string;
92
- }
@@ -1,2 +0,0 @@
1
- import type { ValidationResult } from './types.js';
2
- export declare function validateConfig(config: unknown): ValidationResult;
@@ -1,9 +0,0 @@
1
- import type { TokenSource } from './types.js';
2
- export declare const ENV_TOKEN_VARS: readonly ["OCTOCODE_TOKEN", "GH_TOKEN", "GITHUB_TOKEN"];
3
- export declare function getTokenFromEnv(): string | null;
4
- export declare function getEnvTokenSource(): TokenSource;
5
- export declare function hasEnvToken(): boolean;
6
- export declare function resolveEnvToken(): {
7
- token: string;
8
- source: NonNullable<TokenSource>;
9
- } | null;