@octocodeai/octocode-core 1.0.0 → 1.0.2

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 (61) hide show
  1. package/dist/configLoader.d.ts +2 -0
  2. package/dist/configLoader.js +1 -0
  3. package/dist/data/compressed.js +1 -1
  4. package/dist/index.d.ts +5 -76
  5. package/dist/index.js +1 -1
  6. package/dist/latest/index.js +2 -2
  7. package/dist/metadata-types/metadata.d.ts +2 -46
  8. package/dist/schemes/base/baseSchema.d.ts +24 -0
  9. package/dist/schemes/base/baseSchema.js +1 -0
  10. package/dist/schemes/helpers/githubSchemaHelpers.d.ts +158 -0
  11. package/dist/schemes/helpers/githubSchemaHelpers.js +1 -0
  12. package/dist/schemes/helpers/localSchemaHelpers.d.ts +164 -0
  13. package/dist/schemes/helpers/localSchemaHelpers.js +1 -0
  14. package/dist/schemes/helpers/lspSchemaBuilders.d.ts +20 -0
  15. package/dist/schemes/helpers/lspSchemaBuilders.js +1 -0
  16. package/dist/schemes/helpers/lspSchemaDescriptions.d.ts +5 -0
  17. package/dist/schemes/helpers/lspSchemaDescriptions.js +1 -0
  18. package/dist/schemes/helpers/lspSchemaHelpers.d.ts +52 -0
  19. package/dist/schemes/helpers/lspSchemaHelpers.js +1 -0
  20. package/dist/schemes/helpers/schemaHelperFactory.d.ts +3 -0
  21. package/dist/schemes/helpers/schemaHelperFactory.js +1 -0
  22. package/dist/schemes/index.d.ts +25 -0
  23. package/dist/schemes/index.js +1 -0
  24. package/dist/schemes/input/githubCloneRepo.d.ts +33 -0
  25. package/dist/schemes/input/githubCloneRepo.js +1 -0
  26. package/dist/schemes/input/githubFetchContent.d.ts +50 -0
  27. package/dist/schemes/input/githubFetchContent.js +1 -0
  28. package/dist/schemes/input/githubSearchCode.d.ts +46 -0
  29. package/dist/schemes/input/githubSearchCode.js +1 -0
  30. package/dist/schemes/input/githubSearchPullRequests.d.ts +140 -0
  31. package/dist/schemes/input/githubSearchPullRequests.js +1 -0
  32. package/dist/schemes/input/githubSearchRepos.d.ts +62 -0
  33. package/dist/schemes/input/githubSearchRepos.js +1 -0
  34. package/dist/schemes/input/githubViewRepoStructure.d.ts +40 -0
  35. package/dist/schemes/input/githubViewRepoStructure.js +1 -0
  36. package/dist/schemes/input/localFindFiles.d.ts +109 -0
  37. package/dist/schemes/input/localFindFiles.js +1 -0
  38. package/dist/schemes/input/localGetFileContent.d.ts +37 -0
  39. package/dist/schemes/input/localGetFileContent.js +1 -0
  40. package/dist/schemes/input/localSearchCode.d.ts +143 -0
  41. package/dist/schemes/input/localSearchCode.js +1 -0
  42. package/dist/schemes/input/localViewStructure.d.ts +65 -0
  43. package/dist/schemes/input/localViewStructure.js +1 -0
  44. package/dist/schemes/input/lspCallHierarchy.d.ts +45 -0
  45. package/dist/schemes/input/lspCallHierarchy.js +1 -0
  46. package/dist/schemes/input/lspFindReferences.d.ts +37 -0
  47. package/dist/schemes/input/lspFindReferences.js +1 -0
  48. package/dist/schemes/input/lspGotoDefinition.d.ts +31 -0
  49. package/dist/schemes/input/lspGotoDefinition.js +1 -0
  50. package/dist/schemes/input/packageSearch.d.ts +79 -0
  51. package/dist/schemes/input/packageSearch.js +1 -0
  52. package/dist/schemes/output/outputSchemas.d.ts +1311 -0
  53. package/dist/schemes/output/outputSchemas.js +1 -0
  54. package/dist/schemes/output/outputTypes.d.ts +66 -0
  55. package/dist/schemes/output/outputTypes.js +1 -0
  56. package/dist/toolMetadata.d.ts +2 -178
  57. package/dist/toolMetadata.js +1 -1
  58. package/dist/types.d.ts +1 -1
  59. package/dist/versionLoader.d.ts +1 -4
  60. package/dist/versionLoader.js +1 -1
  61. package/package.json +5 -1
@@ -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});
@@ -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}}