@octocodeai/octocode-core 0.1.0 → 1.0.1

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 (84) hide show
  1. package/README.md +7 -0
  2. package/dist/configLoader.d.ts +2 -0
  3. package/dist/configLoader.js +1 -0
  4. package/dist/data/compressed.d.ts +0 -1
  5. package/dist/data/compressed.js +1 -4
  6. package/dist/index.d.ts +5 -77
  7. package/dist/index.js +1 -107
  8. package/dist/latest/index.d.ts +0 -1
  9. package/dist/latest/index.js +5 -15418
  10. package/dist/lib/deep-merge.d.ts +0 -1
  11. package/dist/lib/deep-merge.js +1 -36
  12. package/dist/metadata-types/metadata.d.ts +2 -47
  13. package/dist/metadata-types/metadata.js +1 -2
  14. package/dist/schemes/base/baseSchema.d.ts +24 -0
  15. package/dist/schemes/base/baseSchema.js +1 -0
  16. package/dist/schemes/helpers/githubSchemaHelpers.d.ts +158 -0
  17. package/dist/schemes/helpers/githubSchemaHelpers.js +1 -0
  18. package/dist/schemes/helpers/localSchemaHelpers.d.ts +164 -0
  19. package/dist/schemes/helpers/localSchemaHelpers.js +1 -0
  20. package/dist/schemes/helpers/lspSchemaBuilders.d.ts +20 -0
  21. package/dist/schemes/helpers/lspSchemaBuilders.js +1 -0
  22. package/dist/schemes/helpers/lspSchemaDescriptions.d.ts +5 -0
  23. package/dist/schemes/helpers/lspSchemaDescriptions.js +1 -0
  24. package/dist/schemes/helpers/lspSchemaHelpers.d.ts +52 -0
  25. package/dist/schemes/helpers/lspSchemaHelpers.js +1 -0
  26. package/dist/schemes/helpers/schemaHelperFactory.d.ts +3 -0
  27. package/dist/schemes/helpers/schemaHelperFactory.js +1 -0
  28. package/dist/schemes/index.d.ts +25 -0
  29. package/dist/schemes/index.js +1 -0
  30. package/dist/schemes/input/githubCloneRepo.d.ts +33 -0
  31. package/dist/schemes/input/githubCloneRepo.js +1 -0
  32. package/dist/schemes/input/githubFetchContent.d.ts +50 -0
  33. package/dist/schemes/input/githubFetchContent.js +1 -0
  34. package/dist/schemes/input/githubSearchCode.d.ts +46 -0
  35. package/dist/schemes/input/githubSearchCode.js +1 -0
  36. package/dist/schemes/input/githubSearchPullRequests.d.ts +140 -0
  37. package/dist/schemes/input/githubSearchPullRequests.js +1 -0
  38. package/dist/schemes/input/githubSearchRepos.d.ts +62 -0
  39. package/dist/schemes/input/githubSearchRepos.js +1 -0
  40. package/dist/schemes/input/githubViewRepoStructure.d.ts +40 -0
  41. package/dist/schemes/input/githubViewRepoStructure.js +1 -0
  42. package/dist/schemes/input/localFindFiles.d.ts +109 -0
  43. package/dist/schemes/input/localFindFiles.js +1 -0
  44. package/dist/schemes/input/localGetFileContent.d.ts +37 -0
  45. package/dist/schemes/input/localGetFileContent.js +1 -0
  46. package/dist/schemes/input/localSearchCode.d.ts +143 -0
  47. package/dist/schemes/input/localSearchCode.js +1 -0
  48. package/dist/schemes/input/localViewStructure.d.ts +65 -0
  49. package/dist/schemes/input/localViewStructure.js +1 -0
  50. package/dist/schemes/input/lspCallHierarchy.d.ts +45 -0
  51. package/dist/schemes/input/lspCallHierarchy.js +1 -0
  52. package/dist/schemes/input/lspFindReferences.d.ts +37 -0
  53. package/dist/schemes/input/lspFindReferences.js +1 -0
  54. package/dist/schemes/input/lspGotoDefinition.d.ts +31 -0
  55. package/dist/schemes/input/lspGotoDefinition.js +1 -0
  56. package/dist/schemes/input/packageSearch.d.ts +79 -0
  57. package/dist/schemes/input/packageSearch.js +1 -0
  58. package/dist/schemes/output/outputSchemas.d.ts +1311 -0
  59. package/dist/schemes/output/outputSchemas.js +1 -0
  60. package/dist/schemes/output/outputTypes.d.ts +66 -0
  61. package/dist/schemes/output/outputTypes.js +1 -0
  62. package/dist/toolMetadata.d.ts +2 -179
  63. package/dist/toolMetadata.js +1 -142
  64. package/dist/types.d.ts +1 -2
  65. package/dist/types.js +1 -5
  66. package/dist/versionLoader.d.ts +1 -5
  67. package/dist/versionLoader.js +1 -179
  68. package/package.json +11 -4
  69. package/dist/data/compressed.d.ts.map +0 -1
  70. package/dist/data/compressed.js.map +0 -1
  71. package/dist/index.d.ts.map +0 -1
  72. package/dist/index.js.map +0 -1
  73. package/dist/latest/index.d.ts.map +0 -1
  74. package/dist/latest/index.js.map +0 -1
  75. package/dist/lib/deep-merge.d.ts.map +0 -1
  76. package/dist/lib/deep-merge.js.map +0 -1
  77. package/dist/metadata-types/metadata.d.ts.map +0 -1
  78. package/dist/metadata-types/metadata.js.map +0 -1
  79. package/dist/toolMetadata.d.ts.map +0 -1
  80. package/dist/toolMetadata.js.map +0 -1
  81. package/dist/types.d.ts.map +0 -1
  82. package/dist/types.js.map +0 -1
  83. package/dist/versionLoader.d.ts.map +0 -1
  84. package/dist/versionLoader.js.map +0 -1
@@ -0,0 +1,143 @@
1
+ import { z } from "zod/v4";
2
+ export declare const LOCAL_RIPGREP_DESCRIPTION: string;
3
+ export declare const RipgrepQuerySchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
+ pattern: z.ZodString;
8
+ path: z.ZodString;
9
+ mode: z.ZodOptional<z.ZodEnum<{
10
+ discovery: "discovery";
11
+ paginated: "paginated";
12
+ detailed: "detailed";
13
+ }>>;
14
+ fixedString: z.ZodOptional<z.ZodBoolean>;
15
+ perlRegex: z.ZodOptional<z.ZodBoolean>;
16
+ smartCase: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
17
+ caseInsensitive: z.ZodOptional<z.ZodBoolean>;
18
+ caseSensitive: z.ZodOptional<z.ZodBoolean>;
19
+ wholeWord: z.ZodOptional<z.ZodBoolean>;
20
+ invertMatch: z.ZodOptional<z.ZodBoolean>;
21
+ type: z.ZodOptional<z.ZodString>;
22
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
24
+ excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
+ noIgnore: z.ZodOptional<z.ZodBoolean>;
26
+ hidden: z.ZodOptional<z.ZodBoolean>;
27
+ followSymlinks: z.ZodOptional<z.ZodBoolean>;
28
+ filesOnly: z.ZodOptional<z.ZodBoolean>;
29
+ filesWithoutMatch: z.ZodOptional<z.ZodBoolean>;
30
+ count: z.ZodOptional<z.ZodBoolean>;
31
+ countMatches: z.ZodOptional<z.ZodBoolean>;
32
+ contextLines: z.ZodOptional<z.ZodNumber>;
33
+ beforeContext: z.ZodOptional<z.ZodNumber>;
34
+ afterContext: z.ZodOptional<z.ZodNumber>;
35
+ matchContentLength: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
36
+ maxMatchesPerFile: z.ZodOptional<z.ZodNumber>;
37
+ maxFiles: z.ZodOptional<z.ZodNumber>;
38
+ filesPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
39
+ filePageNumber: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
40
+ matchesPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
41
+ charOffset: z.ZodOptional<z.ZodNumber>;
42
+ charLength: z.ZodOptional<z.ZodNumber>;
43
+ multiline: z.ZodOptional<z.ZodBoolean>;
44
+ multilineDotall: z.ZodOptional<z.ZodBoolean>;
45
+ binaryFiles: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
46
+ binary: "binary";
47
+ text: "text";
48
+ "without-match": "without-match";
49
+ }>>>;
50
+ includeStats: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
51
+ threads: z.ZodOptional<z.ZodNumber>;
52
+ mmap: z.ZodOptional<z.ZodBoolean>;
53
+ noUnicode: z.ZodOptional<z.ZodBoolean>;
54
+ encoding: z.ZodOptional<z.ZodString>;
55
+ sort: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
56
+ path: "path";
57
+ modified: "modified";
58
+ accessed: "accessed";
59
+ created: "created";
60
+ }>>>;
61
+ sortReverse: z.ZodOptional<z.ZodBoolean>;
62
+ noMessages: z.ZodOptional<z.ZodBoolean>;
63
+ lineRegexp: z.ZodOptional<z.ZodBoolean>;
64
+ passthru: z.ZodOptional<z.ZodBoolean>;
65
+ debug: z.ZodOptional<z.ZodBoolean>;
66
+ showFileLastModified: z.ZodDefault<z.ZodBoolean>;
67
+ }, z.core.$strip>;
68
+ export declare const BulkRipgrepQuerySchema: z.ZodObject<{
69
+ queries: z.ZodArray<z.ZodObject<{
70
+ id: z.ZodString;
71
+ researchGoal: z.ZodString;
72
+ reasoning: z.ZodString;
73
+ pattern: z.ZodString;
74
+ path: z.ZodString;
75
+ mode: z.ZodOptional<z.ZodEnum<{
76
+ discovery: "discovery";
77
+ paginated: "paginated";
78
+ detailed: "detailed";
79
+ }>>;
80
+ fixedString: z.ZodOptional<z.ZodBoolean>;
81
+ perlRegex: z.ZodOptional<z.ZodBoolean>;
82
+ smartCase: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
83
+ caseInsensitive: z.ZodOptional<z.ZodBoolean>;
84
+ caseSensitive: z.ZodOptional<z.ZodBoolean>;
85
+ wholeWord: z.ZodOptional<z.ZodBoolean>;
86
+ invertMatch: z.ZodOptional<z.ZodBoolean>;
87
+ type: z.ZodOptional<z.ZodString>;
88
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
89
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
90
+ excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
91
+ noIgnore: z.ZodOptional<z.ZodBoolean>;
92
+ hidden: z.ZodOptional<z.ZodBoolean>;
93
+ followSymlinks: z.ZodOptional<z.ZodBoolean>;
94
+ filesOnly: z.ZodOptional<z.ZodBoolean>;
95
+ filesWithoutMatch: z.ZodOptional<z.ZodBoolean>;
96
+ count: z.ZodOptional<z.ZodBoolean>;
97
+ countMatches: z.ZodOptional<z.ZodBoolean>;
98
+ contextLines: z.ZodOptional<z.ZodNumber>;
99
+ beforeContext: z.ZodOptional<z.ZodNumber>;
100
+ afterContext: z.ZodOptional<z.ZodNumber>;
101
+ matchContentLength: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
102
+ maxMatchesPerFile: z.ZodOptional<z.ZodNumber>;
103
+ maxFiles: z.ZodOptional<z.ZodNumber>;
104
+ filesPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
105
+ filePageNumber: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
106
+ matchesPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
107
+ charOffset: z.ZodOptional<z.ZodNumber>;
108
+ charLength: z.ZodOptional<z.ZodNumber>;
109
+ multiline: z.ZodOptional<z.ZodBoolean>;
110
+ multilineDotall: z.ZodOptional<z.ZodBoolean>;
111
+ binaryFiles: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
112
+ binary: "binary";
113
+ text: "text";
114
+ "without-match": "without-match";
115
+ }>>>;
116
+ includeStats: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
117
+ threads: z.ZodOptional<z.ZodNumber>;
118
+ mmap: z.ZodOptional<z.ZodBoolean>;
119
+ noUnicode: z.ZodOptional<z.ZodBoolean>;
120
+ encoding: z.ZodOptional<z.ZodString>;
121
+ sort: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
122
+ path: "path";
123
+ modified: "modified";
124
+ accessed: "accessed";
125
+ created: "created";
126
+ }>>>;
127
+ sortReverse: z.ZodOptional<z.ZodBoolean>;
128
+ noMessages: z.ZodOptional<z.ZodBoolean>;
129
+ lineRegexp: z.ZodOptional<z.ZodBoolean>;
130
+ passthru: z.ZodOptional<z.ZodBoolean>;
131
+ debug: z.ZodOptional<z.ZodBoolean>;
132
+ showFileLastModified: z.ZodDefault<z.ZodBoolean>;
133
+ }, z.core.$strip>>;
134
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
135
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
136
+ }, z.core.$strict>;
137
+ export type RipgrepQuery = z.infer<typeof RipgrepQuerySchema>;
138
+ export declare function applyWorkflowMode(query: RipgrepQuery): RipgrepQuery;
139
+ export declare function validateRipgrepQuery(query: RipgrepQuery): {
140
+ isValid: boolean;
141
+ warnings: string[];
142
+ errors: string[];
143
+ };
@@ -0,0 +1 @@
1
+ import{z as e}from"zod/v4";import{BaseQuerySchemaLocal as t,createBulkQuerySchema as i}from"../base/baseSchema.js";import{LOCAL_RIPGREP as n}from"../helpers/localSchemaHelpers.js";import{TOOL_NAMES as o,getToolDescription as a}from"../helpers/schemaHelperFactory.js";export const LOCAL_RIPGREP_DESCRIPTION=a(o.LOCAL_RIPGREP);export const RipgrepQuerySchema=t.extend({pattern:e.string().min(1).max(2e3).describe(n.search.pattern),path:e.string().min(1).max(4096).refine(e=>!e.includes("\0"),{message:"path contains invalid null byte"}).describe(n.search.path),mode:e.enum(["discovery","paginated","detailed"]).optional().describe(n.search.mode),fixedString:e.boolean().optional().describe(n.options.fixedString),perlRegex:e.boolean().optional().describe(n.options.perlRegex),smartCase:e.boolean().optional().default(!0).describe(n.options.smartCase),caseInsensitive:e.boolean().optional().describe(n.options.caseInsensitive),caseSensitive:e.boolean().optional().describe(n.options.caseSensitive),wholeWord:e.boolean().optional().describe(n.options.wholeWord),invertMatch:e.boolean().optional().describe(n.options.invertMatch),type:e.string().optional().describe(n.filters.type),include:e.array(e.string().max(256)).max(100).optional().describe(n.filters.include),exclude:e.array(e.string().max(256)).max(100).optional().describe(n.filters.exclude),excludeDir:e.array(e.string().max(256)).max(100).optional().describe(n.filters.excludeDir),noIgnore:e.boolean().optional().describe(n.filters.noIgnore),hidden:e.boolean().optional().describe(n.filters.hidden),followSymlinks:e.boolean().optional().describe(n.filters.followSymlinks),filesOnly:e.boolean().optional().describe(n.output.filesOnly),filesWithoutMatch:e.boolean().optional().describe(n.output.filesWithoutMatch),count:e.boolean().optional().describe(n.output.count),countMatches:e.boolean().optional().describe(n.output.countMatches),contextLines:e.number().int().min(0).max(50).optional().describe(n.context.contextLines),beforeContext:e.number().int().min(0).max(50).optional().describe(n.context.beforeContext),afterContext:e.number().int().min(0).max(50).optional().describe(n.context.afterContext),matchContentLength:e.number().int().min(1).max(800).optional().default(200).describe(n.context.matchContentLength),maxMatchesPerFile:e.number().int().min(1).max(100).optional().describe(n.pagination.maxMatchesPerFile),maxFiles:e.number().int().min(1).max(1e3).optional().describe(n.pagination.maxFiles),filesPerPage:e.number().int().min(1).max(50).optional().default(10).describe(n.pagination.filesPerPage),filePageNumber:e.number().int().min(1).optional().default(1).describe(n.pagination.filePageNumber),matchesPerPage:e.number().int().min(1).max(100).optional().default(10).describe(n.pagination.matchesPerPage),charOffset:e.number().int().min(0).optional().describe("Character offset for output pagination after file/match pagination has been applied."),charLength:e.number().int().min(1).max(5e4).optional().describe("Character budget for output pagination after file/match pagination has been applied."),multiline:e.boolean().optional().describe(n.options.multiline),multilineDotall:e.boolean().optional().describe(n.options.multilineDotall),binaryFiles:e.enum(["text","without-match","binary"]).optional().default("without-match").describe(n.filters.binaryFiles),includeStats:e.boolean().optional().default(!0).describe(n.output.includeStats),threads:e.number().int().min(1).max(32).optional().describe(n.advanced.threads),mmap:e.boolean().optional().describe(n.advanced.mmap),noUnicode:e.boolean().optional().describe(n.advanced.noUnicode),encoding:e.string().optional().describe(n.advanced.encoding),sort:e.enum(["path","modified","accessed","created"]).optional().default("path").describe(n.advanced.sort),sortReverse:e.boolean().optional().describe(n.advanced.sortReverse),noMessages:e.boolean().optional().describe(n.advanced.noMessages),lineRegexp:e.boolean().optional().describe(n.advanced.lineRegexp),passthru:e.boolean().optional().describe(n.advanced.passthru),debug:e.boolean().optional().describe(n.advanced.debug),showFileLastModified:e.boolean().default(!1).describe(n.advanced.showFileLastModified)});export const BulkRipgrepQuerySchema=i(o.LOCAL_RIPGREP,RipgrepQuerySchema,{maxQueries:5});export function applyWorkflowMode(e){if(!e.mode)return e;const t={};switch(e.mode){case"discovery":t.count=!0,t.smartCase=!0;break;case"paginated":t.filesPerPage=10,t.matchesPerPage=10,t.smartCase=!0;break;case"detailed":t.contextLines=3,t.filesPerPage=10,t.matchesPerPage=20,t.smartCase=!0}return{...t,...e}}export function validateRipgrepQuery(e){const t=[],i=[];if(e.fixedString&&e.perlRegex&&i.push("fixedString and perlRegex are mutually exclusive. Choose one."),e.filesOnly&&e.count&&t.push("filesOnly and count are mutually exclusive. Using filesOnly."),e.filesOnly&&e.filesWithoutMatch&&i.push("filesOnly and filesWithoutMatch are mutually exclusive. Choose one."),e.passthru&&e.filesOnly&&i.push("passthru and filesOnly are mutually exclusive."),e.passthru&&t.push("passthru prints ALL lines from matched files. This can produce very large output. Consider using context lines instead."),e.lineRegexp&&e.wholeWord&&t.push("lineRegexp and wholeWord both specified. lineRegexp takes precedence."),e.invertMatch&&!e.filesWithoutMatch&&t.push("invertMatch inverts at LINE level (shows non-matching lines). Files in results may still contain the pattern on other lines. For FILE-level inversion (files without ANY matches), use filesWithoutMatch=true instead."),[e.caseInsensitive,e.caseSensitive,e.smartCase].filter(Boolean).length>1&&t.push("Multiple case sensitivity modes specified. Priority: caseSensitive > caseInsensitive > smartCase"),e.contextLines&&e.contextLines>2||e.beforeContext&&e.beforeContext>2||e.afterContext&&e.afterContext>2){const i=e.matchContentLength||200;t.push(`Context lines enabled (${e.contextLines||e.beforeContext||e.afterContext} lines). Match values will include context and be truncated to ${i} chars. Use matchesPerPage for pagination.`)}if(e.multiline&&t.push("Multiline mode is memory-intensive and slower. Entire files are loaded into memory. Only use when pattern genuinely spans multiple lines."),e.perlRegex&&!e.noUnicode&&e.multiline&&t.push("PERFORMANCE TIP: For fastest PCRE2 multiline searches on ASCII codebases, consider using noUnicode=true (2-3x faster)."),e.filesOnly||e.count||e.maxMatchesPerFile||e.matchesPerPage||t.push("No output limiting specified. Consider setting maxMatchesPerFile (default: 3) to control output size."),e.include&&e.include.length>1){const i=e.include.every(e=>e.match(/^\*\.[a-zA-Z0-9]+$/)),n=e.include[0];if(i&&n&&!n.includes("{")){const i=e.include.map(e=>e.replace("*.","")).join(",");t.push(`TIP: Consolidate globs for better performance: include=["*.{${i}}"] instead of separate globs.`)}}if(e.include&&!e.type){const i=e.include[0]?.match(/^\*\.([a-z]+)$/)?.[1];i&&["ts","js","py","rust","go","java","cpp","c"].includes(i)&&t.push(`TIP: Use type="${i}" instead of include glob for cleaner syntax.`)}return{isValid:0===i.length,warnings:t,errors:i}}
@@ -0,0 +1,65 @@
1
+ import { z } from "zod/v4";
2
+ export declare const LOCAL_VIEW_STRUCTURE_DESCRIPTION: string;
3
+ export declare const ViewStructureQuerySchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
+ path: z.ZodString;
8
+ details: z.ZodDefault<z.ZodBoolean>;
9
+ hidden: z.ZodDefault<z.ZodBoolean>;
10
+ humanReadable: z.ZodDefault<z.ZodBoolean>;
11
+ sortBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
12
+ time: "time";
13
+ name: "name";
14
+ size: "size";
15
+ extension: "extension";
16
+ }>>>;
17
+ reverse: z.ZodOptional<z.ZodBoolean>;
18
+ entriesPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
19
+ entryPageNumber: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
20
+ pattern: z.ZodOptional<z.ZodString>;
21
+ directoriesOnly: z.ZodOptional<z.ZodBoolean>;
22
+ filesOnly: z.ZodOptional<z.ZodBoolean>;
23
+ extension: z.ZodOptional<z.ZodString>;
24
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
25
+ depth: z.ZodOptional<z.ZodNumber>;
26
+ recursive: z.ZodOptional<z.ZodBoolean>;
27
+ limit: z.ZodOptional<z.ZodNumber>;
28
+ charOffset: z.ZodOptional<z.ZodNumber>;
29
+ charLength: z.ZodOptional<z.ZodNumber>;
30
+ showFileLastModified: z.ZodDefault<z.ZodBoolean>;
31
+ }, z.core.$strip>;
32
+ export type ViewStructureQuery = z.infer<typeof ViewStructureQuerySchema>;
33
+ export declare const BulkViewStructureSchema: z.ZodObject<{
34
+ queries: z.ZodArray<z.ZodObject<{
35
+ id: z.ZodString;
36
+ researchGoal: z.ZodString;
37
+ reasoning: z.ZodString;
38
+ path: z.ZodString;
39
+ details: z.ZodDefault<z.ZodBoolean>;
40
+ hidden: z.ZodDefault<z.ZodBoolean>;
41
+ humanReadable: z.ZodDefault<z.ZodBoolean>;
42
+ sortBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
43
+ time: "time";
44
+ name: "name";
45
+ size: "size";
46
+ extension: "extension";
47
+ }>>>;
48
+ reverse: z.ZodOptional<z.ZodBoolean>;
49
+ entriesPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
50
+ entryPageNumber: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
51
+ pattern: z.ZodOptional<z.ZodString>;
52
+ directoriesOnly: z.ZodOptional<z.ZodBoolean>;
53
+ filesOnly: z.ZodOptional<z.ZodBoolean>;
54
+ extension: z.ZodOptional<z.ZodString>;
55
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
56
+ depth: z.ZodOptional<z.ZodNumber>;
57
+ recursive: z.ZodOptional<z.ZodBoolean>;
58
+ limit: z.ZodOptional<z.ZodNumber>;
59
+ charOffset: z.ZodOptional<z.ZodNumber>;
60
+ charLength: z.ZodOptional<z.ZodNumber>;
61
+ showFileLastModified: z.ZodDefault<z.ZodBoolean>;
62
+ }, z.core.$strip>>;
63
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
64
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
65
+ }, z.core.$strict>;
@@ -0,0 +1 @@
1
+ import{z as e}from"zod/v4";import{BaseQuerySchemaLocal as i,createBulkQuerySchema as t}from"../base/baseSchema.js";import{LOCAL_VIEW_STRUCTURE as n}from"../helpers/localSchemaHelpers.js";import{TOOL_NAMES as o,getToolDescription as r}from"../helpers/schemaHelperFactory.js";export const LOCAL_VIEW_STRUCTURE_DESCRIPTION=r(o.LOCAL_VIEW_STRUCTURE);export const ViewStructureQuerySchema=i.extend({path:e.string().min(1).max(4096).refine(e=>!e.includes("\0"),{message:"path contains invalid null byte"}).describe(n.scope.path),details:e.boolean().default(!1).describe(n.options.details),hidden:e.boolean().default(!1).describe(n.filters.hidden),humanReadable:e.boolean().default(!0).describe(n.options.humanReadable),sortBy:e.enum(["name","size","time","extension"]).optional().default("time").describe(n.sorting.sortBy),reverse:e.boolean().optional().describe(n.sorting.reverse),entriesPerPage:e.number().int().min(1).max(50).optional().default(20).describe(n.pagination.entriesPerPage),entryPageNumber:e.number().int().min(1).optional().default(1).describe(n.pagination.entryPageNumber),pattern:e.string().max(512).optional().describe(n.filters.pattern),directoriesOnly:e.boolean().optional().describe(n.filters.directoriesOnly),filesOnly:e.boolean().optional().describe(n.filters.filesOnly),extension:e.string().max(50).optional().describe(n.filters.extension),extensions:e.array(e.string().max(50)).max(100).optional().describe(n.filters.extensions),depth:e.number().int().min(1).max(5).optional().describe(n.options.depth),recursive:e.boolean().optional().describe(n.options.recursive),limit:e.number().int().min(1).max(1e4).optional().describe(n.pagination.limit),charOffset:e.number().int().min(0).optional().describe(n.pagination.charOffset),charLength:e.number().int().min(1).max(1e4).optional().describe(n.pagination.charLength),showFileLastModified:e.boolean().default(!0).describe(n.options.showFileLastModified)});export const BulkViewStructureSchema=t(o.LOCAL_VIEW_STRUCTURE,ViewStructureQuerySchema,{maxQueries:5});
@@ -0,0 +1,45 @@
1
+ import { z } from "zod/v4";
2
+ export declare const LSP_CALL_HIERARCHY_DESCRIPTION: string;
3
+ export declare const LSPCallHierarchyQuerySchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
+ charOffset: z.ZodOptional<z.ZodNumber>;
8
+ charLength: z.ZodOptional<z.ZodNumber>;
9
+ direction: z.ZodEnum<{
10
+ incoming: "incoming";
11
+ outgoing: "outgoing";
12
+ }>;
13
+ depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
14
+ contextLines: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
15
+ callsPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
16
+ page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
17
+ uri: z.ZodString;
18
+ symbolName: z.ZodString;
19
+ lineHint: z.ZodNumber;
20
+ orderHint: z.ZodDefault<z.ZodNumber>;
21
+ }, z.core.$strict>;
22
+ export declare const BulkLSPCallHierarchySchema: z.ZodObject<{
23
+ queries: z.ZodArray<z.ZodObject<{
24
+ id: z.ZodString;
25
+ researchGoal: z.ZodString;
26
+ reasoning: z.ZodString;
27
+ charOffset: z.ZodOptional<z.ZodNumber>;
28
+ charLength: z.ZodOptional<z.ZodNumber>;
29
+ direction: z.ZodEnum<{
30
+ incoming: "incoming";
31
+ outgoing: "outgoing";
32
+ }>;
33
+ depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
34
+ contextLines: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
35
+ callsPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
36
+ page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
37
+ uri: z.ZodString;
38
+ symbolName: z.ZodString;
39
+ lineHint: z.ZodNumber;
40
+ orderHint: z.ZodDefault<z.ZodNumber>;
41
+ }, z.core.$strict>>;
42
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
43
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
44
+ }, z.core.$strict>;
45
+ export type LSPCallHierarchyQuery = z.infer<typeof LSPCallHierarchyQuerySchema>;
@@ -0,0 +1 @@
1
+ import{z as e}from"zod/v4";import{BaseQuerySchemaLocal as i,createBulkQuerySchema as r}from"../base/baseSchema.js";import{TOOL_NAMES as t,getToolDescription as o}from"../helpers/schemaHelperFactory.js";import{LSP_CALL_HIERARCHY as n}from"../helpers/lspSchemaHelpers.js";import{buildLspBulkQueryDescription as a}from"../helpers/lspSchemaDescriptions.js";import{createLspCoreQueryShape as s,createLspOutputPaginationShape as p}from"../helpers/lspSchemaBuilders.js";export const LSP_CALL_HIERARCHY_DESCRIPTION=o(t.LSP_CALL_HIERARCHY);export const LSPCallHierarchyQuerySchema=i.extend({...s({uri:n.scope.uri,symbolName:n.scope.symbolName,lineHint:n.scope.lineHint,orderHint:n.options.orderHint}),direction:e.enum(["incoming","outgoing"]).describe(n.options.direction),depth:e.number().int().min(1).max(3).optional().default(1).describe(n.options.depth),contextLines:e.number().int().min(0).max(10).optional().default(2).describe(n.options.contextLines),callsPerPage:e.number().int().min(1).max(30).optional().default(15).describe(n.pagination.callsPerPage),page:e.number().int().min(1).optional().default(1).describe(n.pagination.page),...p({charOffset:n.outputLimit.charOffset,charLength:n.outputLimit.charLength})}).strict();export const BulkLSPCallHierarchySchema=r(t.LSP_CALL_HIERARCHY,LSPCallHierarchyQuerySchema,{maxQueries:3,descriptionPrefix:a(t.LSP_CALL_HIERARCHY,3,"Expensive operation; prefer depth=1 and follow up from returned calls.")});
@@ -0,0 +1,37 @@
1
+ import { z } from "zod/v4";
2
+ export declare const LSP_FIND_REFERENCES_DESCRIPTION: string;
3
+ export declare const LSPFindReferencesQuerySchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
+ includeDeclaration: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8
+ contextLines: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
9
+ referencesPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
10
+ page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11
+ includePattern: z.ZodOptional<z.ZodArray<z.ZodString>>;
12
+ excludePattern: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
+ uri: z.ZodString;
14
+ symbolName: z.ZodString;
15
+ lineHint: z.ZodNumber;
16
+ orderHint: z.ZodDefault<z.ZodNumber>;
17
+ }, z.core.$strict>;
18
+ export declare const BulkLSPFindReferencesSchema: z.ZodObject<{
19
+ queries: z.ZodArray<z.ZodObject<{
20
+ id: z.ZodString;
21
+ researchGoal: z.ZodString;
22
+ reasoning: z.ZodString;
23
+ includeDeclaration: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
24
+ contextLines: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
25
+ referencesPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
26
+ page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
27
+ includePattern: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ excludePattern: z.ZodOptional<z.ZodArray<z.ZodString>>;
29
+ uri: z.ZodString;
30
+ symbolName: z.ZodString;
31
+ lineHint: z.ZodNumber;
32
+ orderHint: z.ZodDefault<z.ZodNumber>;
33
+ }, z.core.$strict>>;
34
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
35
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
36
+ }, z.core.$strict>;
37
+ export type LSPFindReferencesQuery = z.infer<typeof LSPFindReferencesQuerySchema>;
@@ -0,0 +1 @@
1
+ import{z as e}from"zod/v4";import{BaseQuerySchemaLocal as r,createBulkQuerySchema as t}from"../base/baseSchema.js";import{TOOL_NAMES as n,getToolDescription as i}from"../helpers/schemaHelperFactory.js";import{LSP_FIND_REFERENCES as o}from"../helpers/lspSchemaHelpers.js";import{buildLspBulkQueryDescription as s}from"../helpers/lspSchemaDescriptions.js";import{createLspCoreQueryShape as a}from"../helpers/lspSchemaBuilders.js";export const LSP_FIND_REFERENCES_DESCRIPTION=i(n.LSP_FIND_REFERENCES);const l=r.extend({...a({uri:o.scope.uri,symbolName:o.scope.symbolName,lineHint:o.scope.lineHint,orderHint:o.options.orderHint}),includeDeclaration:e.boolean().optional().default(!0).describe(o.options.includeDeclaration),contextLines:e.number().int().min(0).max(10).optional().default(2).describe(o.options.contextLines),referencesPerPage:e.number().int().min(1).max(50).optional().default(20).describe(o.pagination.referencesPerPage),page:e.number().int().min(1).optional().default(1).describe(o.pagination.page),includePattern:e.array(e.string()).optional().describe(o.filtering.includePattern||'Glob patterns to include (e.g. ["**/*.test.ts", "**/src/**"]). Only matching files are returned.'),excludePattern:e.array(e.string()).optional().describe(o.filtering.excludePattern||'Glob patterns to exclude (e.g. ["**/node_modules/**", "**/dist/**"]). Matching files are removed.')}).strict();export const LSPFindReferencesQuerySchema=l;export const BulkLSPFindReferencesSchema=t(n.LSP_FIND_REFERENCES,LSPFindReferencesQuerySchema,{maxQueries:5,descriptionPrefix:s(n.LSP_FIND_REFERENCES,5,"Batch independent symbols and use page for large result sets.")});
@@ -0,0 +1,31 @@
1
+ import { z } from "zod/v4";
2
+ export declare const LSP_GOTO_DEFINITION_DESCRIPTION: string;
3
+ export declare const LSPGotoDefinitionQuerySchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
+ charOffset: z.ZodOptional<z.ZodNumber>;
8
+ charLength: z.ZodOptional<z.ZodNumber>;
9
+ contextLines: z.ZodDefault<z.ZodNumber>;
10
+ uri: z.ZodString;
11
+ symbolName: z.ZodString;
12
+ lineHint: z.ZodNumber;
13
+ orderHint: z.ZodDefault<z.ZodNumber>;
14
+ }, z.core.$strict>;
15
+ export declare const BulkLSPGotoDefinitionSchema: z.ZodObject<{
16
+ queries: z.ZodArray<z.ZodObject<{
17
+ id: z.ZodString;
18
+ researchGoal: z.ZodString;
19
+ reasoning: z.ZodString;
20
+ charOffset: z.ZodOptional<z.ZodNumber>;
21
+ charLength: z.ZodOptional<z.ZodNumber>;
22
+ contextLines: z.ZodDefault<z.ZodNumber>;
23
+ uri: z.ZodString;
24
+ symbolName: z.ZodString;
25
+ lineHint: z.ZodNumber;
26
+ orderHint: z.ZodDefault<z.ZodNumber>;
27
+ }, z.core.$strict>>;
28
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
29
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
30
+ }, z.core.$strict>;
31
+ export type LSPGotoDefinitionQuery = z.infer<typeof LSPGotoDefinitionQuerySchema>;
@@ -0,0 +1 @@
1
+ import{z as e}from"zod/v4";import{BaseQuerySchemaLocal as o,createBulkQuerySchema as t}from"../base/baseSchema.js";import{TOOL_NAMES as i,getToolDescription as r}from"../helpers/schemaHelperFactory.js";import{LSP_GOTO_DEFINITION as s}from"../helpers/lspSchemaHelpers.js";import{buildLspBulkQueryDescription as n}from"../helpers/lspSchemaDescriptions.js";import{createLspCoreQueryShape as m,createLspOutputPaginationShape as c}from"../helpers/lspSchemaBuilders.js";export const LSP_GOTO_DEFINITION_DESCRIPTION=r(i.LSP_GOTO_DEFINITION);const p=o.extend({...m({uri:s.scope.uri,symbolName:s.scope.symbolName,lineHint:s.scope.lineHint,orderHint:`${s.options.orderHint} Counts only code occurrences on the exact line (0-indexed); string/comment text is ignored.`}),contextLines:e.number().int().min(0).max(20).default(5).describe(s.options.contextLines),...c({})}).strict();export const LSPGotoDefinitionQuerySchema=p;export const BulkLSPGotoDefinitionSchema=t(i.LSP_GOTO_DEFINITION,LSPGotoDefinitionQuerySchema,{maxQueries:5,descriptionPrefix:n(i.LSP_GOTO_DEFINITION,5,"Batch independent symbol lookups.")});
@@ -0,0 +1,79 @@
1
+ import { z } from "zod/v4";
2
+ export declare const NpmPackageQuerySchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ mainResearchGoal: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
+ ecosystem: z.ZodLiteral<"npm">;
8
+ npmFetchMetadata: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
9
+ name: z.ZodString;
10
+ searchLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
11
+ charOffset: z.ZodOptional<z.ZodNumber>;
12
+ charLength: z.ZodOptional<z.ZodNumber>;
13
+ }, z.core.$strip>;
14
+ export declare const PythonPackageQuerySchema: z.ZodObject<{
15
+ id: z.ZodString;
16
+ mainResearchGoal: z.ZodString;
17
+ researchGoal: z.ZodString;
18
+ reasoning: z.ZodString;
19
+ ecosystem: z.ZodLiteral<"python">;
20
+ pythonFetchMetadata: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
21
+ name: z.ZodString;
22
+ searchLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
23
+ charOffset: z.ZodOptional<z.ZodNumber>;
24
+ charLength: z.ZodOptional<z.ZodNumber>;
25
+ }, z.core.$strip>;
26
+ export declare const PackageSearchQuerySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
27
+ id: z.ZodString;
28
+ mainResearchGoal: z.ZodString;
29
+ researchGoal: z.ZodString;
30
+ reasoning: z.ZodString;
31
+ ecosystem: z.ZodLiteral<"npm">;
32
+ npmFetchMetadata: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
33
+ name: z.ZodString;
34
+ searchLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
35
+ charOffset: z.ZodOptional<z.ZodNumber>;
36
+ charLength: z.ZodOptional<z.ZodNumber>;
37
+ }, z.core.$strip>, z.ZodObject<{
38
+ id: z.ZodString;
39
+ mainResearchGoal: z.ZodString;
40
+ researchGoal: z.ZodString;
41
+ reasoning: z.ZodString;
42
+ ecosystem: z.ZodLiteral<"python">;
43
+ pythonFetchMetadata: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
44
+ name: z.ZodString;
45
+ searchLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
46
+ charOffset: z.ZodOptional<z.ZodNumber>;
47
+ charLength: z.ZodOptional<z.ZodNumber>;
48
+ }, z.core.$strip>]>;
49
+ type NpmPackageQuery = z.infer<typeof NpmPackageQuerySchema>;
50
+ type PythonPackageQuery = z.infer<typeof PythonPackageQuerySchema>;
51
+ export type PackageSearchQuery = NpmPackageQuery | PythonPackageQuery;
52
+ export declare const PackageSearchBulkQuerySchema: z.ZodObject<{
53
+ queries: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
54
+ id: z.ZodString;
55
+ mainResearchGoal: z.ZodString;
56
+ researchGoal: z.ZodString;
57
+ reasoning: z.ZodString;
58
+ ecosystem: z.ZodLiteral<"npm">;
59
+ npmFetchMetadata: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
60
+ name: z.ZodString;
61
+ searchLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
62
+ charOffset: z.ZodOptional<z.ZodNumber>;
63
+ charLength: z.ZodOptional<z.ZodNumber>;
64
+ }, z.core.$strip>, z.ZodObject<{
65
+ id: z.ZodString;
66
+ mainResearchGoal: z.ZodString;
67
+ researchGoal: z.ZodString;
68
+ reasoning: z.ZodString;
69
+ ecosystem: z.ZodLiteral<"python">;
70
+ pythonFetchMetadata: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
71
+ name: z.ZodString;
72
+ searchLimit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
73
+ charOffset: z.ZodOptional<z.ZodNumber>;
74
+ charLength: z.ZodOptional<z.ZodNumber>;
75
+ }, z.core.$strip>]>>;
76
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
77
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
78
+ }, z.core.$strict>;
79
+ export {};
@@ -0,0 +1 @@
1
+ import{z as e}from"zod/v4";import{BaseQuerySchema as a,createBulkQuerySchema as t}from"../base/baseSchema.js";import{PACKAGE_SEARCH as o}from"../helpers/githubSchemaHelpers.js";import{TOOL_NAMES as r}from"../helpers/schemaHelperFactory.js";const c={name:e.string().min(1).describe(o.search.name),searchLimit:e.number().int().min(1).max(10).optional().default(1).describe(o.options.searchLimit),charOffset:e.number().int().min(0).optional().describe("Character offset for output pagination."),charLength:e.number().int().min(1).max(5e4).optional().describe("Character budget for output pagination.")};export const NpmPackageQuerySchema=a.extend({...c,ecosystem:e.literal("npm").describe(o.search.ecosystem),npmFetchMetadata:e.boolean().optional().default(!1).describe(o.options.npmFetchMetadata)});export const PythonPackageQuerySchema=a.extend({...c,ecosystem:e.literal("python").describe(o.search.ecosystem),pythonFetchMetadata:e.boolean().optional().default(!1).describe(o.options.pythonFetchMetadata)});export const PackageSearchQuerySchema=e.discriminatedUnion("ecosystem",[NpmPackageQuerySchema,PythonPackageQuerySchema]);export const PackageSearchBulkQuerySchema=t(r.PACKAGE_SEARCH,PackageSearchQuerySchema);