@octocodeai/octocode-core 1.0.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/configLoader.d.ts +5 -1
- package/dist/data/compressed.js +1 -1
- package/dist/data/default.json +319 -0
- package/dist/index.d.ts +2 -6
- package/dist/index.js +1 -1
- package/dist/schemas/descriptions.d.ts +17 -0
- package/dist/schemas/descriptions.js +1 -0
- package/dist/schemas/extraTypes.d.ts +205 -0
- package/dist/schemas/index.d.ts +431 -0
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/outputs.d.ts +817 -0
- package/dist/schemas/outputs.js +1 -0
- package/dist/schemas/runtime.d.ts +32 -0
- package/dist/schemas/runtime.js +1 -0
- package/dist/types/index.d.ts +383 -0
- package/dist/types/index.js +1 -0
- package/package.json +31 -8
- package/dist/latest/index.d.ts +0 -3
- package/dist/latest/index.js +0 -8
- package/dist/lib/deep-merge.d.ts +0 -7
- package/dist/lib/deep-merge.js +0 -1
- package/dist/metadata-types/metadata.d.ts +0 -44
- package/dist/schemes/base/baseSchema.d.ts +0 -24
- package/dist/schemes/base/baseSchema.js +0 -1
- package/dist/schemes/helpers/githubSchemaHelpers.d.ts +0 -158
- package/dist/schemes/helpers/githubSchemaHelpers.js +0 -1
- package/dist/schemes/helpers/localSchemaHelpers.d.ts +0 -164
- package/dist/schemes/helpers/localSchemaHelpers.js +0 -1
- package/dist/schemes/helpers/lspSchemaBuilders.d.ts +0 -20
- package/dist/schemes/helpers/lspSchemaBuilders.js +0 -1
- package/dist/schemes/helpers/lspSchemaDescriptions.d.ts +0 -5
- package/dist/schemes/helpers/lspSchemaDescriptions.js +0 -1
- package/dist/schemes/helpers/lspSchemaHelpers.d.ts +0 -52
- package/dist/schemes/helpers/lspSchemaHelpers.js +0 -1
- package/dist/schemes/helpers/schemaHelperFactory.d.ts +0 -3
- package/dist/schemes/helpers/schemaHelperFactory.js +0 -1
- package/dist/schemes/index.d.ts +0 -25
- package/dist/schemes/index.js +0 -1
- package/dist/schemes/input/githubCloneRepo.d.ts +0 -33
- package/dist/schemes/input/githubCloneRepo.js +0 -1
- package/dist/schemes/input/githubFetchContent.d.ts +0 -50
- package/dist/schemes/input/githubFetchContent.js +0 -1
- package/dist/schemes/input/githubSearchCode.d.ts +0 -46
- package/dist/schemes/input/githubSearchCode.js +0 -1
- package/dist/schemes/input/githubSearchPullRequests.d.ts +0 -140
- package/dist/schemes/input/githubSearchPullRequests.js +0 -1
- package/dist/schemes/input/githubSearchRepos.d.ts +0 -62
- package/dist/schemes/input/githubSearchRepos.js +0 -1
- package/dist/schemes/input/githubViewRepoStructure.d.ts +0 -40
- package/dist/schemes/input/githubViewRepoStructure.js +0 -1
- package/dist/schemes/input/localFindFiles.d.ts +0 -109
- package/dist/schemes/input/localFindFiles.js +0 -1
- package/dist/schemes/input/localGetFileContent.d.ts +0 -37
- package/dist/schemes/input/localGetFileContent.js +0 -1
- package/dist/schemes/input/localSearchCode.d.ts +0 -143
- package/dist/schemes/input/localSearchCode.js +0 -1
- package/dist/schemes/input/localViewStructure.d.ts +0 -65
- package/dist/schemes/input/localViewStructure.js +0 -1
- package/dist/schemes/input/lspCallHierarchy.d.ts +0 -45
- package/dist/schemes/input/lspCallHierarchy.js +0 -1
- package/dist/schemes/input/lspFindReferences.d.ts +0 -37
- package/dist/schemes/input/lspFindReferences.js +0 -1
- package/dist/schemes/input/lspGotoDefinition.d.ts +0 -31
- package/dist/schemes/input/lspGotoDefinition.js +0 -1
- package/dist/schemes/input/packageSearch.d.ts +0 -79
- package/dist/schemes/input/packageSearch.js +0 -1
- package/dist/schemes/output/outputSchemas.d.ts +0 -1311
- package/dist/schemes/output/outputSchemas.js +0 -1
- package/dist/schemes/output/outputTypes.d.ts +0 -66
- package/dist/schemes/output/outputTypes.js +0 -1
- package/dist/toolMetadata.d.ts +0 -2
- package/dist/toolMetadata.js +0 -1
- package/dist/types.d.ts +0 -54
- package/dist/types.js +0 -1
- package/dist/versionLoader.d.ts +0 -11
- package/dist/versionLoader.js +0 -1
- /package/dist/{metadata-types/metadata.js → schemas/extraTypes.js} +0 -0
package/dist/lib/deep-merge.d.ts
DELETED
package/dist/lib/deep-merge.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function deepMerge(r,e){if("object"!=typeof r||null===r||"object"!=typeof e||null===e)return e;if(Array.isArray(r)||Array.isArray(e))return e;const t={...r},o=e;for(const r of Object.keys(o)){const e=t[r],y=o[r];"object"!=typeof e||null===e||"object"!=typeof y||null===y||Array.isArray(e)||Array.isArray(y)?t[r]=y:t[r]=deepMerge(e,y)}return t}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import type { ToolNames, BaseHints } from "../types.js";
|
|
2
|
-
export interface ToolMetadata {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
schema: Record<string, string>;
|
|
6
|
-
hints: {
|
|
7
|
-
hasResults: readonly string[];
|
|
8
|
-
empty: readonly string[];
|
|
9
|
-
dynamic?: Record<string, string[] | undefined>;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export interface PromptArgument {
|
|
13
|
-
name: string;
|
|
14
|
-
description: string;
|
|
15
|
-
required?: boolean;
|
|
16
|
-
}
|
|
17
|
-
export interface PromptMetadata {
|
|
18
|
-
name: string;
|
|
19
|
-
description: string;
|
|
20
|
-
content: string;
|
|
21
|
-
args?: PromptArgument[];
|
|
22
|
-
}
|
|
23
|
-
export interface CompleteMetadata {
|
|
24
|
-
instructions: string;
|
|
25
|
-
prompts: Record<string, PromptMetadata>;
|
|
26
|
-
toolNames: ToolNames;
|
|
27
|
-
baseSchema: {
|
|
28
|
-
mainResearchGoal: string;
|
|
29
|
-
researchGoal: string;
|
|
30
|
-
reasoning: string;
|
|
31
|
-
bulkQuery: (toolName: string) => string;
|
|
32
|
-
};
|
|
33
|
-
tools: Record<string, ToolMetadata>;
|
|
34
|
-
baseHints: BaseHints;
|
|
35
|
-
genericErrorHints: readonly string[];
|
|
36
|
-
bulkOperations?: {
|
|
37
|
-
instructions?: {
|
|
38
|
-
base?: string;
|
|
39
|
-
hasResults?: string;
|
|
40
|
-
empty?: string;
|
|
41
|
-
error?: string;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
export declare const BaseQuerySchema: z.ZodObject<{
|
|
3
|
-
id: z.ZodString;
|
|
4
|
-
mainResearchGoal: z.ZodString;
|
|
5
|
-
researchGoal: z.ZodString;
|
|
6
|
-
reasoning: z.ZodString;
|
|
7
|
-
}, z.core.$strip>;
|
|
8
|
-
export declare const BaseQuerySchemaLocal: z.ZodObject<{
|
|
9
|
-
id: z.ZodString;
|
|
10
|
-
researchGoal: z.ZodString;
|
|
11
|
-
reasoning: z.ZodString;
|
|
12
|
-
}, z.core.$strip>;
|
|
13
|
-
export type BaseQuery = z.infer<typeof BaseQuerySchema>;
|
|
14
|
-
export type BaseQueryLocal = z.infer<typeof BaseQuerySchemaLocal>;
|
|
15
|
-
interface BulkQuerySchemaOptions {
|
|
16
|
-
maxQueries?: number;
|
|
17
|
-
descriptionPrefix?: string;
|
|
18
|
-
}
|
|
19
|
-
export declare function createBulkQuerySchema<T extends z.ZodType<object>>(toolName: string, singleQuerySchema: T, options?: BulkQuerySchemaOptions): z.ZodObject<{
|
|
20
|
-
queries: z.ZodArray<T>;
|
|
21
|
-
responseCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
22
|
-
responseCharLength: z.ZodOptional<z.ZodNumber>;
|
|
23
|
-
}, z.core.$strict>;
|
|
24
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as e}from"zod/v4";import{config as r}from"../../configLoader.js";const s=r.baseSchema,a=e.string().min(1).max(120).regex(/^[A-Za-z0-9._:-]+$/,"id must contain only letters, numbers, dot, underscore, colon, or dash").describe('Stable query identifier used to match each result to its input query. Required for every query. Use a short meaningful string like "react_hooks_search" or "router_prs".');export const BaseQuerySchema=e.object({id:a,mainResearchGoal:e.string().describe(s.mainResearchGoal),researchGoal:e.string().describe(s.researchGoal),reasoning:e.string().describe(s.reasoning)});export const BaseQuerySchemaLocal=e.object({id:a,researchGoal:e.string().describe(s.researchGoal),reasoning:e.string().describe(s.reasoning)});export function createBulkQuerySchema(r,a,i={}){const{maxQueries:o=3,descriptionPrefix:t}=i,n=t??(3===o?s.bulkQueryTemplate.replace("{toolName}",r):`Queries for ${r} (1–${o} per call). Review schema before use.`);return e.object({queries:e.array(a).min(1).max(o).describe(n),responseCharOffset:e.number().int().min(0).optional().describe("Character offset for top-level bulk response pagination across results[]. Use when a multi-query response was auto-paginated."),responseCharLength:e.number().int().min(1).max(5e4).optional().describe("Character budget for top-level bulk response pagination across results[]. Overrides the shared default for this call.")}).strict().superRefine((e,r)=>{const s=new Set;e.queries.forEach((e,a)=>{const i="object"==typeof e&&null!==e&&"id"in e&&"string"==typeof e.id?e.id:void 0;i&&(s.has(i)?r.addIssue({code:"custom",path:["queries",a,"id"],message:`Duplicate query id "${i}". Query ids must be unique within a single call.`}):s.add(i))})})}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
export declare const GITHUB_FETCH_CONTENT: {
|
|
2
|
-
scope: {
|
|
3
|
-
owner: string;
|
|
4
|
-
repo: string;
|
|
5
|
-
branch: string;
|
|
6
|
-
path: string;
|
|
7
|
-
};
|
|
8
|
-
processing: {
|
|
9
|
-
sanitize: string;
|
|
10
|
-
};
|
|
11
|
-
range: {
|
|
12
|
-
startLine: string;
|
|
13
|
-
endLine: string;
|
|
14
|
-
fullContent: string;
|
|
15
|
-
matchString: string;
|
|
16
|
-
matchStringContextLines: string;
|
|
17
|
-
};
|
|
18
|
-
pagination: {
|
|
19
|
-
charOffset: string;
|
|
20
|
-
charLength: string;
|
|
21
|
-
};
|
|
22
|
-
validation: {
|
|
23
|
-
parameterConflict: string;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
export declare const GITHUB_SEARCH_CODE: {
|
|
27
|
-
search: {
|
|
28
|
-
keywordsToSearch: string;
|
|
29
|
-
};
|
|
30
|
-
scope: {
|
|
31
|
-
owner: string;
|
|
32
|
-
repo: string;
|
|
33
|
-
};
|
|
34
|
-
filters: {
|
|
35
|
-
extension: string;
|
|
36
|
-
filename: string;
|
|
37
|
-
path: string;
|
|
38
|
-
match: string;
|
|
39
|
-
};
|
|
40
|
-
resultLimit: {
|
|
41
|
-
limit: string;
|
|
42
|
-
};
|
|
43
|
-
pagination: {
|
|
44
|
-
page: string;
|
|
45
|
-
};
|
|
46
|
-
processing: {
|
|
47
|
-
sanitize: string;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
export declare const GITHUB_SEARCH_REPOS: {
|
|
51
|
-
search: {
|
|
52
|
-
keywordsToSearch: string;
|
|
53
|
-
topicsToSearch: string;
|
|
54
|
-
};
|
|
55
|
-
scope: {
|
|
56
|
-
owner: string;
|
|
57
|
-
repo: string;
|
|
58
|
-
};
|
|
59
|
-
filters: {
|
|
60
|
-
stars: string;
|
|
61
|
-
size: string;
|
|
62
|
-
created: string;
|
|
63
|
-
updated: string;
|
|
64
|
-
match: string;
|
|
65
|
-
};
|
|
66
|
-
sorting: {
|
|
67
|
-
sort: string;
|
|
68
|
-
};
|
|
69
|
-
resultLimit: {
|
|
70
|
-
limit: string;
|
|
71
|
-
};
|
|
72
|
-
pagination: {
|
|
73
|
-
page: string;
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
export declare const GITHUB_SEARCH_PULL_REQUESTS: {
|
|
77
|
-
search: {
|
|
78
|
-
query: string;
|
|
79
|
-
};
|
|
80
|
-
scope: {
|
|
81
|
-
prNumber: string;
|
|
82
|
-
owner: string;
|
|
83
|
-
repo: string;
|
|
84
|
-
};
|
|
85
|
-
filters: {
|
|
86
|
-
match: string;
|
|
87
|
-
created: string;
|
|
88
|
-
updated: string;
|
|
89
|
-
state: string;
|
|
90
|
-
assignee: string;
|
|
91
|
-
author: string;
|
|
92
|
-
commenter: string;
|
|
93
|
-
involves: string;
|
|
94
|
-
mentions: string;
|
|
95
|
-
"review-requested": string;
|
|
96
|
-
"reviewed-by": string;
|
|
97
|
-
label: string;
|
|
98
|
-
"no-label": string;
|
|
99
|
-
"no-milestone": string;
|
|
100
|
-
"no-project": string;
|
|
101
|
-
"no-assignee": string;
|
|
102
|
-
head: string;
|
|
103
|
-
base: string;
|
|
104
|
-
closed: string;
|
|
105
|
-
"merged-at": string;
|
|
106
|
-
comments: string;
|
|
107
|
-
reactions: string;
|
|
108
|
-
interactions: string;
|
|
109
|
-
merged: string;
|
|
110
|
-
draft: string;
|
|
111
|
-
};
|
|
112
|
-
sorting: {
|
|
113
|
-
sort: string;
|
|
114
|
-
order: string;
|
|
115
|
-
};
|
|
116
|
-
resultLimit: {
|
|
117
|
-
limit: string;
|
|
118
|
-
};
|
|
119
|
-
pagination: {
|
|
120
|
-
page: string;
|
|
121
|
-
};
|
|
122
|
-
outputShaping: {
|
|
123
|
-
withComments: string;
|
|
124
|
-
withCommits: string;
|
|
125
|
-
type: string;
|
|
126
|
-
partialContentMetadata: string;
|
|
127
|
-
};
|
|
128
|
-
outputLimit: {
|
|
129
|
-
charOffset: string;
|
|
130
|
-
charLength: string;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
export declare const GITHUB_VIEW_REPO_STRUCTURE: {
|
|
134
|
-
scope: {
|
|
135
|
-
owner: string;
|
|
136
|
-
repo: string;
|
|
137
|
-
branch: string;
|
|
138
|
-
path: string;
|
|
139
|
-
};
|
|
140
|
-
range: {
|
|
141
|
-
depth: string;
|
|
142
|
-
};
|
|
143
|
-
pagination: {
|
|
144
|
-
entriesPerPage: string;
|
|
145
|
-
entryPageNumber: string;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
export declare const PACKAGE_SEARCH: {
|
|
149
|
-
search: {
|
|
150
|
-
ecosystem: string;
|
|
151
|
-
name: string;
|
|
152
|
-
};
|
|
153
|
-
options: {
|
|
154
|
-
searchLimit: string;
|
|
155
|
-
npmFetchMetadata: string;
|
|
156
|
-
pythonFetchMetadata: string;
|
|
157
|
-
};
|
|
158
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{TOOL_NAMES as E}from"./schemaHelperFactory.js";import{createSchemaHelper as _}from"./schemaHelperFactory.js";export const GITHUB_FETCH_CONTENT=_(E.GITHUB_FETCH_CONTENT);export const GITHUB_SEARCH_CODE=_(E.GITHUB_SEARCH_CODE);export const GITHUB_SEARCH_REPOS=_(E.GITHUB_SEARCH_REPOSITORIES);export const GITHUB_SEARCH_PULL_REQUESTS=_(E.GITHUB_SEARCH_PULL_REQUESTS);export const GITHUB_VIEW_REPO_STRUCTURE=_(E.GITHUB_VIEW_REPO_STRUCTURE);export const PACKAGE_SEARCH=_(E.PACKAGE_SEARCH);
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
export declare const LOCAL_RIPGREP: {
|
|
2
|
-
search: {
|
|
3
|
-
pattern: string;
|
|
4
|
-
path: string;
|
|
5
|
-
mode: string;
|
|
6
|
-
};
|
|
7
|
-
filters: {
|
|
8
|
-
type: string;
|
|
9
|
-
include: string;
|
|
10
|
-
exclude: string;
|
|
11
|
-
excludeDir: string;
|
|
12
|
-
binaryFiles: string;
|
|
13
|
-
noIgnore: string;
|
|
14
|
-
hidden: string;
|
|
15
|
-
followSymlinks: string;
|
|
16
|
-
};
|
|
17
|
-
options: {
|
|
18
|
-
smartCase: string;
|
|
19
|
-
caseInsensitive: string;
|
|
20
|
-
caseSensitive: string;
|
|
21
|
-
fixedString: string;
|
|
22
|
-
perlRegex: string;
|
|
23
|
-
wholeWord: string;
|
|
24
|
-
invertMatch: string;
|
|
25
|
-
multiline: string;
|
|
26
|
-
multilineDotall: string;
|
|
27
|
-
};
|
|
28
|
-
output: {
|
|
29
|
-
filesOnly: string;
|
|
30
|
-
filesWithoutMatch: string;
|
|
31
|
-
count: string;
|
|
32
|
-
countMatches: string;
|
|
33
|
-
jsonOutput: string;
|
|
34
|
-
vimgrepFormat: string;
|
|
35
|
-
includeStats: string;
|
|
36
|
-
includeDistribution: string;
|
|
37
|
-
};
|
|
38
|
-
context: {
|
|
39
|
-
contextLines: string;
|
|
40
|
-
beforeContext: string;
|
|
41
|
-
afterContext: string;
|
|
42
|
-
matchContentLength: string;
|
|
43
|
-
lineNumbers: string;
|
|
44
|
-
column: string;
|
|
45
|
-
};
|
|
46
|
-
pagination: {
|
|
47
|
-
filesPerPage: string;
|
|
48
|
-
filePageNumber: string;
|
|
49
|
-
matchesPerPage: string;
|
|
50
|
-
maxFiles: string;
|
|
51
|
-
maxMatchesPerFile: string;
|
|
52
|
-
};
|
|
53
|
-
advanced: {
|
|
54
|
-
threads: string;
|
|
55
|
-
mmap: string;
|
|
56
|
-
noUnicode: string;
|
|
57
|
-
encoding: string;
|
|
58
|
-
sort: string;
|
|
59
|
-
sortReverse: string;
|
|
60
|
-
noMessages: string;
|
|
61
|
-
lineRegexp: string;
|
|
62
|
-
passthru: string;
|
|
63
|
-
debug: string;
|
|
64
|
-
showFileLastModified: string;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
export declare const LOCAL_FETCH_CONTENT: {
|
|
68
|
-
scope: {
|
|
69
|
-
path: string;
|
|
70
|
-
};
|
|
71
|
-
range: {
|
|
72
|
-
startLine: string;
|
|
73
|
-
endLine: string;
|
|
74
|
-
};
|
|
75
|
-
options: {
|
|
76
|
-
fullContent: string;
|
|
77
|
-
matchString: string;
|
|
78
|
-
matchStringContextLines: string;
|
|
79
|
-
matchStringIsRegex: string;
|
|
80
|
-
matchStringCaseSensitive: string;
|
|
81
|
-
minified: string;
|
|
82
|
-
};
|
|
83
|
-
pagination: {
|
|
84
|
-
charOffset: string;
|
|
85
|
-
charLength: string;
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
export declare const LOCAL_FIND_FILES: {
|
|
89
|
-
scope: {
|
|
90
|
-
path: string;
|
|
91
|
-
};
|
|
92
|
-
filters: {
|
|
93
|
-
name: string;
|
|
94
|
-
iname: string;
|
|
95
|
-
names: string;
|
|
96
|
-
pathPattern: string;
|
|
97
|
-
regex: string;
|
|
98
|
-
regexType: string;
|
|
99
|
-
type: string;
|
|
100
|
-
empty: string;
|
|
101
|
-
executable: string;
|
|
102
|
-
readable: string;
|
|
103
|
-
writable: string;
|
|
104
|
-
excludeDir: string;
|
|
105
|
-
};
|
|
106
|
-
time: {
|
|
107
|
-
modifiedWithin: string;
|
|
108
|
-
modifiedBefore: string;
|
|
109
|
-
accessedWithin: string;
|
|
110
|
-
};
|
|
111
|
-
size: {
|
|
112
|
-
sizeGreater: string;
|
|
113
|
-
sizeLess: string;
|
|
114
|
-
};
|
|
115
|
-
pagination: {
|
|
116
|
-
limit: string;
|
|
117
|
-
filesPerPage: string;
|
|
118
|
-
filePageNumber: string;
|
|
119
|
-
charOffset: string;
|
|
120
|
-
charLength: string;
|
|
121
|
-
};
|
|
122
|
-
sorting: {
|
|
123
|
-
sortBy: string;
|
|
124
|
-
};
|
|
125
|
-
options: {
|
|
126
|
-
maxDepth: string;
|
|
127
|
-
minDepth: string;
|
|
128
|
-
details: string;
|
|
129
|
-
permissions: string;
|
|
130
|
-
showFileLastModified: string;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
export declare const LOCAL_VIEW_STRUCTURE: {
|
|
134
|
-
scope: {
|
|
135
|
-
path: string;
|
|
136
|
-
};
|
|
137
|
-
filters: {
|
|
138
|
-
pattern: string;
|
|
139
|
-
directoriesOnly: string;
|
|
140
|
-
filesOnly: string;
|
|
141
|
-
extension: string;
|
|
142
|
-
extensions: string;
|
|
143
|
-
hidden: string;
|
|
144
|
-
};
|
|
145
|
-
options: {
|
|
146
|
-
depth: string;
|
|
147
|
-
recursive: string;
|
|
148
|
-
details: string;
|
|
149
|
-
humanReadable: string;
|
|
150
|
-
summary: string;
|
|
151
|
-
showFileLastModified: string;
|
|
152
|
-
};
|
|
153
|
-
sorting: {
|
|
154
|
-
sortBy: string;
|
|
155
|
-
reverse: string;
|
|
156
|
-
};
|
|
157
|
-
pagination: {
|
|
158
|
-
limit: string;
|
|
159
|
-
entriesPerPage: string;
|
|
160
|
-
entryPageNumber: string;
|
|
161
|
-
charOffset: string;
|
|
162
|
-
charLength: string;
|
|
163
|
-
};
|
|
164
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{TOOL_NAMES as L}from"./schemaHelperFactory.js";import{createSchemaHelper as o}from"./schemaHelperFactory.js";export const LOCAL_RIPGREP=o(L.LOCAL_RIPGREP);export const LOCAL_FETCH_CONTENT=o(L.LOCAL_FETCH_CONTENT);export const LOCAL_FIND_FILES=o(L.LOCAL_FIND_FILES);export const LOCAL_VIEW_STRUCTURE=o(L.LOCAL_VIEW_STRUCTURE);
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
interface LspSchemaDescriptions {
|
|
3
|
-
uri: string;
|
|
4
|
-
symbolName: string;
|
|
5
|
-
lineHint: string;
|
|
6
|
-
orderHint: string;
|
|
7
|
-
charOffset?: string;
|
|
8
|
-
charLength?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function createLspCoreQueryShape(descriptions: LspSchemaDescriptions): {
|
|
11
|
-
uri: z.ZodString;
|
|
12
|
-
symbolName: z.ZodString;
|
|
13
|
-
lineHint: z.ZodNumber;
|
|
14
|
-
orderHint: z.ZodDefault<z.ZodNumber>;
|
|
15
|
-
};
|
|
16
|
-
export declare function createLspOutputPaginationShape(descriptions: Pick<LspSchemaDescriptions, "charOffset" | "charLength">): {
|
|
17
|
-
charOffset: z.ZodOptional<z.ZodNumber>;
|
|
18
|
-
charLength: z.ZodOptional<z.ZodNumber>;
|
|
19
|
-
};
|
|
20
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as e}from"zod/v4";import{LSP_QUERY_OUTPUT_PAGINATION as r}from"./lspSchemaDescriptions.js";export function createLspCoreQueryShape(r){return{uri:e.string().min(1).describe(r.uri),symbolName:e.string().min(1).max(255).describe(r.symbolName),lineHint:e.number().int().min(1).describe(r.lineHint),orderHint:e.number().int().min(0).default(0).describe(r.orderHint)}}export function createLspOutputPaginationShape(i){return{charOffset:e.number().int().min(0).optional().describe(i.charOffset||r.charOffset),charLength:e.number().int().min(1).max(5e4).optional().describe(i.charLength||r.charLength)}}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const LSP_QUERY_OUTPUT_PAGINATION: {
|
|
2
|
-
readonly charOffset: "Character offset for query-level output pagination. Use when this LSP result was auto-paginated and you need the next window.";
|
|
3
|
-
readonly charLength: "Character budget for query-level output pagination window.";
|
|
4
|
-
};
|
|
5
|
-
export declare function buildLspBulkQueryDescription(toolName: string, maxQueries: 3 | 5, guidance?: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const LSP_QUERY_OUTPUT_PAGINATION={charOffset:"Character offset for query-level output pagination. Use when this LSP result was auto-paginated and you need the next window.",charLength:"Character budget for query-level output pagination window."};export function buildLspBulkQueryDescription(e,t,r){return`Queries for ${e} (1-${t} per call). Review schema before use.${r?` ${r}`:""}`}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
export declare const LSP_GOTO_DEFINITION: {
|
|
2
|
-
scope: {
|
|
3
|
-
uri: string;
|
|
4
|
-
symbolName: string;
|
|
5
|
-
lineHint: string;
|
|
6
|
-
};
|
|
7
|
-
options: {
|
|
8
|
-
orderHint: string;
|
|
9
|
-
contextLines: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
export declare const LSP_FIND_REFERENCES: {
|
|
13
|
-
scope: {
|
|
14
|
-
uri: string;
|
|
15
|
-
symbolName: string;
|
|
16
|
-
lineHint: string;
|
|
17
|
-
};
|
|
18
|
-
options: {
|
|
19
|
-
orderHint: string;
|
|
20
|
-
includeDeclaration: string;
|
|
21
|
-
contextLines: string;
|
|
22
|
-
};
|
|
23
|
-
pagination: {
|
|
24
|
-
referencesPerPage: string;
|
|
25
|
-
page: string;
|
|
26
|
-
};
|
|
27
|
-
filtering: {
|
|
28
|
-
includePattern: string;
|
|
29
|
-
excludePattern: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export declare const LSP_CALL_HIERARCHY: {
|
|
33
|
-
scope: {
|
|
34
|
-
uri: string;
|
|
35
|
-
symbolName: string;
|
|
36
|
-
lineHint: string;
|
|
37
|
-
};
|
|
38
|
-
options: {
|
|
39
|
-
orderHint: string;
|
|
40
|
-
direction: string;
|
|
41
|
-
depth: string;
|
|
42
|
-
contextLines: string;
|
|
43
|
-
};
|
|
44
|
-
pagination: {
|
|
45
|
-
callsPerPage: string;
|
|
46
|
-
page: string;
|
|
47
|
-
};
|
|
48
|
-
outputLimit: {
|
|
49
|
-
charOffset: string;
|
|
50
|
-
charLength: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{TOOL_NAMES as o}from"./schemaHelperFactory.js";import{createSchemaHelper as E}from"./schemaHelperFactory.js";export const LSP_GOTO_DEFINITION=E(o.LSP_GOTO_DEFINITION);export const LSP_FIND_REFERENCES=E(o.LSP_FIND_REFERENCES);export const LSP_CALL_HIERARCHY=E(o.LSP_CALL_HIERARCHY);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{config as o}from"../../configLoader.js";export function createSchemaHelper(e){return new Proxy({},{get:(t,r)=>new Proxy({},{get(t,r){const n=o.tools[e];return n?.schema?.[r]??""}})})}export const TOOL_NAMES=o.toolNames;export function getToolDescription(e){return o.tools[e]?.description??""}
|
package/dist/schemes/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export { BaseQuerySchema, BaseQuerySchemaLocal, createBulkQuerySchema, type BaseQuery, type BaseQueryLocal, } from "./base/baseSchema.js";
|
|
2
|
-
export { LOCAL_RIPGREP, LOCAL_FETCH_CONTENT, LOCAL_FIND_FILES, LOCAL_VIEW_STRUCTURE, } from "./helpers/localSchemaHelpers.js";
|
|
3
|
-
export { LSP_GOTO_DEFINITION, LSP_FIND_REFERENCES, LSP_CALL_HIERARCHY, } from "./helpers/lspSchemaHelpers.js";
|
|
4
|
-
export { GITHUB_FETCH_CONTENT, GITHUB_SEARCH_CODE, GITHUB_SEARCH_REPOS, GITHUB_SEARCH_PULL_REQUESTS, GITHUB_VIEW_REPO_STRUCTURE, PACKAGE_SEARCH, } from "./helpers/githubSchemaHelpers.js";
|
|
5
|
-
export { createLspCoreQueryShape, createLspOutputPaginationShape, } from "./helpers/lspSchemaBuilders.js";
|
|
6
|
-
export { buildLspBulkQueryDescription, LSP_QUERY_OUTPUT_PAGINATION, } from "./helpers/lspSchemaDescriptions.js";
|
|
7
|
-
export { RipgrepQuerySchema, BulkRipgrepQuerySchema, LOCAL_RIPGREP_DESCRIPTION, applyWorkflowMode, validateRipgrepQuery, type RipgrepQuery, } from "./input/localSearchCode.js";
|
|
8
|
-
export { FetchContentQuerySchema, BulkFetchContentSchema, LOCAL_FETCH_CONTENT_DESCRIPTION, type FetchContentQuery, } from "./input/localGetFileContent.js";
|
|
9
|
-
export { FindFilesQuerySchema, BulkFindFilesSchema, LOCAL_FIND_FILES_DESCRIPTION, type FindFilesQuery, } from "./input/localFindFiles.js";
|
|
10
|
-
export { ViewStructureQuerySchema, BulkViewStructureSchema, LOCAL_VIEW_STRUCTURE_DESCRIPTION, type ViewStructureQuery, } from "./input/localViewStructure.js";
|
|
11
|
-
export { FileContentQuerySchema, FileContentBulkQuerySchema, type FileContentQuery, } from "./input/githubFetchContent.js";
|
|
12
|
-
export { GitHubCodeSearchQuerySchema, GitHubCodeSearchBulkQuerySchema, type GitHubCodeSearchQuery, } from "./input/githubSearchCode.js";
|
|
13
|
-
export { GitHubReposSearchSingleQuerySchema, GitHubReposSearchQuerySchema, type GitHubReposSearchQuery, } from "./input/githubSearchRepos.js";
|
|
14
|
-
export { GitHubPullRequestSearchQuerySchema, GitHubPullRequestSearchBulkQuerySchema, type GitHubPullRequestSearchQuery, } from "./input/githubSearchPullRequests.js";
|
|
15
|
-
export { GitHubViewRepoStructureQuerySchema, GitHubViewRepoStructureBulkQuerySchema, GITHUB_STRUCTURE_DEFAULTS, type GitHubViewRepoStructureQuery, } from "./input/githubViewRepoStructure.js";
|
|
16
|
-
export { CloneRepoQuerySchema, BulkCloneRepoSchema, GITHUB_CLONE_REPO_DESCRIPTION, type CloneRepoQuery, } from "./input/githubCloneRepo.js";
|
|
17
|
-
export { NpmPackageQuerySchema, PythonPackageQuerySchema, PackageSearchQuerySchema, PackageSearchBulkQuerySchema, type PackageSearchQuery, } from "./input/packageSearch.js";
|
|
18
|
-
export { LSPGotoDefinitionQuerySchema, BulkLSPGotoDefinitionSchema, LSP_GOTO_DEFINITION_DESCRIPTION, type LSPGotoDefinitionQuery, } from "./input/lspGotoDefinition.js";
|
|
19
|
-
export { LSPFindReferencesQuerySchema, BulkLSPFindReferencesSchema, LSP_FIND_REFERENCES_DESCRIPTION, type LSPFindReferencesQuery, } from "./input/lspFindReferences.js";
|
|
20
|
-
export { LSPCallHierarchyQuerySchema, BulkLSPCallHierarchySchema, LSP_CALL_HIERARCHY_DESCRIPTION, type LSPCallHierarchyQuery, } from "./input/lspCallHierarchy.js";
|
|
21
|
-
export { ErrorDataSchema, EmptyDataSchema, BulkToolOutputSchema, GitHubFetchContentDataSchema, GitHubFetchContentOutputSchema, GitHubSearchCodeDataSchema, GitHubSearchCodeOutputSchema, GitHubSearchPullRequestsDataSchema, GitHubSearchPullRequestsOutputSchema, GitHubSearchRepositoriesDataSchema, GitHubSearchRepositoriesOutputSchema, GitHubViewRepoStructureDataSchema, GitHubViewRepoStructureOutputSchema, GitHubCloneRepoDataSchema, GitHubCloneRepoOutputSchema, PackageSearchDataSchema, PackageSearchOutputSchema, LocalSearchCodeDataSchema, LocalSearchCodeOutputSchema, LocalGetFileContentDataSchema, LocalGetFileContentOutputSchema, LocalFindFilesDataSchema, LocalFindFilesOutputSchema, LocalViewStructureDataSchema, LocalViewStructureOutputSchema, LspGotoDefinitionDataSchema, LspGotoDefinitionOutputSchema, LspFindReferencesDataSchema, LspFindReferencesOutputSchema, LspCallHierarchyDataSchema, LspCallHierarchyOutputSchema, } from "./output/outputSchemas.js";
|
|
22
|
-
export type { OutputStatus, ErrorOutputData, EmptyOutputData, ToolResult, } from "./output/outputTypes.js";
|
|
23
|
-
export type { GitHubCloneRepoData, GitHubCloneRepoToolResult, GitHubFetchContentData, GitHubFetchContentToolResult, GitHubDirectoryFileEntry, GitHubSearchCodeData, GitHubSearchCodeToolResult, GitHubCodeSearchFile, GitHubSearchPullRequestsData, GitHubSearchPullRequestsToolResult, GitHubPullRequestOutput, GitHubSearchPullRequestsPagination, GitHubSearchRepositoriesData, GitHubSearchRepositoriesToolResult, GitHubRepositoryOutput, GitHubViewRepoStructureData, GitHubViewRepoStructureToolResult, GitHubRepoStructureDirectoryEntry, PackageSearchData, PackageSearchToolResult, PackageSearchPackage, } from "./output/outputTypes.js";
|
|
24
|
-
export type { LocalSearchCodeData, LocalSearchCodeToolResult, LocalSearchCodeFile, LocalSearchCodeMatch, LocalSearchCodePagination, LocalSearchCodeMatchPagination, LocalGetFileContentData, LocalGetFileContentToolResult, LocalGetFileContentPagination, LocalGetFileContentMatchRange, LocalFindFilesData, LocalFindFilesToolResult, LocalFindFilesEntry, LocalFindFilesPagination, LocalViewStructureData, LocalViewStructureToolResult, LocalViewStructureEntry, LocalViewStructurePagination, } from "./output/outputTypes.js";
|
|
25
|
-
export type { LspGotoDefinitionData, LspGotoDefinitionToolResult, LspExactPosition, LspCodeSnippet, LspRange, LspSymbolKind, LspFindReferencesData, LspFindReferencesToolResult, LspReferenceLocation, LspFindReferencesPagination, LspCallHierarchyData, LspCallHierarchyToolResult, LspCallHierarchyItem, LspIncomingCall, LspOutgoingCall, LspCallHierarchyPagination, } from "./output/outputTypes.js";
|
package/dist/schemes/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{BaseQuerySchema,BaseQuerySchemaLocal,createBulkQuerySchema}from"./base/baseSchema.js";export{LOCAL_RIPGREP,LOCAL_FETCH_CONTENT,LOCAL_FIND_FILES,LOCAL_VIEW_STRUCTURE}from"./helpers/localSchemaHelpers.js";export{LSP_GOTO_DEFINITION,LSP_FIND_REFERENCES,LSP_CALL_HIERARCHY}from"./helpers/lspSchemaHelpers.js";export{GITHUB_FETCH_CONTENT,GITHUB_SEARCH_CODE,GITHUB_SEARCH_REPOS,GITHUB_SEARCH_PULL_REQUESTS,GITHUB_VIEW_REPO_STRUCTURE,PACKAGE_SEARCH}from"./helpers/githubSchemaHelpers.js";export{createLspCoreQueryShape,createLspOutputPaginationShape}from"./helpers/lspSchemaBuilders.js";export{buildLspBulkQueryDescription,LSP_QUERY_OUTPUT_PAGINATION}from"./helpers/lspSchemaDescriptions.js";export{RipgrepQuerySchema,BulkRipgrepQuerySchema,LOCAL_RIPGREP_DESCRIPTION,applyWorkflowMode,validateRipgrepQuery}from"./input/localSearchCode.js";export{FetchContentQuerySchema,BulkFetchContentSchema,LOCAL_FETCH_CONTENT_DESCRIPTION}from"./input/localGetFileContent.js";export{FindFilesQuerySchema,BulkFindFilesSchema,LOCAL_FIND_FILES_DESCRIPTION}from"./input/localFindFiles.js";export{ViewStructureQuerySchema,BulkViewStructureSchema,LOCAL_VIEW_STRUCTURE_DESCRIPTION}from"./input/localViewStructure.js";export{FileContentQuerySchema,FileContentBulkQuerySchema}from"./input/githubFetchContent.js";export{GitHubCodeSearchQuerySchema,GitHubCodeSearchBulkQuerySchema}from"./input/githubSearchCode.js";export{GitHubReposSearchSingleQuerySchema,GitHubReposSearchQuerySchema}from"./input/githubSearchRepos.js";export{GitHubPullRequestSearchQuerySchema,GitHubPullRequestSearchBulkQuerySchema}from"./input/githubSearchPullRequests.js";export{GitHubViewRepoStructureQuerySchema,GitHubViewRepoStructureBulkQuerySchema,GITHUB_STRUCTURE_DEFAULTS}from"./input/githubViewRepoStructure.js";export{CloneRepoQuerySchema,BulkCloneRepoSchema,GITHUB_CLONE_REPO_DESCRIPTION}from"./input/githubCloneRepo.js";export{NpmPackageQuerySchema,PythonPackageQuerySchema,PackageSearchQuerySchema,PackageSearchBulkQuerySchema}from"./input/packageSearch.js";export{LSPGotoDefinitionQuerySchema,BulkLSPGotoDefinitionSchema,LSP_GOTO_DEFINITION_DESCRIPTION}from"./input/lspGotoDefinition.js";export{LSPFindReferencesQuerySchema,BulkLSPFindReferencesSchema,LSP_FIND_REFERENCES_DESCRIPTION}from"./input/lspFindReferences.js";export{LSPCallHierarchyQuerySchema,BulkLSPCallHierarchySchema,LSP_CALL_HIERARCHY_DESCRIPTION}from"./input/lspCallHierarchy.js";export{ErrorDataSchema,EmptyDataSchema,BulkToolOutputSchema,GitHubFetchContentDataSchema,GitHubFetchContentOutputSchema,GitHubSearchCodeDataSchema,GitHubSearchCodeOutputSchema,GitHubSearchPullRequestsDataSchema,GitHubSearchPullRequestsOutputSchema,GitHubSearchRepositoriesDataSchema,GitHubSearchRepositoriesOutputSchema,GitHubViewRepoStructureDataSchema,GitHubViewRepoStructureOutputSchema,GitHubCloneRepoDataSchema,GitHubCloneRepoOutputSchema,PackageSearchDataSchema,PackageSearchOutputSchema,LocalSearchCodeDataSchema,LocalSearchCodeOutputSchema,LocalGetFileContentDataSchema,LocalGetFileContentOutputSchema,LocalFindFilesDataSchema,LocalFindFilesOutputSchema,LocalViewStructureDataSchema,LocalViewStructureOutputSchema,LspGotoDefinitionDataSchema,LspGotoDefinitionOutputSchema,LspFindReferencesDataSchema,LspFindReferencesOutputSchema,LspCallHierarchyDataSchema,LspCallHierarchyOutputSchema}from"./output/outputSchemas.js";
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { z } from "zod/v4";
|
|
2
|
-
export declare const CloneRepoQuerySchema: 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
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
10
|
-
sparse_path: z.ZodOptional<z.ZodString>;
|
|
11
|
-
forceRefresh: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
12
|
-
charOffset: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
charLength: z.ZodOptional<z.ZodNumber>;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
export type CloneRepoQuery = z.infer<typeof CloneRepoQuerySchema>;
|
|
16
|
-
export declare const BulkCloneRepoSchema: z.ZodObject<{
|
|
17
|
-
queries: z.ZodArray<z.ZodObject<{
|
|
18
|
-
id: z.ZodString;
|
|
19
|
-
mainResearchGoal: z.ZodString;
|
|
20
|
-
researchGoal: z.ZodString;
|
|
21
|
-
reasoning: z.ZodString;
|
|
22
|
-
owner: z.ZodString;
|
|
23
|
-
repo: z.ZodString;
|
|
24
|
-
branch: z.ZodOptional<z.ZodString>;
|
|
25
|
-
sparse_path: z.ZodOptional<z.ZodString>;
|
|
26
|
-
forceRefresh: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
27
|
-
charOffset: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
charLength: z.ZodOptional<z.ZodNumber>;
|
|
29
|
-
}, z.core.$strip>>;
|
|
30
|
-
responseCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
31
|
-
responseCharLength: z.ZodOptional<z.ZodNumber>;
|
|
32
|
-
}, z.core.$strict>;
|
|
33
|
-
export declare const GITHUB_CLONE_REPO_DESCRIPTION: string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{z as e}from"zod/v4";import{BaseQuerySchema as o,createBulkQuerySchema as a}from"../base/baseSchema.js";import{TOOL_NAMES as t}from"../helpers/schemaHelperFactory.js";const r=/^(?!\.\.?$)(?!.*\.\.)[a-zA-Z0-9._-]+$/;export const CloneRepoQuerySchema=o.extend({owner:e.string().min(1).max(200).regex(r,'Invalid owner: must be a valid GitHub identifier (no path separators or "..")').describe('Repository owner or organisation (e.g. "facebook")'),repo:e.string().min(1).max(150).regex(r,'Invalid repo: must be a valid GitHub identifier (no path separators or "..")').describe('Repository name (e.g. "react")'),branch:e.string().min(1).max(255).regex(/^(?!-)(?!.*\.\.)(?!.*\\)[a-zA-Z0-9._/-]+$/,'Invalid branch: must not contain ".." or start with "-"').optional().describe('Branch to clone. Omit to use the repository\'s default branch (usually "main").'),sparse_path:e.string().min(1).max(500).regex(/^(?!-)(?!.*\.\.)(?!.*\\)[a-zA-Z0-9._/@-]+$/,'Invalid sparse_path: must not contain ".." or start with "-"').refine(e=>!e.startsWith("/"),{message:"sparse_path must be a relative path (no leading /)"}).optional().describe('Fetch only this subdirectory (sparse checkout). Dramatically faster for large monorepos – only matching files are downloaded. Examples: "src/compiler", "packages/core/src", "lib/utils". Omit to clone the entire repository.'),forceRefresh:e.boolean().optional().default(!1).describe("When true, bypass the cache and force a fresh clone even if a valid cached copy exists. Useful when you know upstream has changed."),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 BulkCloneRepoSchema=a(t.GITHUB_CLONE_REPO,CloneRepoQuerySchema,{maxQueries:3});export const GITHUB_CLONE_REPO_DESCRIPTION=["## Clone or partially fetch a GitHub repository for deep local analysis","","Downloads a repository (or a subdirectory of it) to the local octocode","home directory so that **local filesystem tools** and **LSP semantic tools**","can analyse the code offline.","","### Two modes","","| Mode | When to use | Parameter |","|------|-------------|-----------|","| **Full clone** | General exploration, LSP needs full project context | _(default)_ |","| **Partial fetch** | Large monorepo, only need a specific package/dir | `sparse_path` |","","### How it works","","1. `git clone --depth 1 --single-branch` (shallow, fast)","2. If `sparse_path` is set → `git sparse-checkout set <path>` (only that tree)","3. Result cached for **24 hours** under `~/.octocode/repos/`","4. Returns `localPath` – pass it to local tools for analysis","","### Branch resolution","","- If `branch` is provided, that branch is cloned.","- If `branch` is omitted, the **default branch** is auto-detected via the GitHub API (falls back to `main`, then `master`).","- The resolved branch name is always included in the result and the cache path.","","### Cache path format","","```","~/.octocode/repos/{owner}/{repo}/{branch}/ ← full clone","~/.octocode/repos/{owner}/{repo}/{branch}__sp_{hash}/ ← sparse checkout","```","","### After cloning, use these tools on `localPath`:","","- `localSearchCode` – ripgrep code search","- `localGetFileContent` – read files","- `localViewStructure` – browse directory tree","- `localFindFiles` – find files by name/metadata","- `lspGotoDefinition` – jump to symbol definitions","- `lspFindReferences` – find all usages of a symbol","- `lspCallHierarchy` – trace call relationships"].join("\n");
|
|
@@ -1,50 +0,0 @@
|
|
|
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>;
|
|
@@ -1 +0,0 @@
|
|
|
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);
|