@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
@@ -1,56 +1,15 @@
1
- import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
- import { z } from 'zod';
3
- export type DirectToolInput = Record<string, unknown> & {
4
- queries: unknown[];
5
- };
6
- export interface DirectToolDefinition {
7
- name: string;
8
- schema: z.ZodType;
9
- inputSchema: z.ZodType;
10
- }
11
- export type DirectToolCategory = 'GitHub' | 'Local' | 'LSP' | 'Package' | 'Other';
12
- export declare const DIRECT_TOOL_CATEGORIES: readonly DirectToolCategory[];
13
- export interface DirectToolDisplayField {
14
- name: string;
15
- required: boolean;
16
- type: string;
17
- /** Numeric bounds and default, e.g. "1-100, default 30" — surfaced inline so
18
- * agents see the full constraint without fetching the raw JSON schema. */
19
- constraints?: string;
20
- description?: string;
21
- }
22
- export interface DirectToolOutputField {
23
- name: string;
24
- type: string;
25
- optional?: boolean;
26
- }
27
- export interface DirectToolMetadata {
28
- tools?: Record<string, {
29
- description?: string;
30
- schema?: Record<string, string>;
31
- }>;
32
- }
33
- export interface PrepareDirectToolInputOptions {
34
- sourceLabel?: string;
35
- onUnknownFields?: (unknownFields: string[], queryIndex: number) => void;
36
- }
37
- export declare class DirectToolInputError extends Error {
38
- readonly details: string[];
39
- constructor(message: string, details?: string[]);
40
- }
41
- export declare const DIRECT_TOOL_DEFINITIONS: DirectToolDefinition[];
42
- export declare function findDirectToolDefinition(name: string): DirectToolDefinition | undefined;
43
- export declare function getDirectToolCategory(toolName: string): DirectToolCategory;
44
- export declare function sortDirectToolNames(toolNames: string[]): string[];
45
- export declare function formatDirectToolSchemaText(toolName: string): string;
46
- export declare function formatDirectToolMetadataSchemaText(schema: Record<string, string> | undefined): string;
47
- export declare function getDirectToolAutoFilledFields(toolName: string): string[];
48
- export declare function getDirectToolOutputFields(): DirectToolOutputField[];
49
- export declare function formatDirectToolOutputSchemaText(): string;
50
- export declare function getDirectToolDescription(toolName: string, metadata?: DirectToolMetadata | null): string;
51
- export declare function getDirectToolDisplayFields(toolName: string): DirectToolDisplayField[];
52
- export declare function buildDirectToolExampleQuery(toolName: string): Record<string, unknown>;
53
- export declare function prepareDirectToolInputFromJsonText(toolName: string, inputText: string | undefined, options?: PrepareDirectToolInputOptions): DirectToolInput | null;
54
- export declare function prepareDirectToolInput(toolName: string, rawPayload: unknown, options?: PrepareDirectToolInputOptions): DirectToolInput;
55
- export declare function formatDirectToolValidationIssues(error: z.ZodError): string[];
56
- export declare function executeDirectTool(name: string, input: unknown): Promise<CallToolResult>;
1
+ /**
2
+ * Direct-tool catalog barrel (P3). The catalog is split so the schema/help path
3
+ * never loads the native engine:
4
+ * - `directToolCatalog.meta.ts` — engine-free definitions, schema text,
5
+ * display fields, input preparation (also exposed via the `/schema` subpath).
6
+ * - `directToolCatalog.exec.ts` — `executeDirectTool` + the engine/runtime.
7
+ *
8
+ * This barrel preserves the historical `@octocodeai/octocode-tools-core/direct`
9
+ * surface (meta + executeDirectTool). Importing it still eagerly loads the engine
10
+ * (via the exec module) — execution consumers want that. Pure schema/help/
11
+ * `--scheme`/`context` callers must import from `/schema` (meta only) instead, so
12
+ * they run on engine-less runtimes.
13
+ */
14
+ export * from './directToolCatalog.meta.js';
15
+ export { executeDirectTool } from './directToolCatalog.exec.js';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Direct-tool EXECUTION path (P3). This module imports the engine (native LSP
3
+ * client pool) and every tool's execution function via `ALL_TOOLS`, so it is the
4
+ * one that loads the native `.node` addon at eval. It is reached only when a tool
5
+ * actually runs — schema/help/`--scheme`/`context` use `directToolCatalog.meta.ts`
6
+ * (and the `@octocodeai/octocode-tools-core/schema` subpath), which is engine-free.
7
+ */
8
+ import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
9
+ import { DirectToolInputError } from './directToolCatalog.meta.js';
10
+ export declare function executeDirectTool(name: string, input: unknown): Promise<CallToolResult>;
11
+ export { DirectToolInputError };
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Engine-free direct-tool catalog metadata (P3).
3
+ *
4
+ * This module holds EVERYTHING the schema/help/`--scheme`/`context` paths need
5
+ * — tool definitions (name + display/bulk zod schemas), schema-text formatters,
6
+ * display-field extraction, example builders, and input preparation — WITHOUT
7
+ * importing `@octocodeai/octocode-engine` (no native `.node` load at module
8
+ * eval). The schemas are sourced from each tool's engine-free `scheme.ts`, the
9
+ * same modules `toolConfig.ts` consumes, so the two cannot drift on shape (a
10
+ * drift test asserts name/schema parity against the runtime `ALL_TOOLS`).
11
+ *
12
+ * The execution path (`executeDirectTool`) lives in `directToolCatalog.exec.ts`,
13
+ * which DOES import the engine; it is only reached when a tool actually runs.
14
+ * The `@octocodeai/octocode-tools-core/schema` subpath re-exports only this
15
+ * module so engine-less runtimes (e.g. Codex.app Node) can read schemas.
16
+ */
17
+ import { z } from 'zod';
18
+ export type DirectToolInput = Record<string, unknown> & {
19
+ queries: unknown[];
20
+ };
21
+ export interface DirectToolDefinition {
22
+ name: string;
23
+ schema: z.ZodType;
24
+ inputSchema: z.ZodType;
25
+ }
26
+ export type DirectToolCategory = 'GitHub' | 'Local Code' | 'Package' | 'Other';
27
+ export declare const DIRECT_TOOL_CATEGORIES: readonly DirectToolCategory[];
28
+ export interface DirectToolDisplayField {
29
+ name: string;
30
+ required: boolean;
31
+ type: string;
32
+ /** Numeric bounds and default, e.g. "1-100, default 30" — surfaced inline so
33
+ * agents see the full constraint without fetching the raw JSON schema. */
34
+ constraints?: string;
35
+ description?: string;
36
+ }
37
+ export interface DirectToolCommandPattern {
38
+ label: string;
39
+ query: Record<string, unknown>;
40
+ command: string;
41
+ }
42
+ export interface DirectToolOutputField {
43
+ name: string;
44
+ type: string;
45
+ optional?: boolean;
46
+ }
47
+ export interface DirectToolMetadata {
48
+ tools?: Record<string, {
49
+ description?: string;
50
+ schema?: Record<string, string>;
51
+ }>;
52
+ }
53
+ export interface PrepareDirectToolInputOptions {
54
+ sourceLabel?: string;
55
+ onUnknownFields?: (unknownFields: string[], queryIndex: number) => void;
56
+ }
57
+ export declare class DirectToolInputError extends Error {
58
+ readonly details: string[];
59
+ constructor(message: string, details?: string[]);
60
+ }
61
+ /**
62
+ * Engine-free tool definitions (name + display/bulk schema). Order mirrors
63
+ * `ALL_TOOLS` in `toolConfig.ts`; each schema is the SAME object that
64
+ * `toolConfig` attaches an executionFn to. Kept in lockstep by a drift test.
65
+ */
66
+ export declare const DIRECT_TOOL_DEFINITIONS: DirectToolDefinition[];
67
+ export declare function findDirectToolDefinition(name: string): DirectToolDefinition | undefined;
68
+ export declare function getDirectToolCategory(toolName: string): DirectToolCategory;
69
+ export declare function sortDirectToolNames(toolNames: string[]): string[];
70
+ export declare function formatDirectToolSchemaText(toolName: string): string;
71
+ export declare function formatDirectToolMetadataSchemaText(schema: Record<string, string> | undefined): string;
72
+ export declare function getDirectToolAutoFilledFields(toolName: string): string[];
73
+ export declare function getDirectToolOutputFields(): DirectToolOutputField[];
74
+ export declare function formatDirectToolOutputSchemaText(): string;
75
+ export declare function getDirectToolDescription(toolName: string, metadata?: DirectToolMetadata | null): string;
76
+ export declare function getDirectToolDisplayFields(toolName: string): DirectToolDisplayField[];
77
+ export declare function formatDirectToolCommandPattern(toolName: string, query: Record<string, unknown>): string;
78
+ export declare function buildDirectToolCommandPatterns(toolName: string): DirectToolCommandPattern[];
79
+ export declare function buildDirectToolExampleQuery(toolName: string): Record<string, unknown>;
80
+ export declare function prepareDirectToolInputFromJsonText(toolName: string, inputText: string | undefined, options?: PrepareDirectToolInputOptions): DirectToolInput | null;
81
+ export declare function prepareDirectToolInput(toolName: string, rawPayload: unknown, options?: PrepareDirectToolInputOptions): DirectToolInput;
82
+ export declare function formatDirectToolValidationIssues(error: z.ZodError): string[];
@@ -16,7 +16,7 @@ export declare function isCacheHit(cloneDir: string): {
16
16
  export declare function getCacheTTL(): number;
17
17
  export declare function getMaxCacheSizeBytes(): number;
18
18
  export declare function getMaxCloneCount(): number;
19
- export declare function createCacheMeta(owner: string, repo: string, branch: string, source: CacheSource, sparsePath?: string, sizeBytes?: number): CloneCacheMeta;
19
+ export declare function createCacheMeta(owner: string, repo: string, branch: string, source: CacheSource, sparsePath?: string, sizeBytes?: number, commitSha?: string): CloneCacheMeta;
20
20
  export declare function ensureCloneParentDir(cloneDir: string): void;
21
21
  export declare function removeCloneDir(cloneDir: string): void;
22
22
  export declare function evictExpiredClones(octocodeDir: string): number;
@@ -5,6 +5,8 @@ export interface CloneCacheMeta {
5
5
  owner: string;
6
6
  repo: string;
7
7
  branch: string;
8
+ /** HEAD commit SHA at the time this entry was written. Absent on legacy entries. */
9
+ commitSha?: string;
8
10
  sparsePath?: string;
9
11
  source: CacheSource;
10
12
  sizeBytes?: number;
@@ -104,6 +104,26 @@ export declare const GitHubFetchContentOutputLocalSchema: z.ZodObject<{
104
104
  repoRoot: z.ZodOptional<z.ZodString>;
105
105
  fileCount: z.ZodNumber;
106
106
  totalSize: z.ZodNumber;
107
+ complete: z.ZodOptional<z.ZodBoolean>;
108
+ directoryEntryCount: z.ZodOptional<z.ZodNumber>;
109
+ eligibleFileCount: z.ZodOptional<z.ZodNumber>;
110
+ savedFileCount: z.ZodOptional<z.ZodNumber>;
111
+ skipped: z.ZodOptional<z.ZodObject<{
112
+ nonFile: z.ZodNumber;
113
+ missingDownloadUrl: z.ZodNumber;
114
+ oversized: z.ZodNumber;
115
+ binary: z.ZodNumber;
116
+ fileLimit: z.ZodNumber;
117
+ fetchFailed: z.ZodNumber;
118
+ totalSizeLimit: z.ZodNumber;
119
+ pathTraversal: z.ZodNumber;
120
+ }, z.core.$strip>>;
121
+ limits: z.ZodOptional<z.ZodObject<{
122
+ maxDirectoryFiles: z.ZodNumber;
123
+ maxTotalSize: z.ZodNumber;
124
+ maxFileSize: z.ZodNumber;
125
+ }, z.core.$strip>>;
126
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
107
127
  files: z.ZodOptional<z.ZodArray<z.ZodObject<{
108
128
  path: z.ZodString;
109
129
  size: z.ZodNumber;
@@ -112,6 +132,90 @@ export declare const GitHubFetchContentOutputLocalSchema: z.ZodObject<{
112
132
  cached: z.ZodOptional<z.ZodBoolean>;
113
133
  resolvedBranch: z.ZodOptional<z.ZodString>;
114
134
  }, z.core.$strip>>>;
135
+ data: z.ZodOptional<z.ZodObject<{
136
+ owner: z.ZodString;
137
+ repo: z.ZodString;
138
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
139
+ path: z.ZodString;
140
+ content: z.ZodString;
141
+ localPath: z.ZodOptional<z.ZodString>;
142
+ repoRoot: z.ZodOptional<z.ZodString>;
143
+ contentView: z.ZodOptional<z.ZodEnum<{
144
+ none: "none";
145
+ standard: "standard";
146
+ symbols: "symbols";
147
+ }>>;
148
+ isSkeleton: z.ZodOptional<z.ZodBoolean>;
149
+ totalLines: z.ZodOptional<z.ZodNumber>;
150
+ sourceChars: z.ZodOptional<z.ZodNumber>;
151
+ sourceBytes: z.ZodOptional<z.ZodNumber>;
152
+ resolvedBranch: z.ZodOptional<z.ZodString>;
153
+ pagination: z.ZodOptional<z.ZodObject<{
154
+ currentPage: z.ZodNumber;
155
+ totalPages: z.ZodNumber;
156
+ hasMore: z.ZodBoolean;
157
+ nextPage: z.ZodOptional<z.ZodNumber>;
158
+ nextMatchPage: z.ZodOptional<z.ZodNumber>;
159
+ charOffset: z.ZodOptional<z.ZodNumber>;
160
+ charLength: z.ZodOptional<z.ZodNumber>;
161
+ totalChars: z.ZodOptional<z.ZodNumber>;
162
+ nextCharOffset: z.ZodOptional<z.ZodNumber>;
163
+ filesPerPage: z.ZodOptional<z.ZodNumber>;
164
+ totalFiles: z.ZodOptional<z.ZodNumber>;
165
+ entriesPerPage: z.ZodOptional<z.ZodNumber>;
166
+ totalEntries: z.ZodOptional<z.ZodNumber>;
167
+ matchesPerPage: z.ZodOptional<z.ZodNumber>;
168
+ totalMatches: z.ZodOptional<z.ZodNumber>;
169
+ }, z.core.$strip>>;
170
+ isPartial: z.ZodOptional<z.ZodBoolean>;
171
+ startLine: z.ZodOptional<z.ZodNumber>;
172
+ endLine: z.ZodOptional<z.ZodNumber>;
173
+ matchRanges: z.ZodOptional<z.ZodArray<z.ZodObject<{
174
+ start: z.ZodNumber;
175
+ end: z.ZodNumber;
176
+ }, z.core.$strip>>>;
177
+ lastModified: z.ZodOptional<z.ZodString>;
178
+ lastModifiedBy: z.ZodOptional<z.ZodString>;
179
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
180
+ matchNotFound: z.ZodOptional<z.ZodBoolean>;
181
+ searchedFor: z.ZodOptional<z.ZodString>;
182
+ cached: z.ZodOptional<z.ZodBoolean>;
183
+ }, z.core.$strip>>>;
184
+ directories: z.ZodOptional<z.ZodArray<z.ZodObject<{
185
+ path: z.ZodString;
186
+ localPath: z.ZodString;
187
+ repoRoot: z.ZodOptional<z.ZodString>;
188
+ fileCount: z.ZodNumber;
189
+ totalSize: z.ZodNumber;
190
+ complete: z.ZodOptional<z.ZodBoolean>;
191
+ directoryEntryCount: z.ZodOptional<z.ZodNumber>;
192
+ eligibleFileCount: z.ZodOptional<z.ZodNumber>;
193
+ savedFileCount: z.ZodOptional<z.ZodNumber>;
194
+ skipped: z.ZodOptional<z.ZodObject<{
195
+ nonFile: z.ZodNumber;
196
+ missingDownloadUrl: z.ZodNumber;
197
+ oversized: z.ZodNumber;
198
+ binary: z.ZodNumber;
199
+ fileLimit: z.ZodNumber;
200
+ fetchFailed: z.ZodNumber;
201
+ totalSizeLimit: z.ZodNumber;
202
+ pathTraversal: z.ZodNumber;
203
+ }, z.core.$strip>>;
204
+ limits: z.ZodOptional<z.ZodObject<{
205
+ maxDirectoryFiles: z.ZodNumber;
206
+ maxTotalSize: z.ZodNumber;
207
+ maxFileSize: z.ZodNumber;
208
+ }, z.core.$strip>>;
209
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
210
+ files: z.ZodOptional<z.ZodArray<z.ZodObject<{
211
+ path: z.ZodString;
212
+ size: z.ZodNumber;
213
+ type: z.ZodString;
214
+ }, z.core.$strip>>>;
215
+ cached: z.ZodOptional<z.ZodBoolean>;
216
+ resolvedBranch: z.ZodOptional<z.ZodString>;
217
+ }, z.core.$strip>>>;
218
+ }, z.core.$strip>>;
115
219
  }, z.core.$strip>>;
116
220
  errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
117
221
  id: z.ZodString;
@@ -57,6 +57,33 @@ export interface DirectoryFetchResult {
57
57
  }>;
58
58
  fileCount: number;
59
59
  totalSize: number;
60
+ /** true = no files were skipped by size/type/limit/error */
61
+ complete: boolean;
62
+ /** true = completeness was proven against the remote tree (fresh fetch + complete) */
63
+ verified: boolean;
64
+ /** HEAD commit SHA at the time of fetch; absent on cache hits from legacy entries */
65
+ commitSha?: string;
66
+ /** true when nonFile > 0 — subdirectory entries were present but not fetched; use ghCloneRepo for full coverage */
67
+ hasSubdirectories?: boolean;
68
+ directoryEntryCount: number;
69
+ eligibleFileCount: number;
70
+ savedFileCount: number;
71
+ skipped: {
72
+ nonFile: number;
73
+ missingDownloadUrl: number;
74
+ oversized: number;
75
+ binary: number;
76
+ fileLimit: number;
77
+ fetchFailed: number;
78
+ totalSizeLimit: number;
79
+ pathTraversal: number;
80
+ };
81
+ limits: {
82
+ maxDirectoryFiles: number;
83
+ maxTotalSize: number;
84
+ maxFileSize: number;
85
+ };
86
+ warnings?: string[];
60
87
  cached: boolean;
61
88
  expiresAt: string;
62
89
  owner: string;
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const LspGetSemanticsQueryDisplaySchema: z.ZodObject<{
3
- uri: z.ZodString;
3
+ uri: z.ZodOptional<z.ZodString>;
4
4
  type: z.ZodDefault<z.ZodEnum<{
5
5
  definition: "definition";
6
6
  references: "references";
@@ -11,6 +11,10 @@ export declare const LspGetSemanticsQueryDisplaySchema: z.ZodObject<{
11
11
  documentSymbols: "documentSymbols";
12
12
  typeDefinition: "typeDefinition";
13
13
  implementation: "implementation";
14
+ workspaceSymbol: "workspaceSymbol";
15
+ supertypes: "supertypes";
16
+ subtypes: "subtypes";
17
+ diagnostic: "diagnostic";
14
18
  }>>;
15
19
  symbolName: z.ZodOptional<z.ZodString>;
16
20
  lineHint: z.ZodOptional<z.ZodNumber>;
@@ -32,7 +36,7 @@ export declare const LspGetSemanticsQueryDisplaySchema: z.ZodObject<{
32
36
  reasoning: z.ZodOptional<z.ZodString>;
33
37
  }, z.core.$strip>;
34
38
  export declare const LspGetSemanticsQuerySchema: z.ZodObject<{
35
- uri: z.ZodString;
39
+ uri: z.ZodOptional<z.ZodString>;
36
40
  type: z.ZodDefault<z.ZodEnum<{
37
41
  definition: "definition";
38
42
  references: "references";
@@ -43,6 +47,10 @@ export declare const LspGetSemanticsQuerySchema: z.ZodObject<{
43
47
  documentSymbols: "documentSymbols";
44
48
  typeDefinition: "typeDefinition";
45
49
  implementation: "implementation";
50
+ workspaceSymbol: "workspaceSymbol";
51
+ supertypes: "supertypes";
52
+ subtypes: "subtypes";
53
+ diagnostic: "diagnostic";
46
54
  }>>;
47
55
  symbolName: z.ZodOptional<z.ZodString>;
48
56
  lineHint: z.ZodOptional<z.ZodNumber>;
@@ -156,6 +164,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
156
164
  noReferences: "noReferences";
157
165
  noHover: "noHover";
158
166
  noCalls: "noCalls";
167
+ noWorkspaceSymbols: "noWorkspaceSymbols";
168
+ noTypeHierarchy: "noTypeHierarchy";
169
+ noDiagnostics: "noDiagnostics";
159
170
  }>;
160
171
  reason: z.ZodString;
161
172
  }, z.core.$strip>>;
@@ -215,6 +226,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
215
226
  noReferences: "noReferences";
216
227
  noHover: "noHover";
217
228
  noCalls: "noCalls";
229
+ noWorkspaceSymbols: "noWorkspaceSymbols";
230
+ noTypeHierarchy: "noTypeHierarchy";
231
+ noDiagnostics: "noDiagnostics";
218
232
  }>;
219
233
  reason: z.ZodString;
220
234
  }, z.core.$strip>>;
@@ -255,6 +269,77 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
255
269
  noReferences: "noReferences";
256
270
  noHover: "noHover";
257
271
  noCalls: "noCalls";
272
+ noWorkspaceSymbols: "noWorkspaceSymbols";
273
+ noTypeHierarchy: "noTypeHierarchy";
274
+ noDiagnostics: "noDiagnostics";
275
+ }>;
276
+ reason: z.ZodString;
277
+ }, z.core.$strip>>;
278
+ }, z.core.$strip>, z.ZodObject<{
279
+ kind: z.ZodLiteral<"workspaceSymbol">;
280
+ query: z.ZodString;
281
+ symbols: z.ZodArray<z.ZodUnknown>;
282
+ totalSymbols: z.ZodNumber;
283
+ empty: z.ZodOptional<z.ZodObject<{
284
+ category: z.ZodEnum<{
285
+ serverUnavailable: "serverUnavailable";
286
+ unsupportedOperation: "unsupportedOperation";
287
+ symbolNotFound: "symbolNotFound";
288
+ anchorFailed: "anchorFailed";
289
+ noLocations: "noLocations";
290
+ noReferences: "noReferences";
291
+ noHover: "noHover";
292
+ noCalls: "noCalls";
293
+ noWorkspaceSymbols: "noWorkspaceSymbols";
294
+ noTypeHierarchy: "noTypeHierarchy";
295
+ noDiagnostics: "noDiagnostics";
296
+ }>;
297
+ reason: z.ZodString;
298
+ }, z.core.$strip>>;
299
+ }, z.core.$strip>, z.ZodObject<{
300
+ kind: z.ZodLiteral<"typeHierarchy">;
301
+ direction: z.ZodEnum<{
302
+ supertypes: "supertypes";
303
+ subtypes: "subtypes";
304
+ }>;
305
+ root: z.ZodOptional<z.ZodUnknown>;
306
+ items: z.ZodArray<z.ZodUnknown>;
307
+ totalItems: z.ZodNumber;
308
+ empty: z.ZodOptional<z.ZodObject<{
309
+ category: z.ZodEnum<{
310
+ serverUnavailable: "serverUnavailable";
311
+ unsupportedOperation: "unsupportedOperation";
312
+ symbolNotFound: "symbolNotFound";
313
+ anchorFailed: "anchorFailed";
314
+ noLocations: "noLocations";
315
+ noReferences: "noReferences";
316
+ noHover: "noHover";
317
+ noCalls: "noCalls";
318
+ noWorkspaceSymbols: "noWorkspaceSymbols";
319
+ noTypeHierarchy: "noTypeHierarchy";
320
+ noDiagnostics: "noDiagnostics";
321
+ }>;
322
+ reason: z.ZodString;
323
+ }, z.core.$strip>>;
324
+ }, z.core.$strip>, z.ZodObject<{
325
+ kind: z.ZodLiteral<"diagnostic">;
326
+ diagnostics: z.ZodArray<z.ZodUnknown>;
327
+ totalDiagnostics: z.ZodNumber;
328
+ errorCount: z.ZodNumber;
329
+ warningCount: z.ZodNumber;
330
+ empty: z.ZodOptional<z.ZodObject<{
331
+ category: z.ZodEnum<{
332
+ serverUnavailable: "serverUnavailable";
333
+ unsupportedOperation: "unsupportedOperation";
334
+ symbolNotFound: "symbolNotFound";
335
+ anchorFailed: "anchorFailed";
336
+ noLocations: "noLocations";
337
+ noReferences: "noReferences";
338
+ noHover: "noHover";
339
+ noCalls: "noCalls";
340
+ noWorkspaceSymbols: "noWorkspaceSymbols";
341
+ noTypeHierarchy: "noTypeHierarchy";
342
+ noDiagnostics: "noDiagnostics";
258
343
  }>;
259
344
  reason: z.ZodString;
260
345
  }, z.core.$strip>>;
@@ -269,6 +354,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
269
354
  noReferences: "noReferences";
270
355
  noHover: "noHover";
271
356
  noCalls: "noCalls";
357
+ noWorkspaceSymbols: "noWorkspaceSymbols";
358
+ noTypeHierarchy: "noTypeHierarchy";
359
+ noDiagnostics: "noDiagnostics";
272
360
  }>;
273
361
  reason: z.ZodString;
274
362
  }, z.core.$strip>], "kind">;
@@ -374,6 +462,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
374
462
  noReferences: "noReferences";
375
463
  noHover: "noHover";
376
464
  noCalls: "noCalls";
465
+ noWorkspaceSymbols: "noWorkspaceSymbols";
466
+ noTypeHierarchy: "noTypeHierarchy";
467
+ noDiagnostics: "noDiagnostics";
377
468
  }>;
378
469
  reason: z.ZodString;
379
470
  }, z.core.$strip>>;
@@ -433,6 +524,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
433
524
  noReferences: "noReferences";
434
525
  noHover: "noHover";
435
526
  noCalls: "noCalls";
527
+ noWorkspaceSymbols: "noWorkspaceSymbols";
528
+ noTypeHierarchy: "noTypeHierarchy";
529
+ noDiagnostics: "noDiagnostics";
436
530
  }>;
437
531
  reason: z.ZodString;
438
532
  }, z.core.$strip>>;
@@ -473,6 +567,77 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
473
567
  noReferences: "noReferences";
474
568
  noHover: "noHover";
475
569
  noCalls: "noCalls";
570
+ noWorkspaceSymbols: "noWorkspaceSymbols";
571
+ noTypeHierarchy: "noTypeHierarchy";
572
+ noDiagnostics: "noDiagnostics";
573
+ }>;
574
+ reason: z.ZodString;
575
+ }, z.core.$strip>>;
576
+ }, z.core.$strip>, z.ZodObject<{
577
+ kind: z.ZodLiteral<"workspaceSymbol">;
578
+ query: z.ZodString;
579
+ symbols: z.ZodArray<z.ZodUnknown>;
580
+ totalSymbols: z.ZodNumber;
581
+ empty: z.ZodOptional<z.ZodObject<{
582
+ category: z.ZodEnum<{
583
+ serverUnavailable: "serverUnavailable";
584
+ unsupportedOperation: "unsupportedOperation";
585
+ symbolNotFound: "symbolNotFound";
586
+ anchorFailed: "anchorFailed";
587
+ noLocations: "noLocations";
588
+ noReferences: "noReferences";
589
+ noHover: "noHover";
590
+ noCalls: "noCalls";
591
+ noWorkspaceSymbols: "noWorkspaceSymbols";
592
+ noTypeHierarchy: "noTypeHierarchy";
593
+ noDiagnostics: "noDiagnostics";
594
+ }>;
595
+ reason: z.ZodString;
596
+ }, z.core.$strip>>;
597
+ }, z.core.$strip>, z.ZodObject<{
598
+ kind: z.ZodLiteral<"typeHierarchy">;
599
+ direction: z.ZodEnum<{
600
+ supertypes: "supertypes";
601
+ subtypes: "subtypes";
602
+ }>;
603
+ root: z.ZodOptional<z.ZodUnknown>;
604
+ items: z.ZodArray<z.ZodUnknown>;
605
+ totalItems: z.ZodNumber;
606
+ empty: z.ZodOptional<z.ZodObject<{
607
+ category: z.ZodEnum<{
608
+ serverUnavailable: "serverUnavailable";
609
+ unsupportedOperation: "unsupportedOperation";
610
+ symbolNotFound: "symbolNotFound";
611
+ anchorFailed: "anchorFailed";
612
+ noLocations: "noLocations";
613
+ noReferences: "noReferences";
614
+ noHover: "noHover";
615
+ noCalls: "noCalls";
616
+ noWorkspaceSymbols: "noWorkspaceSymbols";
617
+ noTypeHierarchy: "noTypeHierarchy";
618
+ noDiagnostics: "noDiagnostics";
619
+ }>;
620
+ reason: z.ZodString;
621
+ }, z.core.$strip>>;
622
+ }, z.core.$strip>, z.ZodObject<{
623
+ kind: z.ZodLiteral<"diagnostic">;
624
+ diagnostics: z.ZodArray<z.ZodUnknown>;
625
+ totalDiagnostics: z.ZodNumber;
626
+ errorCount: z.ZodNumber;
627
+ warningCount: z.ZodNumber;
628
+ empty: z.ZodOptional<z.ZodObject<{
629
+ category: z.ZodEnum<{
630
+ serverUnavailable: "serverUnavailable";
631
+ unsupportedOperation: "unsupportedOperation";
632
+ symbolNotFound: "symbolNotFound";
633
+ anchorFailed: "anchorFailed";
634
+ noLocations: "noLocations";
635
+ noReferences: "noReferences";
636
+ noHover: "noHover";
637
+ noCalls: "noCalls";
638
+ noWorkspaceSymbols: "noWorkspaceSymbols";
639
+ noTypeHierarchy: "noTypeHierarchy";
640
+ noDiagnostics: "noDiagnostics";
476
641
  }>;
477
642
  reason: z.ZodString;
478
643
  }, z.core.$strip>>;
@@ -487,6 +652,9 @@ export declare const LspGetSemanticsOutputSchema: z.ZodObject<{
487
652
  noReferences: "noReferences";
488
653
  noHover: "noHover";
489
654
  noCalls: "noCalls";
655
+ noWorkspaceSymbols: "noWorkspaceSymbols";
656
+ noTypeHierarchy: "noTypeHierarchy";
657
+ noDiagnostics: "noDiagnostics";
490
658
  }>;
491
659
  reason: z.ZodString;
492
660
  }, z.core.$strip>], "kind">;
@@ -1,4 +1,4 @@
1
- import type { LspGetSemanticsQuery, ResolvedSymbol } from './semanticTypes.js';
1
+ import type { DocumentSymbolsSemanticQuery, SymbolAnchoredSemanticQuery, ResolvedSymbol } from './semanticTypes.js';
2
2
  export type FileAnchor = {
3
3
  uri: string;
4
4
  absolutePath: string;
@@ -17,4 +17,4 @@ export type AnchorResolutionResult<T> = {
17
17
  export declare function resolveFileAnchor(query: {
18
18
  uri?: string;
19
19
  }, toolName: string): Promise<AnchorResolutionResult<FileAnchor>>;
20
- export declare function resolveSymbolAnchor(query: LspGetSemanticsQuery, toolName: string): Promise<AnchorResolutionResult<SymbolAnchor>>;
20
+ export declare function resolveSymbolAnchor(query: SymbolAnchoredSemanticQuery | DocumentSymbolsSemanticQuery, toolName: string): Promise<AnchorResolutionResult<SymbolAnchor>>;