@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,50 @@
1
+ import { z } from "zod/v4";
2
+ export declare const FileContentQuerySchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ mainResearchGoal: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
+ owner: z.ZodString;
8
+ repo: z.ZodString;
9
+ path: z.ZodString;
10
+ branch: z.ZodOptional<z.ZodString>;
11
+ type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
12
+ file: "file";
13
+ directory: "directory";
14
+ }>>>;
15
+ fullContent: z.ZodDefault<z.ZodBoolean>;
16
+ startLine: z.ZodOptional<z.ZodNumber>;
17
+ endLine: z.ZodOptional<z.ZodNumber>;
18
+ matchString: z.ZodOptional<z.ZodString>;
19
+ matchStringContextLines: z.ZodDefault<z.ZodNumber>;
20
+ charOffset: z.ZodOptional<z.ZodNumber>;
21
+ charLength: z.ZodOptional<z.ZodNumber>;
22
+ forceRefresh: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
23
+ }, z.core.$strip>;
24
+ export type FileContentQuery = z.infer<typeof FileContentQuerySchema>;
25
+ export declare const FileContentBulkQuerySchema: z.ZodObject<{
26
+ queries: z.ZodArray<z.ZodObject<{
27
+ id: z.ZodString;
28
+ mainResearchGoal: z.ZodString;
29
+ researchGoal: z.ZodString;
30
+ reasoning: z.ZodString;
31
+ owner: z.ZodString;
32
+ repo: z.ZodString;
33
+ path: z.ZodString;
34
+ branch: z.ZodOptional<z.ZodString>;
35
+ type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
36
+ file: "file";
37
+ directory: "directory";
38
+ }>>>;
39
+ fullContent: z.ZodDefault<z.ZodBoolean>;
40
+ startLine: z.ZodOptional<z.ZodNumber>;
41
+ endLine: z.ZodOptional<z.ZodNumber>;
42
+ matchString: z.ZodOptional<z.ZodString>;
43
+ matchStringContextLines: z.ZodDefault<z.ZodNumber>;
44
+ charOffset: z.ZodOptional<z.ZodNumber>;
45
+ charLength: z.ZodOptional<z.ZodNumber>;
46
+ forceRefresh: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
47
+ }, z.core.$strip>>;
48
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
49
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
50
+ }, z.core.$strict>;
@@ -0,0 +1 @@
1
+ import{z as e}from"zod/v4";import{BaseQuerySchema as t,createBulkQuerySchema as r}from"../base/baseSchema.js";import{GITHUB_FETCH_CONTENT as i}from"../helpers/githubSchemaHelpers.js";import{TOOL_NAMES as s}from"../helpers/schemaHelperFactory.js";const n=t.extend({owner:e.string().min(1).max(200).describe(i.scope.owner),repo:e.string().min(1).max(150).describe(i.scope.repo),path:e.string().describe(i.scope.path),branch:e.string().min(1).max(255).optional().describe(i.scope.branch),type:e.enum(["file","directory"]).optional().default("file").describe('Choose ONE: "file" (default) returns content inline; "directory" saves all files to disk and returns localPath. Directory mode requires ENABLE_LOCAL=true and ENABLE_CLONE=true, and is only available with the GitHub provider (not GitLab).'),fullContent:e.boolean().default(!1).describe(i.range.fullContent),startLine:e.number().int().min(1).optional().describe(i.range.startLine),endLine:e.number().int().min(1).optional().describe(i.range.endLine),matchString:e.string().max(2e3).optional().describe(i.range.matchString),matchStringContextLines:e.number().int().min(1).max(50).default(5).describe(i.range.matchStringContextLines),charOffset:e.number().int().min(0).optional().describe(i.pagination.charOffset),charLength:e.number().int().min(50).max(5e4).optional().describe(i.pagination.charLength),forceRefresh:e.boolean().optional().default(!1).describe('When true, bypass the cache and force a fresh fetch even if a valid cached copy exists. Only relevant for type "directory".')});export const FileContentQuerySchema=n.superRefine((e,t)=>{if("directory"===e.type)return!0===e.fullContent&&t.addIssue({code:"custom",message:'Parameter "fullContent" is not supported when type is "directory". Directory mode saves all files to disk.',path:["fullContent"]}),void 0!==e.startLine&&t.addIssue({code:"custom",message:'Parameter "startLine" is not supported when type is "directory". Directory mode saves all files to disk.',path:["startLine"]}),void 0!==e.endLine&&t.addIssue({code:"custom",message:'Parameter "endLine" is not supported when type is "directory". Directory mode saves all files to disk.',path:["endLine"]}),void 0!==e.matchString&&t.addIssue({code:"custom",message:'Parameter "matchString" is not supported when type is "directory". Directory mode saves all files to disk.',path:["matchString"]}),void 0!==e.charOffset&&t.addIssue({code:"custom",message:'Parameter "charOffset" is not supported when type is "directory". Directory mode saves all files to disk.',path:["charOffset"]}),void(void 0!==e.charLength&&t.addIssue({code:"custom",message:'Parameter "charLength" is not supported when type is "directory". Directory mode saves all files to disk.',path:["charLength"]}));e.fullContent&&(e.startLine||e.endLine||e.matchString)&&t.addIssue({code:"custom",message:i.validation.parameterConflict,path:["fullContent"]}),(e.startLine&&!e.endLine||!e.startLine&&e.endLine)&&t.addIssue({code:"custom",message:i.validation.parameterConflict,path:["startLine"]})});export const FileContentBulkQuerySchema=r(s.GITHUB_FETCH_CONTENT,FileContentQuerySchema);
@@ -0,0 +1,46 @@
1
+ import { z } from "zod/v4";
2
+ export declare const GitHubCodeSearchQuerySchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ mainResearchGoal: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
+ keywordsToSearch: z.ZodArray<z.ZodString>;
8
+ owner: z.ZodOptional<z.ZodString>;
9
+ repo: z.ZodOptional<z.ZodString>;
10
+ extension: z.ZodOptional<z.ZodString>;
11
+ filename: z.ZodOptional<z.ZodString>;
12
+ path: z.ZodOptional<z.ZodString>;
13
+ match: z.ZodOptional<z.ZodEnum<{
14
+ path: "path";
15
+ file: "file";
16
+ }>>;
17
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
18
+ page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
19
+ charOffset: z.ZodOptional<z.ZodNumber>;
20
+ charLength: z.ZodOptional<z.ZodNumber>;
21
+ }, z.core.$strip>;
22
+ export type GitHubCodeSearchQuery = z.infer<typeof GitHubCodeSearchQuerySchema>;
23
+ export declare const GitHubCodeSearchBulkQuerySchema: z.ZodObject<{
24
+ queries: z.ZodArray<z.ZodObject<{
25
+ id: z.ZodString;
26
+ mainResearchGoal: z.ZodString;
27
+ researchGoal: z.ZodString;
28
+ reasoning: z.ZodString;
29
+ keywordsToSearch: z.ZodArray<z.ZodString>;
30
+ owner: z.ZodOptional<z.ZodString>;
31
+ repo: z.ZodOptional<z.ZodString>;
32
+ extension: z.ZodOptional<z.ZodString>;
33
+ filename: z.ZodOptional<z.ZodString>;
34
+ path: z.ZodOptional<z.ZodString>;
35
+ match: z.ZodOptional<z.ZodEnum<{
36
+ path: "path";
37
+ file: "file";
38
+ }>>;
39
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
40
+ page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
41
+ charOffset: z.ZodOptional<z.ZodNumber>;
42
+ charLength: z.ZodOptional<z.ZodNumber>;
43
+ }, z.core.$strip>>;
44
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
45
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
46
+ }, z.core.$strict>;
@@ -0,0 +1 @@
1
+ import{z as e}from"zod/v4";import{BaseQuerySchema as i,createBulkQuerySchema as r}from"../base/baseSchema.js";import{GITHUB_SEARCH_CODE as t}from"../helpers/githubSchemaHelpers.js";import{TOOL_NAMES as a}from"../helpers/schemaHelperFactory.js";export const GitHubCodeSearchQuerySchema=i.extend({keywordsToSearch:e.array(e.string()).min(1).max(5).describe(t.search.keywordsToSearch),owner:e.string().optional().describe(t.scope.owner),repo:e.string().optional().describe(t.scope.repo),extension:e.string().optional().describe(t.filters.extension),filename:e.string().optional().describe(t.filters.filename),path:e.string().optional().describe(t.filters.path),match:e.enum(["file","path"]).optional().describe(t.filters.match),limit:e.number().int().min(1).max(100).optional().default(10).describe(t.resultLimit.limit),page:e.number().int().min(1).max(10).optional().default(1).describe(t.pagination.page),charOffset:e.number().int().min(0).optional().describe("Character offset for output pagination after domain pagination has been applied."),charLength:e.number().int().min(1).max(5e4).optional().describe("Character budget for output pagination after domain pagination has been applied.")});export const GitHubCodeSearchBulkQuerySchema=r(a.GITHUB_SEARCH_CODE,GitHubCodeSearchQuerySchema);
@@ -0,0 +1,140 @@
1
+ import { z } from "zod/v4";
2
+ export declare const GitHubPullRequestSearchQuerySchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ mainResearchGoal: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
+ query: z.ZodOptional<z.ZodString>;
8
+ owner: z.ZodOptional<z.ZodString>;
9
+ repo: z.ZodOptional<z.ZodString>;
10
+ prNumber: z.ZodOptional<z.ZodNumber>;
11
+ state: z.ZodOptional<z.ZodEnum<{
12
+ open: "open";
13
+ closed: "closed";
14
+ }>>;
15
+ assignee: z.ZodOptional<z.ZodString>;
16
+ author: z.ZodOptional<z.ZodString>;
17
+ commenter: z.ZodOptional<z.ZodString>;
18
+ involves: z.ZodOptional<z.ZodString>;
19
+ mentions: z.ZodOptional<z.ZodString>;
20
+ "review-requested": z.ZodOptional<z.ZodString>;
21
+ "reviewed-by": z.ZodOptional<z.ZodString>;
22
+ label: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
23
+ "no-label": z.ZodOptional<z.ZodBoolean>;
24
+ "no-milestone": z.ZodOptional<z.ZodBoolean>;
25
+ "no-project": z.ZodOptional<z.ZodBoolean>;
26
+ "no-assignee": z.ZodOptional<z.ZodBoolean>;
27
+ head: z.ZodOptional<z.ZodString>;
28
+ base: z.ZodOptional<z.ZodString>;
29
+ created: z.ZodOptional<z.ZodString>;
30
+ updated: z.ZodOptional<z.ZodString>;
31
+ closed: z.ZodOptional<z.ZodString>;
32
+ "merged-at": z.ZodOptional<z.ZodString>;
33
+ comments: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
34
+ reactions: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
35
+ interactions: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
36
+ merged: z.ZodOptional<z.ZodBoolean>;
37
+ draft: z.ZodOptional<z.ZodBoolean>;
38
+ match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
39
+ title: "title";
40
+ body: "body";
41
+ comments: "comments";
42
+ }>>>;
43
+ sort: z.ZodOptional<z.ZodEnum<{
44
+ created: "created";
45
+ updated: "updated";
46
+ "best-match": "best-match";
47
+ }>>;
48
+ order: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
49
+ asc: "asc";
50
+ desc: "desc";
51
+ }>>>;
52
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
53
+ page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
54
+ withComments: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
55
+ withCommits: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
56
+ type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
57
+ fullContent: "fullContent";
58
+ metadata: "metadata";
59
+ partialContent: "partialContent";
60
+ }>>>;
61
+ partialContentMetadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
62
+ file: z.ZodString;
63
+ additions: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
64
+ deletions: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
65
+ }, z.core.$strip>>>;
66
+ charOffset: z.ZodOptional<z.ZodNumber>;
67
+ charLength: z.ZodOptional<z.ZodNumber>;
68
+ }, z.core.$strip>;
69
+ export type GitHubPullRequestSearchQuery = z.infer<typeof GitHubPullRequestSearchQuerySchema>;
70
+ export declare const GitHubPullRequestSearchBulkQuerySchema: z.ZodObject<{
71
+ queries: z.ZodArray<z.ZodObject<{
72
+ id: z.ZodString;
73
+ mainResearchGoal: z.ZodString;
74
+ researchGoal: z.ZodString;
75
+ reasoning: z.ZodString;
76
+ query: z.ZodOptional<z.ZodString>;
77
+ owner: z.ZodOptional<z.ZodString>;
78
+ repo: z.ZodOptional<z.ZodString>;
79
+ prNumber: z.ZodOptional<z.ZodNumber>;
80
+ state: z.ZodOptional<z.ZodEnum<{
81
+ open: "open";
82
+ closed: "closed";
83
+ }>>;
84
+ assignee: z.ZodOptional<z.ZodString>;
85
+ author: z.ZodOptional<z.ZodString>;
86
+ commenter: z.ZodOptional<z.ZodString>;
87
+ involves: z.ZodOptional<z.ZodString>;
88
+ mentions: z.ZodOptional<z.ZodString>;
89
+ "review-requested": z.ZodOptional<z.ZodString>;
90
+ "reviewed-by": z.ZodOptional<z.ZodString>;
91
+ label: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
92
+ "no-label": z.ZodOptional<z.ZodBoolean>;
93
+ "no-milestone": z.ZodOptional<z.ZodBoolean>;
94
+ "no-project": z.ZodOptional<z.ZodBoolean>;
95
+ "no-assignee": z.ZodOptional<z.ZodBoolean>;
96
+ head: z.ZodOptional<z.ZodString>;
97
+ base: z.ZodOptional<z.ZodString>;
98
+ created: z.ZodOptional<z.ZodString>;
99
+ updated: z.ZodOptional<z.ZodString>;
100
+ closed: z.ZodOptional<z.ZodString>;
101
+ "merged-at": z.ZodOptional<z.ZodString>;
102
+ comments: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
103
+ reactions: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
104
+ interactions: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
105
+ merged: z.ZodOptional<z.ZodBoolean>;
106
+ draft: z.ZodOptional<z.ZodBoolean>;
107
+ match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
108
+ title: "title";
109
+ body: "body";
110
+ comments: "comments";
111
+ }>>>;
112
+ sort: z.ZodOptional<z.ZodEnum<{
113
+ created: "created";
114
+ updated: "updated";
115
+ "best-match": "best-match";
116
+ }>>;
117
+ order: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
118
+ asc: "asc";
119
+ desc: "desc";
120
+ }>>>;
121
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
122
+ page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
123
+ withComments: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
124
+ withCommits: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
125
+ type: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
126
+ fullContent: "fullContent";
127
+ metadata: "metadata";
128
+ partialContent: "partialContent";
129
+ }>>>;
130
+ partialContentMetadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
131
+ file: z.ZodString;
132
+ additions: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
133
+ deletions: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
134
+ }, z.core.$strip>>>;
135
+ charOffset: z.ZodOptional<z.ZodNumber>;
136
+ charLength: z.ZodOptional<z.ZodNumber>;
137
+ }, z.core.$strip>>;
138
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
139
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
140
+ }, z.core.$strict>;
@@ -0,0 +1 @@
1
+ import{z as e}from"zod/v4";import{BaseQuerySchema as t,createBulkQuerySchema as i}from"../base/baseSchema.js";import{GITHUB_SEARCH_PULL_REQUESTS as r}from"../helpers/githubSchemaHelpers.js";import{TOOL_NAMES as o}from"../helpers/schemaHelperFactory.js";const n=e.array(e.enum(["title","body","comments"])).optional().describe(r.filters.match),s=e.object({created:e.string().optional().describe(r.filters.created),updated:e.string().optional().describe(r.filters.updated)}),a=t.extend({query:e.string().optional().describe(r.search.query),owner:e.string().optional().describe(r.scope.owner),repo:e.string().optional().describe(r.scope.repo),prNumber:e.number().int().positive().optional().describe(r.scope.prNumber),state:e.enum(["open","closed"]).optional().describe(r.filters.state),assignee:e.string().optional().describe(r.filters.assignee),author:e.string().optional().describe(r.filters.author),commenter:e.string().optional().describe(r.filters.commenter),involves:e.string().optional().describe(r.filters.involves),mentions:e.string().optional().describe(r.filters.mentions),"review-requested":e.string().optional().describe(r.filters["review-requested"]),"reviewed-by":e.string().optional().describe(r.filters["reviewed-by"]),label:e.union([e.string(),e.array(e.string())]).optional().describe(r.filters.label),"no-label":e.boolean().optional().describe(r.filters["no-label"]),"no-milestone":e.boolean().optional().describe(r.filters["no-milestone"]),"no-project":e.boolean().optional().describe(r.filters["no-project"]),"no-assignee":e.boolean().optional().describe(r.filters["no-assignee"]),head:e.string().optional().describe(r.filters.head),base:e.string().optional().describe(r.filters.base),created:s.shape.created,updated:s.shape.updated,closed:e.string().optional().describe(r.filters.closed),"merged-at":e.string().optional().describe(r.filters["merged-at"]),comments:e.union([e.number().int().min(0),e.string().regex(/^(>=?\d+|<=?\d+|\d+\.\.\d+|\d+)$/)]).optional().describe(r.filters.comments),reactions:e.union([e.number().int().min(0),e.string().regex(/^(>=?\d+|<=?\d+|\d+\.\.\d+|\d+)$/)]).optional().describe(r.filters.reactions),interactions:e.union([e.number().int().min(0),e.string().regex(/^(>=?\d+|<=?\d+|\d+\.\.\d+|\d+)$/)]).optional().describe(r.filters.interactions),merged:e.boolean().optional().describe(r.filters.merged),draft:e.boolean().optional().describe(r.filters.draft),match:n,sort:e.enum(["created","updated","best-match"]).optional().describe(r.sorting.sort),order:e.enum(["asc","desc"]).optional().default("desc").describe(r.sorting.order),limit:e.number().int().min(1).max(10).optional().default(5).describe(r.resultLimit.limit),page:e.number().int().min(1).max(10).optional().default(1).describe(r.pagination.page),withComments:e.boolean().optional().default(!1).describe(r.outputShaping.withComments),withCommits:e.boolean().optional().default(!1).describe(r.outputShaping.withCommits),type:e.enum(["metadata","fullContent","partialContent"]).optional().default("metadata").describe(r.outputShaping.type),partialContentMetadata:e.array(e.object({file:e.string().describe("File path within the PR diff to fetch partial content for"),additions:e.array(e.number()).optional().describe("Specific addition line numbers to include from the diff"),deletions:e.array(e.number()).optional().describe("Specific deletion line numbers to include from the diff")})).optional().describe(r.outputShaping.partialContentMetadata),charOffset:e.number().int().min(0).optional().describe(r.outputLimit.charOffset),charLength:e.number().int().min(1).max(5e4).optional().describe(r.outputLimit.charLength)});export const GitHubPullRequestSearchQuerySchema=a.superRefine((e,t)=>{e.query&&String(e.query).length>256&&t.addIssue({code:"custom",message:"Query too long. Maximum 256 characters allowed.",path:["query"]}),e.query?.trim()||e.owner||e.repo||e.author||e.assignee||e.prNumber&&e.owner&&e.repo||t.addIssue({code:"custom",message:"At least one valid search parameter, filter, or PR number is required.",path:[]})});export const GitHubPullRequestSearchBulkQuerySchema=i(o.GITHUB_SEARCH_PULL_REQUESTS,GitHubPullRequestSearchQuerySchema);
@@ -0,0 +1,62 @@
1
+ import { z } from "zod/v4";
2
+ export declare const GitHubReposSearchSingleQuerySchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ mainResearchGoal: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
+ keywordsToSearch: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
+ topicsToSearch: z.ZodOptional<z.ZodArray<z.ZodString>>;
9
+ owner: z.ZodOptional<z.ZodString>;
10
+ stars: z.ZodOptional<z.ZodString>;
11
+ size: z.ZodOptional<z.ZodString>;
12
+ created: z.ZodOptional<z.ZodString>;
13
+ updated: z.ZodOptional<z.ZodString>;
14
+ match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
15
+ name: "name";
16
+ description: "description";
17
+ readme: "readme";
18
+ }>>>;
19
+ sort: z.ZodOptional<z.ZodEnum<{
20
+ stars: "stars";
21
+ updated: "updated";
22
+ forks: "forks";
23
+ "best-match": "best-match";
24
+ }>>;
25
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
26
+ page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
27
+ charOffset: z.ZodOptional<z.ZodNumber>;
28
+ charLength: z.ZodOptional<z.ZodNumber>;
29
+ }, z.core.$strip>;
30
+ export type GitHubReposSearchQuery = z.infer<typeof GitHubReposSearchSingleQuerySchema>;
31
+ export declare const GitHubReposSearchQuerySchema: z.ZodObject<{
32
+ queries: z.ZodArray<z.ZodObject<{
33
+ id: z.ZodString;
34
+ mainResearchGoal: z.ZodString;
35
+ researchGoal: z.ZodString;
36
+ reasoning: z.ZodString;
37
+ keywordsToSearch: z.ZodOptional<z.ZodArray<z.ZodString>>;
38
+ topicsToSearch: z.ZodOptional<z.ZodArray<z.ZodString>>;
39
+ owner: z.ZodOptional<z.ZodString>;
40
+ stars: z.ZodOptional<z.ZodString>;
41
+ size: z.ZodOptional<z.ZodString>;
42
+ created: z.ZodOptional<z.ZodString>;
43
+ updated: z.ZodOptional<z.ZodString>;
44
+ match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
45
+ name: "name";
46
+ description: "description";
47
+ readme: "readme";
48
+ }>>>;
49
+ sort: z.ZodOptional<z.ZodEnum<{
50
+ stars: "stars";
51
+ updated: "updated";
52
+ forks: "forks";
53
+ "best-match": "best-match";
54
+ }>>;
55
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
56
+ page: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
57
+ charOffset: z.ZodOptional<z.ZodNumber>;
58
+ charLength: z.ZodOptional<z.ZodNumber>;
59
+ }, z.core.$strip>>;
60
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
61
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
62
+ }, z.core.$strict>;
@@ -0,0 +1 @@
1
+ import{z as e}from"zod/v4";import{BaseQuerySchema as r,createBulkQuerySchema as t}from"../base/baseSchema.js";import{GITHUB_SEARCH_REPOS as a}from"../helpers/githubSchemaHelpers.js";import{TOOL_NAMES as o}from"../helpers/schemaHelperFactory.js";export const GitHubReposSearchSingleQuerySchema=r.extend({keywordsToSearch:e.array(e.string()).optional().describe(a.search.keywordsToSearch),topicsToSearch:e.array(e.string()).optional().describe(a.search.topicsToSearch),owner:e.string().optional().describe(a.scope.owner),stars:e.string().optional().describe(a.filters.stars),size:e.string().optional().describe(a.filters.size),created:e.string().optional().describe(a.filters.created),updated:e.string().optional().describe(a.filters.updated),match:e.array(e.enum(["name","description","readme"])).optional().describe(a.filters.match),sort:e.enum(["forks","stars","updated","best-match"]).optional().describe(a.sorting.sort),limit:e.number().int().min(1).max(100).optional().default(10).describe(a.resultLimit.limit),page:e.number().int().min(1).max(10).optional().default(1).describe(a.pagination.page),charOffset:e.number().int().min(0).optional().describe("Character offset for output pagination after domain pagination has been applied."),charLength:e.number().int().min(1).max(5e4).optional().describe("Character budget for output pagination after domain pagination has been applied.")}).refine(e=>e.keywordsToSearch&&e.keywordsToSearch.length>0||e.topicsToSearch&&e.topicsToSearch.length>0||e.owner&&e.owner.trim().length>0,{message:"At least one of 'keywordsToSearch', 'topicsToSearch', or 'owner' is required",path:["keywordsToSearch"]});export const GitHubReposSearchQuerySchema=t(o.GITHUB_SEARCH_REPOSITORIES,GitHubReposSearchSingleQuerySchema);
@@ -0,0 +1,40 @@
1
+ import { z } from "zod/v4";
2
+ export declare const GITHUB_STRUCTURE_DEFAULTS: {
3
+ readonly ENTRIES_PER_PAGE: 50;
4
+ readonly MAX_ENTRIES_PER_PAGE: 200;
5
+ };
6
+ export declare const GitHubViewRepoStructureQuerySchema: z.ZodObject<{
7
+ id: z.ZodString;
8
+ mainResearchGoal: z.ZodString;
9
+ researchGoal: z.ZodString;
10
+ reasoning: z.ZodString;
11
+ owner: z.ZodString;
12
+ repo: z.ZodString;
13
+ branch: z.ZodOptional<z.ZodString>;
14
+ path: z.ZodDefault<z.ZodOptional<z.ZodString>>;
15
+ depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
16
+ entriesPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
17
+ entryPageNumber: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
18
+ charOffset: z.ZodOptional<z.ZodNumber>;
19
+ charLength: z.ZodOptional<z.ZodNumber>;
20
+ }, z.core.$strip>;
21
+ export type GitHubViewRepoStructureQuery = z.infer<typeof GitHubViewRepoStructureQuerySchema>;
22
+ export declare const GitHubViewRepoStructureBulkQuerySchema: z.ZodObject<{
23
+ queries: z.ZodArray<z.ZodObject<{
24
+ id: z.ZodString;
25
+ mainResearchGoal: z.ZodString;
26
+ researchGoal: z.ZodString;
27
+ reasoning: z.ZodString;
28
+ owner: z.ZodString;
29
+ repo: z.ZodString;
30
+ branch: z.ZodOptional<z.ZodString>;
31
+ path: z.ZodDefault<z.ZodOptional<z.ZodString>>;
32
+ depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
33
+ entriesPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
34
+ entryPageNumber: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
35
+ charOffset: z.ZodOptional<z.ZodNumber>;
36
+ charLength: z.ZodOptional<z.ZodNumber>;
37
+ }, z.core.$strip>>;
38
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
39
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
40
+ }, z.core.$strict>;
@@ -0,0 +1 @@
1
+ import{z as e}from"zod/v4";import{BaseQuerySchema as t,createBulkQuerySchema as r}from"../base/baseSchema.js";import{GITHUB_VIEW_REPO_STRUCTURE as a}from"../helpers/githubSchemaHelpers.js";import{TOOL_NAMES as i}from"../helpers/schemaHelperFactory.js";export const GITHUB_STRUCTURE_DEFAULTS={ENTRIES_PER_PAGE:50,MAX_ENTRIES_PER_PAGE:200};export const GitHubViewRepoStructureQuerySchema=t.extend({owner:e.string().min(1).max(200).describe(a.scope.owner),repo:e.string().min(1).max(150).describe(a.scope.repo),branch:e.string().min(1).max(255).optional().describe(a.scope.branch||'Branch to view. Omit to use the repository\'s default branch (usually "main").'),path:e.string().optional().default("").describe(a.scope.path),depth:e.number().int().min(1).max(2).optional().default(1).describe(a.range.depth),entriesPerPage:e.number().int().min(1).max(GITHUB_STRUCTURE_DEFAULTS.MAX_ENTRIES_PER_PAGE).optional().default(GITHUB_STRUCTURE_DEFAULTS.ENTRIES_PER_PAGE).describe(a.pagination.entriesPerPage),entryPageNumber:e.number().int().min(1).optional().default(1).describe(a.pagination.entryPageNumber),charOffset:e.number().int().min(0).optional().describe("Character offset for output pagination after entry pagination has been applied."),charLength:e.number().int().min(1).max(5e4).optional().describe("Character budget for output pagination after entry pagination has been applied.")});export const GitHubViewRepoStructureBulkQuerySchema=r(i.GITHUB_VIEW_REPO_STRUCTURE,GitHubViewRepoStructureQuerySchema);
@@ -0,0 +1,109 @@
1
+ import { z } from "zod/v4";
2
+ export declare const LOCAL_FIND_FILES_DESCRIPTION: string;
3
+ export declare const FindFilesQuerySchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
+ path: z.ZodString;
8
+ maxDepth: z.ZodOptional<z.ZodNumber>;
9
+ minDepth: z.ZodOptional<z.ZodNumber>;
10
+ name: z.ZodOptional<z.ZodString>;
11
+ iname: z.ZodOptional<z.ZodString>;
12
+ names: z.ZodOptional<z.ZodArray<z.ZodString>>;
13
+ pathPattern: z.ZodOptional<z.ZodString>;
14
+ regex: z.ZodOptional<z.ZodString>;
15
+ regexType: z.ZodOptional<z.ZodEnum<{
16
+ "posix-egrep": "posix-egrep";
17
+ "posix-extended": "posix-extended";
18
+ "posix-basic": "posix-basic";
19
+ }>>;
20
+ type: z.ZodOptional<z.ZodEnum<{
21
+ c: "c";
22
+ f: "f";
23
+ d: "d";
24
+ l: "l";
25
+ b: "b";
26
+ p: "p";
27
+ s: "s";
28
+ }>>;
29
+ empty: z.ZodOptional<z.ZodBoolean>;
30
+ modifiedWithin: z.ZodOptional<z.ZodString>;
31
+ modifiedBefore: z.ZodOptional<z.ZodString>;
32
+ accessedWithin: z.ZodOptional<z.ZodString>;
33
+ sizeGreater: z.ZodOptional<z.ZodString>;
34
+ sizeLess: z.ZodOptional<z.ZodString>;
35
+ permissions: z.ZodOptional<z.ZodString>;
36
+ executable: z.ZodOptional<z.ZodBoolean>;
37
+ readable: z.ZodOptional<z.ZodBoolean>;
38
+ writable: z.ZodOptional<z.ZodBoolean>;
39
+ excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
40
+ sortBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
41
+ path: "path";
42
+ modified: "modified";
43
+ name: "name";
44
+ size: "size";
45
+ }>>>;
46
+ limit: z.ZodOptional<z.ZodNumber>;
47
+ details: z.ZodDefault<z.ZodBoolean>;
48
+ filesPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
49
+ filePageNumber: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
50
+ charOffset: z.ZodOptional<z.ZodNumber>;
51
+ charLength: z.ZodOptional<z.ZodNumber>;
52
+ showFileLastModified: z.ZodDefault<z.ZodBoolean>;
53
+ }, z.core.$strip>;
54
+ export type FindFilesQuery = z.infer<typeof FindFilesQuerySchema>;
55
+ export declare const BulkFindFilesSchema: z.ZodObject<{
56
+ queries: z.ZodArray<z.ZodObject<{
57
+ id: z.ZodString;
58
+ researchGoal: z.ZodString;
59
+ reasoning: z.ZodString;
60
+ path: z.ZodString;
61
+ maxDepth: z.ZodOptional<z.ZodNumber>;
62
+ minDepth: z.ZodOptional<z.ZodNumber>;
63
+ name: z.ZodOptional<z.ZodString>;
64
+ iname: z.ZodOptional<z.ZodString>;
65
+ names: z.ZodOptional<z.ZodArray<z.ZodString>>;
66
+ pathPattern: z.ZodOptional<z.ZodString>;
67
+ regex: z.ZodOptional<z.ZodString>;
68
+ regexType: z.ZodOptional<z.ZodEnum<{
69
+ "posix-egrep": "posix-egrep";
70
+ "posix-extended": "posix-extended";
71
+ "posix-basic": "posix-basic";
72
+ }>>;
73
+ type: z.ZodOptional<z.ZodEnum<{
74
+ c: "c";
75
+ f: "f";
76
+ d: "d";
77
+ l: "l";
78
+ b: "b";
79
+ p: "p";
80
+ s: "s";
81
+ }>>;
82
+ empty: z.ZodOptional<z.ZodBoolean>;
83
+ modifiedWithin: z.ZodOptional<z.ZodString>;
84
+ modifiedBefore: z.ZodOptional<z.ZodString>;
85
+ accessedWithin: z.ZodOptional<z.ZodString>;
86
+ sizeGreater: z.ZodOptional<z.ZodString>;
87
+ sizeLess: z.ZodOptional<z.ZodString>;
88
+ permissions: z.ZodOptional<z.ZodString>;
89
+ executable: z.ZodOptional<z.ZodBoolean>;
90
+ readable: z.ZodOptional<z.ZodBoolean>;
91
+ writable: z.ZodOptional<z.ZodBoolean>;
92
+ excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
93
+ sortBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
94
+ path: "path";
95
+ modified: "modified";
96
+ name: "name";
97
+ size: "size";
98
+ }>>>;
99
+ limit: z.ZodOptional<z.ZodNumber>;
100
+ details: z.ZodDefault<z.ZodBoolean>;
101
+ filesPerPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
102
+ filePageNumber: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
103
+ charOffset: z.ZodOptional<z.ZodNumber>;
104
+ charLength: z.ZodOptional<z.ZodNumber>;
105
+ showFileLastModified: z.ZodDefault<z.ZodBoolean>;
106
+ }, z.core.$strip>>;
107
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
108
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
109
+ }, 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_FIND_FILES as s}from"../helpers/localSchemaHelpers.js";import{TOOL_NAMES as o,getToolDescription as a}from"../helpers/schemaHelperFactory.js";export const LOCAL_FIND_FILES_DESCRIPTION=a(o.LOCAL_FIND_FILES);export const FindFilesQuerySchema=i.extend({path:e.string().min(1).max(4096).refine(e=>!e.includes("\0"),{message:"path contains invalid null byte"}).describe(s.scope.path),maxDepth:e.number().int().min(1).max(10).optional().describe(s.options.maxDepth),minDepth:e.number().int().min(0).max(10).optional().describe(s.options.minDepth),name:e.string().optional().describe(s.filters.name),iname:e.string().optional().describe(s.filters.iname),names:e.array(e.string().max(256)).max(100).optional().describe(s.filters.names),pathPattern:e.string().optional().describe(s.filters.pathPattern),regex:e.string().optional().describe(s.filters.regex),regexType:e.enum(["posix-egrep","posix-extended","posix-basic"]).optional().describe(s.filters.regexType),type:e.enum(["f","d","l","b","c","p","s"]).optional().describe(s.filters.type),empty:e.boolean().optional().describe(s.filters.empty),modifiedWithin:e.string().optional().describe(s.time.modifiedWithin),modifiedBefore:e.string().optional().describe(s.time.modifiedBefore),accessedWithin:e.string().optional().describe(s.time.accessedWithin),sizeGreater:e.string().optional().describe(s.size.sizeGreater),sizeLess:e.string().optional().describe(s.size.sizeLess),permissions:e.string().optional().describe(s.options.permissions),executable:e.boolean().optional().describe(s.filters.executable),readable:e.boolean().optional().describe(s.filters.readable),writable:e.boolean().optional().describe(s.filters.writable),excludeDir:e.array(e.string().max(256)).max(100).optional().describe(s.filters.excludeDir),sortBy:e.enum(["modified","size","name","path"]).optional().default("modified").describe(s.sorting.sortBy||"Sort results by: modified (default), size, name, or path"),limit:e.number().int().min(1).max(1e4).optional().describe(s.pagination.limit),details:e.boolean().default(!0).describe(s.options.details),filesPerPage:e.number().int().min(1).max(50).optional().default(20).describe(s.pagination.filesPerPage),filePageNumber:e.number().int().min(1).optional().default(1).describe(s.pagination.filePageNumber),charOffset:e.number().int().min(0).optional().describe(s.pagination.charOffset),charLength:e.number().int().min(1).max(1e4).optional().describe(s.pagination.charLength),showFileLastModified:e.boolean().default(!0).describe(s.options.showFileLastModified)});export const BulkFindFilesSchema=t(o.LOCAL_FIND_FILES,FindFilesQuerySchema,{maxQueries:5});
@@ -0,0 +1,37 @@
1
+ import { z } from "zod/v4";
2
+ export declare const LOCAL_FETCH_CONTENT_DESCRIPTION: string;
3
+ export declare const FetchContentQuerySchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ researchGoal: z.ZodString;
6
+ reasoning: z.ZodString;
7
+ path: z.ZodString;
8
+ fullContent: z.ZodDefault<z.ZodBoolean>;
9
+ startLine: z.ZodOptional<z.ZodNumber>;
10
+ endLine: z.ZodOptional<z.ZodNumber>;
11
+ matchString: z.ZodOptional<z.ZodString>;
12
+ matchStringContextLines: z.ZodDefault<z.ZodNumber>;
13
+ matchStringIsRegex: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
14
+ matchStringCaseSensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
15
+ charOffset: z.ZodOptional<z.ZodNumber>;
16
+ charLength: z.ZodOptional<z.ZodNumber>;
17
+ }, z.core.$strip>;
18
+ export type FetchContentQuery = z.infer<typeof FetchContentQuerySchema>;
19
+ export declare const BulkFetchContentSchema: z.ZodObject<{
20
+ queries: z.ZodArray<z.ZodObject<{
21
+ id: z.ZodString;
22
+ researchGoal: z.ZodString;
23
+ reasoning: z.ZodString;
24
+ path: z.ZodString;
25
+ fullContent: z.ZodDefault<z.ZodBoolean>;
26
+ startLine: z.ZodOptional<z.ZodNumber>;
27
+ endLine: z.ZodOptional<z.ZodNumber>;
28
+ matchString: z.ZodOptional<z.ZodString>;
29
+ matchStringContextLines: z.ZodDefault<z.ZodNumber>;
30
+ matchStringIsRegex: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
31
+ matchStringCaseSensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
32
+ charOffset: z.ZodOptional<z.ZodNumber>;
33
+ charLength: z.ZodOptional<z.ZodNumber>;
34
+ }, z.core.$strip>>;
35
+ responseCharOffset: z.ZodOptional<z.ZodNumber>;
36
+ responseCharLength: z.ZodOptional<z.ZodNumber>;
37
+ }, z.core.$strict>;
@@ -0,0 +1 @@
1
+ import{z as e}from"zod/v4";import{BaseQuerySchemaLocal as t,createBulkQuerySchema as n}from"../base/baseSchema.js";import{LOCAL_FETCH_CONTENT as i}from"../helpers/localSchemaHelpers.js";import{TOOL_NAMES as a,getToolDescription as o}from"../helpers/schemaHelperFactory.js";export const LOCAL_FETCH_CONTENT_DESCRIPTION=o(a.LOCAL_FETCH_CONTENT);const s=t.extend({path:e.string().min(1).max(4096).refine(e=>!e.includes("\0"),{message:"path contains invalid null byte"}).describe(i.scope.path),fullContent:e.boolean().default(!1).describe(i.options.fullContent),startLine:e.number().int().min(1).optional().describe(i.range?.startLine??"Start line (1-indexed). Use with endLine for line range extraction."),endLine:e.number().int().min(1).optional().describe(i.range?.endLine??"End line (1-indexed, inclusive). Use with startLine for line range extraction."),matchString:e.string().max(2e3).optional().describe(i.options.matchString),matchStringContextLines:e.number().int().min(1).max(50).default(5).describe(i.options.matchStringContextLines),matchStringIsRegex:e.boolean().optional().default(!1).describe(i.options.matchStringIsRegex),matchStringCaseSensitive:e.boolean().optional().default(!1).describe(i.options.matchStringCaseSensitive),charOffset:e.number().int().min(0).optional().describe(i.pagination.charOffset),charLength:e.number().int().min(1).max(1e4).optional().describe(i.pagination.charLength)});export const FetchContentQuerySchema=s.superRefine((e,t)=>{(void 0!==e.startLine&&void 0===e.endLine||void 0===e.startLine&&void 0!==e.endLine)&&t.addIssue({code:"custom",message:"startLine and endLine must be used together",path:["startLine"]}),void 0!==e.startLine&&void 0!==e.endLine&&e.startLine>e.endLine&&t.addIssue({code:"custom",message:"startLine must be less than or equal to endLine",path:["startLine"]}),void 0===e.startLine&&void 0===e.endLine||void 0===e.matchString||t.addIssue({code:"custom",message:"Cannot use startLine/endLine with matchString - choose one extraction method",path:["startLine"]}),void 0===e.startLine&&void 0===e.endLine||!0!==e.fullContent||t.addIssue({code:"custom",message:"Cannot use startLine/endLine with fullContent - line extraction is partial by definition",path:["fullContent"]}),!0===e.fullContent&&void 0!==e.matchString&&t.addIssue({code:"custom",message:"Cannot use fullContent with matchString - choose one extraction method",path:["fullContent"]}),e.matchStringIsRegex&&void 0!==e.matchString&&e.matchString.length>1e3&&t.addIssue({code:"custom",message:"Regex pattern too long. Use a shorter pattern (max 1000 chars in regex mode).",path:["matchString"]})});const r=s;export const BulkFetchContentSchema=n(a.LOCAL_FETCH_CONTENT,r,{maxQueries:5});