@octocodeai/octocode-tools-core 16.2.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/commands/BaseCommandBuilder.d.ts +14 -0
- package/dist/commands/FindCommandBuilder.d.ts +23 -0
- package/dist/commands/LsCommandBuilder.d.ts +15 -0
- package/dist/commands/RipgrepCommandBuilder.d.ts +27 -0
- package/dist/config.d.ts +16 -0
- package/dist/direct.d.ts +3 -0
- package/dist/direct.js +53 -0
- package/dist/errors/ToolError.d.ts +21 -0
- package/dist/errors/domainErrors.d.ts +310 -0
- package/dist/errors/errorFactories.d.ts +12 -0
- package/dist/errors/localToolErrors.d.ts +29 -0
- package/dist/errors/pathUtils.d.ts +1 -0
- package/dist/github/client.d.ts +12 -0
- package/dist/github/codeSearch.d.ts +8 -0
- package/dist/github/directoryFetch.d.ts +5 -0
- package/dist/github/errorConstants.d.ts +81 -0
- package/dist/github/errors.d.ts +3 -0
- package/dist/github/fileContent.d.ts +4 -0
- package/dist/github/fileContentProcess.d.ts +11 -0
- package/dist/github/fileContentRaw.d.ts +12 -0
- package/dist/github/githubAPI.d.ts +237 -0
- package/dist/github/history.d.ts +16 -0
- package/dist/github/prByNumber.d.ts +5 -0
- package/dist/github/prContentFetcher.d.ts +5 -0
- package/dist/github/prTransformation.d.ts +109 -0
- package/dist/github/pullRequestSearch.d.ts +4 -0
- package/dist/github/queryBuilders.d.ts +12 -0
- package/dist/github/repoSearch.d.ts +25 -0
- package/dist/github/repoStructure.d.ts +7 -0
- package/dist/github/repoStructurePagination.d.ts +6 -0
- package/dist/github/repoStructureRecursive.d.ts +3 -0
- package/dist/github/responseHeaders.d.ts +1 -0
- package/dist/hints/dynamic.d.ts +6 -0
- package/dist/hints/index.d.ts +2 -0
- package/dist/hints/types.d.ts +1 -0
- package/dist/index.d.ts +187 -0
- package/dist/index.js +64 -0
- package/dist/providers/capabilities.d.ts +2 -0
- package/dist/providers/factory.d.ts +9 -0
- package/dist/providers/github/GitHubProvider.d.ts +14 -0
- package/dist/providers/github/githubContent.d.ts +9 -0
- package/dist/providers/github/githubPullRequests.d.ts +12 -0
- package/dist/providers/github/githubSearch.d.ts +12 -0
- package/dist/providers/github/githubStructure.d.ts +9 -0
- package/dist/providers/github/utils.d.ts +10 -0
- package/dist/providers/providerQueries.d.ts +111 -0
- package/dist/providers/providerResults.d.ts +175 -0
- package/dist/providers/types.d.ts +48 -0
- package/dist/responses.d.ts +47 -0
- package/dist/scheme/coreSchemas.d.ts +10 -0
- package/dist/scheme/fields.d.ts +13 -0
- package/dist/scheme/responseEnvelope.d.ts +16 -0
- package/dist/security/bridge.d.ts +10 -0
- package/dist/serverConfig.d.ts +23 -0
- package/dist/session.d.ts +25 -0
- package/dist/tools/directToolCatalog.d.ts +56 -0
- package/dist/tools/executionGuard.d.ts +14 -0
- package/dist/tools/github_clone_repo/cache.d.ts +21 -0
- package/dist/tools/github_clone_repo/cloneRepo.d.ts +6 -0
- package/dist/tools/github_clone_repo/execution.d.ts +8 -0
- package/dist/tools/github_clone_repo/hints.d.ts +2 -0
- package/dist/tools/github_clone_repo/scheme.d.ts +50 -0
- package/dist/tools/github_clone_repo/types.d.ts +19 -0
- package/dist/tools/github_fetch_content/execution.d.ts +7 -0
- package/dist/tools/github_fetch_content/finalizer.d.ts +10 -0
- package/dist/tools/github_fetch_content/hints.d.ts +2 -0
- package/dist/tools/github_fetch_content/scheme.d.ts +120 -0
- package/dist/tools/github_fetch_content/types.d.ts +66 -0
- package/dist/tools/github_search_code/execution.d.ts +8 -0
- package/dist/tools/github_search_code/finalizer.d.ts +6 -0
- package/dist/tools/github_search_code/hints.d.ts +2 -0
- package/dist/tools/github_search_code/scheme.d.ts +88 -0
- package/dist/tools/github_search_pull_requests/contentRequest.d.ts +52 -0
- package/dist/tools/github_search_pull_requests/contentResponse.d.ts +18 -0
- package/dist/tools/github_search_pull_requests/execution.d.ts +17 -0
- package/dist/tools/github_search_pull_requests/hints.d.ts +2 -0
- package/dist/tools/github_search_pull_requests/scheme.d.ts +224 -0
- package/dist/tools/github_search_pull_requests/types.d.ts +120 -0
- package/dist/tools/github_search_repos/execution.d.ts +17 -0
- package/dist/tools/github_search_repos/hints.d.ts +2 -0
- package/dist/tools/github_search_repos/scheme.d.ts +96 -0
- package/dist/tools/github_view_repo_structure/constants.d.ts +4 -0
- package/dist/tools/github_view_repo_structure/execution.d.ts +20 -0
- package/dist/tools/github_view_repo_structure/hints.d.ts +2 -0
- package/dist/tools/github_view_repo_structure/scheme.d.ts +81 -0
- package/dist/tools/github_view_repo_structure/types.d.ts +39 -0
- package/dist/tools/local_binary_inspect/archiveOps.d.ts +22 -0
- package/dist/tools/local_binary_inspect/binaryInspector.d.ts +49 -0
- package/dist/tools/local_binary_inspect/binaryOps.d.ts +18 -0
- package/dist/tools/local_binary_inspect/decompressOps.d.ts +16 -0
- package/dist/tools/local_binary_inspect/execution.d.ts +4 -0
- package/dist/tools/local_binary_inspect/scheme.d.ts +44 -0
- package/dist/tools/local_fetch_content/contentExtractor.d.ts +9 -0
- package/dist/tools/local_fetch_content/execution.d.ts +5 -0
- package/dist/tools/local_fetch_content/fetchContent.d.ts +4 -0
- package/dist/tools/local_fetch_content/hints.d.ts +2 -0
- package/dist/tools/local_fetch_content/scheme.d.ts +31 -0
- package/dist/tools/local_find_files/execution.d.ts +5 -0
- package/dist/tools/local_find_files/findFiles.d.ts +11 -0
- package/dist/tools/local_find_files/hints.d.ts +2 -0
- package/dist/tools/local_find_files/scheme.d.ts +9 -0
- package/dist/tools/local_ripgrep/execution.d.ts +5 -0
- package/dist/tools/local_ripgrep/grepFallbackExecutor.d.ts +3 -0
- package/dist/tools/local_ripgrep/hints.d.ts +2 -0
- package/dist/tools/local_ripgrep/patternValidation.d.ts +12 -0
- package/dist/tools/local_ripgrep/ripgrepExecutor.d.ts +3 -0
- package/dist/tools/local_ripgrep/ripgrepParser.d.ts +9 -0
- package/dist/tools/local_ripgrep/ripgrepResultBuilder.d.ts +9 -0
- package/dist/tools/local_ripgrep/scheme.d.ts +55 -0
- package/dist/tools/local_ripgrep/searchContentRipgrep.d.ts +5 -0
- package/dist/tools/local_ripgrep/structuralSearch.d.ts +9 -0
- package/dist/tools/local_view_structure/execution.d.ts +5 -0
- package/dist/tools/local_view_structure/hints.d.ts +2 -0
- package/dist/tools/local_view_structure/local_view_structure.d.ts +7 -0
- package/dist/tools/local_view_structure/scheme.d.ts +33 -0
- package/dist/tools/local_view_structure/structureFilters.d.ts +33 -0
- package/dist/tools/local_view_structure/structureParser.d.ts +3 -0
- package/dist/tools/local_view_structure/structureResponse.d.ts +32 -0
- package/dist/tools/local_view_structure/structureWalker.d.ts +24 -0
- package/dist/tools/lsp/semantic_content/execution.d.ts +4 -0
- package/dist/tools/lsp/semantic_content/hints.d.ts +4 -0
- package/dist/tools/lsp/semantic_content/index.d.ts +2 -0
- package/dist/tools/lsp/semantic_content/scheme.d.ts +509 -0
- package/dist/tools/lsp/shared/callHierarchyTraversal.d.ts +11 -0
- package/dist/tools/lsp/shared/resolveSymbolAnchor.d.ts +20 -0
- package/dist/tools/lsp/shared/semanticTypes.d.ts +134 -0
- package/dist/tools/package_search/execution.d.ts +7 -0
- package/dist/tools/package_search/hints.d.ts +2 -0
- package/dist/tools/package_search/scheme.d.ts +51 -0
- package/dist/tools/providerExecution.d.ts +51 -0
- package/dist/tools/providerMappers.d.ts +277 -0
- package/dist/tools/toolConfig.d.ts +41 -0
- package/dist/tools/toolMetadata/baseSchema.d.ts +2 -0
- package/dist/tools/toolMetadata/descriptions.d.ts +1 -0
- package/dist/tools/toolMetadata/gateway.d.ts +7 -0
- package/dist/tools/toolMetadata/metadataPresence.d.ts +1 -0
- package/dist/tools/toolMetadata/names.d.ts +2 -0
- package/dist/tools/toolMetadata/proxies.d.ts +10 -0
- package/dist/tools/toolMetadata/state.d.ts +5 -0
- package/dist/tools/toolMetadata/types.d.ts +2 -0
- package/dist/tools/toolNames.d.ts +2 -0
- package/dist/tools/utils.d.ts +27 -0
- package/dist/types/bulk.d.ts +41 -0
- package/dist/types/execution.d.ts +11 -0
- package/dist/types/metadata.d.ts +69 -0
- package/dist/types/promise.d.ts +12 -0
- package/dist/types/responseTypes.d.ts +57 -0
- package/dist/types/server.d.ts +15 -0
- package/dist/types/session.d.ts +29 -0
- package/dist/types/toolResults.d.ts +62 -0
- package/dist/utils/contextUtils.d.ts +31 -0
- package/dist/utils/core/bestEffort.d.ts +2 -0
- package/dist/utils/core/compare.d.ts +1 -0
- package/dist/utils/core/constants.d.ts +47 -0
- package/dist/utils/core/promise.d.ts +2 -0
- package/dist/utils/core/safeRegex.d.ts +5 -0
- package/dist/utils/core/types.d.ts +50 -0
- package/dist/utils/environment/environmentDetection.d.ts +5 -0
- package/dist/utils/exec/commandAvailability.d.ts +19 -0
- package/dist/utils/exec/npm.d.ts +16 -0
- package/dist/utils/exec/ripgrepBinary.d.ts +3 -0
- package/dist/utils/exec/safe.d.ts +2 -0
- package/dist/utils/exec/spawn.d.ts +34 -0
- package/dist/utils/file/byteOffset.d.ts +12 -0
- package/dist/utils/file/filters.d.ts +11 -0
- package/dist/utils/file/size.d.ts +2 -0
- package/dist/utils/file/toolHelpers.d.ts +28 -0
- package/dist/utils/http/cache.d.ts +16 -0
- package/dist/utils/http/circuitBreaker.d.ts +17 -0
- package/dist/utils/http/fetch.d.ts +13 -0
- package/dist/utils/package/common.d.ts +5 -0
- package/dist/utils/package/npm.d.ts +8 -0
- package/dist/utils/package/schemas.d.ts +60 -0
- package/dist/utils/package/types.d.ts +55 -0
- package/dist/utils/pagination/boundary.d.ts +11 -0
- package/dist/utils/pagination/charLimit.d.ts +3 -0
- package/dist/utils/pagination/core.d.ts +15 -0
- package/dist/utils/pagination/hints.d.ts +3 -0
- package/dist/utils/pagination/outputSizeLimit.d.ts +16 -0
- package/dist/utils/pagination/types.d.ts +43 -0
- package/dist/utils/parsers/diff.d.ts +2 -0
- package/dist/utils/parsers/ripgrep.d.ts +11 -0
- package/dist/utils/parsers/schemas.d.ts +72 -0
- package/dist/utils/response/bulk.d.ts +5 -0
- package/dist/utils/response/callToolResult.d.ts +3 -0
- package/dist/utils/response/charSavings.d.ts +3 -0
- package/dist/utils/response/error.d.ts +20 -0
- package/dist/utils/response/groupedFinalizer.d.ts +37 -0
- package/dist/utils/response/pathRelativize.d.ts +9 -0
- package/dist/utils/response/structuredPagination.d.ts +9 -0
- package/dist/zod.d.ts +1 -0
- package/dist/zod.js +8 -0
- package/package.json +66 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GitHubPullRequestSearchQueryLocalSchema: z.ZodObject<{
|
|
3
|
+
type: z.ZodDefault<z.ZodEnum<{
|
|
4
|
+
prs: "prs";
|
|
5
|
+
commits: "commits";
|
|
6
|
+
}>>;
|
|
7
|
+
since: z.ZodOptional<z.ZodString>;
|
|
8
|
+
until: z.ZodOptional<z.ZodString>;
|
|
9
|
+
path: z.ZodOptional<z.ZodString>;
|
|
10
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
11
|
+
perPage: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
12
|
+
includeDiff: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
13
|
+
keywordsToSearch: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
+
query: z.ZodOptional<z.ZodString>;
|
|
15
|
+
prNumber: z.ZodOptional<z.ZodNumber>;
|
|
16
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
17
|
+
repo: z.ZodOptional<z.ZodString>;
|
|
18
|
+
concise: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
state: z.ZodOptional<z.ZodEnum<{
|
|
20
|
+
open: "open";
|
|
21
|
+
closed: "closed";
|
|
22
|
+
merged: "merged";
|
|
23
|
+
}>>;
|
|
24
|
+
assignee: z.ZodOptional<z.ZodString>;
|
|
25
|
+
author: z.ZodOptional<z.ZodString>;
|
|
26
|
+
commenter: z.ZodOptional<z.ZodString>;
|
|
27
|
+
involves: z.ZodOptional<z.ZodString>;
|
|
28
|
+
mentions: z.ZodOptional<z.ZodString>;
|
|
29
|
+
"review-requested": z.ZodOptional<z.ZodString>;
|
|
30
|
+
"reviewed-by": z.ZodOptional<z.ZodString>;
|
|
31
|
+
label: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
32
|
+
milestone: z.ZodOptional<z.ZodString>;
|
|
33
|
+
language: z.ZodOptional<z.ZodString>;
|
|
34
|
+
checks: z.ZodOptional<z.ZodEnum<{
|
|
35
|
+
success: "success";
|
|
36
|
+
failure: "failure";
|
|
37
|
+
pending: "pending";
|
|
38
|
+
}>>;
|
|
39
|
+
review: z.ZodOptional<z.ZodEnum<{
|
|
40
|
+
none: "none";
|
|
41
|
+
approved: "approved";
|
|
42
|
+
changes_requested: "changes_requested";
|
|
43
|
+
required: "required";
|
|
44
|
+
}>>;
|
|
45
|
+
locked: z.ZodOptional<z.ZodBoolean>;
|
|
46
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
47
|
+
public: "public";
|
|
48
|
+
private: "private";
|
|
49
|
+
}>>;
|
|
50
|
+
"team-mentions": z.ZodOptional<z.ZodString>;
|
|
51
|
+
project: z.ZodOptional<z.ZodString>;
|
|
52
|
+
"no-label": z.ZodOptional<z.ZodBoolean>;
|
|
53
|
+
"no-milestone": z.ZodOptional<z.ZodBoolean>;
|
|
54
|
+
"no-project": z.ZodOptional<z.ZodBoolean>;
|
|
55
|
+
"no-assignee": z.ZodOptional<z.ZodBoolean>;
|
|
56
|
+
head: z.ZodOptional<z.ZodString>;
|
|
57
|
+
base: z.ZodOptional<z.ZodString>;
|
|
58
|
+
created: z.ZodOptional<z.ZodString>;
|
|
59
|
+
updated: z.ZodOptional<z.ZodString>;
|
|
60
|
+
closed: z.ZodOptional<z.ZodString>;
|
|
61
|
+
"merged-at": z.ZodOptional<z.ZodString>;
|
|
62
|
+
comments: z.ZodOptional<z.ZodString>;
|
|
63
|
+
reactions: z.ZodOptional<z.ZodString>;
|
|
64
|
+
interactions: z.ZodOptional<z.ZodString>;
|
|
65
|
+
draft: z.ZodOptional<z.ZodBoolean>;
|
|
66
|
+
match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
67
|
+
comments: "comments";
|
|
68
|
+
title: "title";
|
|
69
|
+
body: "body";
|
|
70
|
+
}>>>;
|
|
71
|
+
sort: z.ZodOptional<z.ZodEnum<{
|
|
72
|
+
created: "created";
|
|
73
|
+
updated: "updated";
|
|
74
|
+
"best-match": "best-match";
|
|
75
|
+
comments: "comments";
|
|
76
|
+
reactions: "reactions";
|
|
77
|
+
}>>;
|
|
78
|
+
order: z.ZodOptional<z.ZodEnum<{
|
|
79
|
+
asc: "asc";
|
|
80
|
+
desc: "desc";
|
|
81
|
+
}>>;
|
|
82
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
83
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
84
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
85
|
+
filePage: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
commentPage: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
commitPage: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
itemsPerPage: z.ZodDefault<z.ZodNumber>;
|
|
89
|
+
reviewMode: z.ZodOptional<z.ZodLiteral<"full">>;
|
|
90
|
+
content: z.ZodOptional<z.ZodObject<{
|
|
91
|
+
metadata: z.ZodOptional<z.ZodBoolean>;
|
|
92
|
+
body: z.ZodOptional<z.ZodBoolean>;
|
|
93
|
+
changedFiles: z.ZodOptional<z.ZodBoolean>;
|
|
94
|
+
patches: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
mode: z.ZodDefault<z.ZodEnum<{
|
|
96
|
+
none: "none";
|
|
97
|
+
selected: "selected";
|
|
98
|
+
all: "all";
|
|
99
|
+
}>>;
|
|
100
|
+
files: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
101
|
+
ranges: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
+
file: z.ZodString;
|
|
103
|
+
additions: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
104
|
+
deletions: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
105
|
+
}, z.core.$strip>>>;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
comments: z.ZodOptional<z.ZodObject<{
|
|
108
|
+
discussion: z.ZodOptional<z.ZodBoolean>;
|
|
109
|
+
reviewInline: z.ZodOptional<z.ZodBoolean>;
|
|
110
|
+
includeBots: z.ZodDefault<z.ZodBoolean>;
|
|
111
|
+
file: z.ZodOptional<z.ZodString>;
|
|
112
|
+
}, z.core.$strip>>;
|
|
113
|
+
reviews: z.ZodOptional<z.ZodBoolean>;
|
|
114
|
+
commits: z.ZodOptional<z.ZodObject<{
|
|
115
|
+
list: z.ZodOptional<z.ZodBoolean>;
|
|
116
|
+
includeFiles: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
+
}, z.core.$strip>>;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
matchString: z.ZodOptional<z.ZodString>;
|
|
120
|
+
commentBodyOffset: z.ZodOptional<z.ZodNumber>;
|
|
121
|
+
charOffset: z.ZodOptional<z.ZodNumber>;
|
|
122
|
+
charLength: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
minify: z.ZodDefault<z.ZodEnum<{
|
|
124
|
+
none: "none";
|
|
125
|
+
standard: "standard";
|
|
126
|
+
}>>;
|
|
127
|
+
id: z.ZodOptional<z.ZodString>;
|
|
128
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
129
|
+
researchGoal: z.ZodOptional<z.ZodString>;
|
|
130
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
export declare const GitHubPullRequestSearchBulkQueryLocalSchema: z.ZodObject<{
|
|
133
|
+
responseCharOffset: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>>;
|
|
134
|
+
responseCharLength: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>>;
|
|
135
|
+
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
export declare const GitHubSearchPullRequestsOutputLocalSchema: z.ZodObject<{
|
|
138
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
139
|
+
empty: import("@octocodeai/octocode-core/types").ToolStatus.Empty;
|
|
140
|
+
error: import("@octocodeai/octocode-core/types").ToolStatus.Error;
|
|
141
|
+
}>>;
|
|
142
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
143
|
+
pull_requests: z.ZodArray<z.ZodObject<{
|
|
144
|
+
number: z.ZodNumber;
|
|
145
|
+
title: z.ZodString;
|
|
146
|
+
url: z.ZodOptional<z.ZodString>;
|
|
147
|
+
state: z.ZodOptional<z.ZodString>;
|
|
148
|
+
draft: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
+
merged: z.ZodOptional<z.ZodBoolean>;
|
|
150
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
151
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
152
|
+
closed_at: z.ZodOptional<z.ZodString>;
|
|
153
|
+
merged_at: z.ZodOptional<z.ZodString>;
|
|
154
|
+
author: z.ZodOptional<z.ZodString>;
|
|
155
|
+
head_ref: z.ZodOptional<z.ZodString>;
|
|
156
|
+
base_ref: z.ZodOptional<z.ZodString>;
|
|
157
|
+
}, z.core.$loose>>;
|
|
158
|
+
total_count: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
pagination: z.ZodOptional<z.ZodObject<{
|
|
160
|
+
currentPage: z.ZodNumber;
|
|
161
|
+
totalPages: z.ZodNumber;
|
|
162
|
+
hasMore: z.ZodBoolean;
|
|
163
|
+
perPage: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
totalMatches: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
totalFiles: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
totalEntries: z.ZodOptional<z.ZodNumber>;
|
|
167
|
+
totalResults: z.ZodOptional<z.ZodNumber>;
|
|
168
|
+
entriesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
169
|
+
filesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
170
|
+
matchesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
}, z.core.$strip>>;
|
|
172
|
+
}, z.core.$strip>>;
|
|
173
|
+
pull_requests: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
174
|
+
number: z.ZodNumber;
|
|
175
|
+
title: z.ZodString;
|
|
176
|
+
url: z.ZodOptional<z.ZodString>;
|
|
177
|
+
state: z.ZodOptional<z.ZodString>;
|
|
178
|
+
draft: z.ZodOptional<z.ZodBoolean>;
|
|
179
|
+
merged: z.ZodOptional<z.ZodBoolean>;
|
|
180
|
+
created_at: z.ZodOptional<z.ZodString>;
|
|
181
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
182
|
+
closed_at: z.ZodOptional<z.ZodString>;
|
|
183
|
+
merged_at: z.ZodOptional<z.ZodString>;
|
|
184
|
+
author: z.ZodOptional<z.ZodString>;
|
|
185
|
+
head_ref: z.ZodOptional<z.ZodString>;
|
|
186
|
+
base_ref: z.ZodOptional<z.ZodString>;
|
|
187
|
+
}, z.core.$loose>>>;
|
|
188
|
+
pagination: z.ZodOptional<z.ZodObject<{
|
|
189
|
+
currentPage: z.ZodNumber;
|
|
190
|
+
totalPages: z.ZodNumber;
|
|
191
|
+
hasMore: z.ZodBoolean;
|
|
192
|
+
perPage: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
totalMatches: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
totalFiles: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
totalEntries: z.ZodOptional<z.ZodNumber>;
|
|
196
|
+
totalResults: z.ZodOptional<z.ZodNumber>;
|
|
197
|
+
entriesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
198
|
+
filesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
matchesPerPage: z.ZodOptional<z.ZodNumber>;
|
|
200
|
+
}, z.core.$strip>>;
|
|
201
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
202
|
+
kind: z.ZodString;
|
|
203
|
+
}, z.core.$loose>]>>>;
|
|
204
|
+
error: z.ZodOptional<z.ZodString>;
|
|
205
|
+
hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
206
|
+
base: z.ZodOptional<z.ZodString>;
|
|
207
|
+
shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
208
|
+
responsePagination: z.ZodOptional<z.ZodObject<{
|
|
209
|
+
currentPage: z.ZodNumber;
|
|
210
|
+
totalPages: z.ZodNumber;
|
|
211
|
+
hasMore: z.ZodBoolean;
|
|
212
|
+
charOffset: z.ZodNumber;
|
|
213
|
+
charLength: z.ZodNumber;
|
|
214
|
+
totalChars: z.ZodNumber;
|
|
215
|
+
nextCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
216
|
+
}, z.core.$strip>>;
|
|
217
|
+
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
218
|
+
id: z.ZodOptional<z.ZodString>;
|
|
219
|
+
status: z.ZodOptional<z.ZodString>;
|
|
220
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
221
|
+
pull_requests: z.ZodOptional<z.ZodArray<z.ZodObject<{}, z.core.$loose>>>;
|
|
222
|
+
}, z.core.$loose>>;
|
|
223
|
+
}, z.core.$loose>>>;
|
|
224
|
+
}, z.core.$loose>;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import type { PaginationInfo } from '../../types/toolResults.js';
|
|
2
|
+
export interface GitHubPullRequestApiItem {
|
|
3
|
+
number: number;
|
|
4
|
+
title: string;
|
|
5
|
+
url: string;
|
|
6
|
+
state: 'open' | 'closed';
|
|
7
|
+
draft: boolean;
|
|
8
|
+
merged: boolean;
|
|
9
|
+
created_at: string;
|
|
10
|
+
updated_at: string;
|
|
11
|
+
closed_at?: string;
|
|
12
|
+
merged_at?: string;
|
|
13
|
+
author: string;
|
|
14
|
+
assignees?: string[];
|
|
15
|
+
labels?: Array<{
|
|
16
|
+
id: number;
|
|
17
|
+
name: string;
|
|
18
|
+
color: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
}>;
|
|
21
|
+
head_ref: string;
|
|
22
|
+
head_sha?: string;
|
|
23
|
+
base_ref: string;
|
|
24
|
+
base_sha?: string;
|
|
25
|
+
body?: string | null;
|
|
26
|
+
body_pagination?: {
|
|
27
|
+
charOffset: number;
|
|
28
|
+
charLength: number;
|
|
29
|
+
totalChars: number;
|
|
30
|
+
hasMore: boolean;
|
|
31
|
+
nextCharOffset?: number;
|
|
32
|
+
};
|
|
33
|
+
comments?: number;
|
|
34
|
+
comment_details_breakdown?: {
|
|
35
|
+
inline_review: number;
|
|
36
|
+
discussion: number;
|
|
37
|
+
};
|
|
38
|
+
commits?: number;
|
|
39
|
+
additions?: number;
|
|
40
|
+
deletions?: number;
|
|
41
|
+
changed_files?: number;
|
|
42
|
+
comment_details?: Array<{
|
|
43
|
+
id: string;
|
|
44
|
+
user: string;
|
|
45
|
+
body: string;
|
|
46
|
+
created_at: string;
|
|
47
|
+
updated_at: string;
|
|
48
|
+
commentType?: 'discussion' | 'review_inline';
|
|
49
|
+
path?: string;
|
|
50
|
+
line?: number;
|
|
51
|
+
in_reply_to_id?: number | null;
|
|
52
|
+
body_pagination?: {
|
|
53
|
+
charOffset: number;
|
|
54
|
+
charLength: number;
|
|
55
|
+
totalChars: number;
|
|
56
|
+
hasMore: boolean;
|
|
57
|
+
nextCharOffset?: number;
|
|
58
|
+
};
|
|
59
|
+
}>;
|
|
60
|
+
comment_details_shown?: number;
|
|
61
|
+
comment_details_total?: number;
|
|
62
|
+
comment_details_paginated?: boolean;
|
|
63
|
+
file_changes?: Array<{
|
|
64
|
+
filename: string;
|
|
65
|
+
status: string;
|
|
66
|
+
additions: number;
|
|
67
|
+
deletions: number;
|
|
68
|
+
changes?: number;
|
|
69
|
+
patch?: string;
|
|
70
|
+
}>;
|
|
71
|
+
reviews?: Array<{
|
|
72
|
+
id: string;
|
|
73
|
+
user: string;
|
|
74
|
+
state: string;
|
|
75
|
+
body: string;
|
|
76
|
+
submitted_at?: string;
|
|
77
|
+
commit_id?: string;
|
|
78
|
+
}>;
|
|
79
|
+
commit_details?: Array<{
|
|
80
|
+
sha: string;
|
|
81
|
+
message: string;
|
|
82
|
+
author: string;
|
|
83
|
+
date: string;
|
|
84
|
+
files: Array<{
|
|
85
|
+
filename: string;
|
|
86
|
+
status: string;
|
|
87
|
+
additions: number;
|
|
88
|
+
deletions: number;
|
|
89
|
+
changes?: number;
|
|
90
|
+
patch?: string;
|
|
91
|
+
}>;
|
|
92
|
+
}>;
|
|
93
|
+
_sanitization_warnings?: string[];
|
|
94
|
+
}
|
|
95
|
+
export interface GitHubPullRequestSearchApiData {
|
|
96
|
+
owner?: string;
|
|
97
|
+
repo?: string;
|
|
98
|
+
pull_requests?: GitHubPullRequestApiItem[];
|
|
99
|
+
total_count?: number;
|
|
100
|
+
incomplete_results?: boolean;
|
|
101
|
+
effectiveQuery?: string;
|
|
102
|
+
pagination?: PaginationInfo;
|
|
103
|
+
outputPagination?: {
|
|
104
|
+
charOffset: number;
|
|
105
|
+
charLength: number;
|
|
106
|
+
totalChars: number;
|
|
107
|
+
hasMore: boolean;
|
|
108
|
+
currentPage: number;
|
|
109
|
+
totalPages: number;
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
export interface GitHubPullRequestSearchApiResult extends GitHubPullRequestSearchApiData {
|
|
113
|
+
error?: string;
|
|
114
|
+
status?: number;
|
|
115
|
+
hints?: string[];
|
|
116
|
+
rateLimitRemaining?: number;
|
|
117
|
+
rateLimitReset?: number;
|
|
118
|
+
retryAfter?: number;
|
|
119
|
+
rawResponseChars?: number;
|
|
120
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
import type { GitHubReposSearchSingleQuerySchema } from '@octocodeai/octocode-core/schemas';
|
|
4
|
+
import type { GitHubRepositoryOutput } from '@octocodeai/octocode-core/extra-types';
|
|
5
|
+
type GitHubReposSearchSingleQuery = z.infer<typeof GitHubReposSearchSingleQuerySchema>;
|
|
6
|
+
import type { ToolExecutionArgs, WithOptionalMeta } from '../../types/execution.js';
|
|
7
|
+
type RepositorySearchExtraFields = {
|
|
8
|
+
archived?: boolean;
|
|
9
|
+
visibility?: 'public' | 'private';
|
|
10
|
+
forks?: string;
|
|
11
|
+
license?: string;
|
|
12
|
+
goodFirstIssues?: string;
|
|
13
|
+
};
|
|
14
|
+
type PartialReposSearchQuery = WithOptionalMeta<GitHubReposSearchSingleQuery> & RepositorySearchExtraFields;
|
|
15
|
+
export declare function formatRepoLine(repo: GitHubRepositoryOutput): string;
|
|
16
|
+
export declare function searchMultipleGitHubRepos(args: ToolExecutionArgs<PartialReposSearchQuery>): Promise<CallToolResult>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const GitHubReposSearchSingleQueryLocalSchema: z.ZodObject<{
|
|
3
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
4
|
+
topicsToSearch: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
5
|
+
language: z.ZodOptional<z.ZodString>;
|
|
6
|
+
owner: z.ZodOptional<z.ZodString>;
|
|
7
|
+
stars: z.ZodOptional<z.ZodString>;
|
|
8
|
+
size: z.ZodOptional<z.ZodString>;
|
|
9
|
+
created: z.ZodOptional<z.ZodString>;
|
|
10
|
+
updated: z.ZodOptional<z.ZodString>;
|
|
11
|
+
match: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
12
|
+
description: "description";
|
|
13
|
+
name: "name";
|
|
14
|
+
readme: "readme";
|
|
15
|
+
}>>>;
|
|
16
|
+
sort: z.ZodDefault<z.ZodEnum<{
|
|
17
|
+
stars: "stars";
|
|
18
|
+
updated: "updated";
|
|
19
|
+
forks: "forks";
|
|
20
|
+
"help-wanted-issues": "help-wanted-issues";
|
|
21
|
+
"best-match": "best-match";
|
|
22
|
+
}>>;
|
|
23
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
24
|
+
page: z.ZodDefault<z.ZodNumber>;
|
|
25
|
+
archived: z.ZodOptional<z.ZodBoolean>;
|
|
26
|
+
visibility: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
public: "public";
|
|
28
|
+
private: "private";
|
|
29
|
+
}>>;
|
|
30
|
+
forks: z.ZodOptional<z.ZodString>;
|
|
31
|
+
license: z.ZodOptional<z.ZodString>;
|
|
32
|
+
goodFirstIssues: z.ZodOptional<z.ZodString>;
|
|
33
|
+
concise: z.ZodOptional<z.ZodBoolean>;
|
|
34
|
+
id: z.ZodOptional<z.ZodString>;
|
|
35
|
+
mainResearchGoal: z.ZodOptional<z.ZodString>;
|
|
36
|
+
researchGoal: z.ZodOptional<z.ZodString>;
|
|
37
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export declare const GitHubReposSearchBulkQueryLocalSchema: z.ZodObject<{
|
|
40
|
+
responseCharOffset: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>>;
|
|
41
|
+
responseCharLength: z.ZodOptional<z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodNumber>>;
|
|
42
|
+
queries: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export declare const GitHubSearchRepositoriesOutputLocalSchema: z.ZodObject<{
|
|
45
|
+
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
46
|
+
id: z.ZodOptional<z.ZodString>;
|
|
47
|
+
status: z.ZodOptional<z.ZodString>;
|
|
48
|
+
data: z.ZodOptional<z.ZodObject<{
|
|
49
|
+
repositories: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
50
|
+
owner: z.ZodString;
|
|
51
|
+
repo: z.ZodString;
|
|
52
|
+
stars: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
forks: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
openIssuesCount: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
language: z.ZodOptional<z.ZodString>;
|
|
56
|
+
license: z.ZodOptional<z.ZodString>;
|
|
57
|
+
description: z.ZodOptional<z.ZodString>;
|
|
58
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
59
|
+
pushedAt: z.ZodOptional<z.ZodString>;
|
|
60
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
61
|
+
defaultBranch: z.ZodOptional<z.ZodString>;
|
|
62
|
+
topics: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
63
|
+
visibility: z.ZodOptional<z.ZodString>;
|
|
64
|
+
url: z.ZodOptional<z.ZodString>;
|
|
65
|
+
updatedAt: z.ZodOptional<z.ZodString>;
|
|
66
|
+
}, z.core.$strip>]>>>;
|
|
67
|
+
pagination: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
currentPage: z.ZodNumber;
|
|
69
|
+
totalPages: z.ZodNumber;
|
|
70
|
+
hasMore: z.ZodBoolean;
|
|
71
|
+
perPage: z.ZodOptional<z.ZodNumber>;
|
|
72
|
+
totalMatches: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
reportedTotalMatches: z.ZodOptional<z.ZodNumber>;
|
|
74
|
+
reachableTotalMatches: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
totalMatchesKind: z.ZodOptional<z.ZodEnum<{
|
|
76
|
+
exact: "exact";
|
|
77
|
+
reported: "reported";
|
|
78
|
+
lowerBound: "lowerBound";
|
|
79
|
+
}>>;
|
|
80
|
+
totalMatchesCapped: z.ZodOptional<z.ZodBoolean>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
}, z.core.$loose>>;
|
|
83
|
+
}, z.core.$loose>>>;
|
|
84
|
+
readonly hints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
85
|
+
readonly base: z.ZodOptional<z.ZodString>;
|
|
86
|
+
readonly shared: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
87
|
+
readonly responsePagination: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
currentPage: z.ZodNumber;
|
|
89
|
+
totalPages: z.ZodNumber;
|
|
90
|
+
hasMore: z.ZodBoolean;
|
|
91
|
+
charOffset: z.ZodNumber;
|
|
92
|
+
charLength: z.ZodNumber;
|
|
93
|
+
totalChars: z.ZodNumber;
|
|
94
|
+
nextCharOffset: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
}, z.core.$strip>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type CallToolResult } from '@modelcontextprotocol/sdk/types.js';
|
|
2
|
+
import type { z } from 'zod';
|
|
3
|
+
import type { GitHubViewRepoStructureQuerySchema } from '@octocodeai/octocode-core/schemas';
|
|
4
|
+
import type { GitHubRepoStructureDirectoryEntry } from '@octocodeai/octocode-core/extra-types';
|
|
5
|
+
type GitHubViewRepoStructureQuery = z.infer<typeof GitHubViewRepoStructureQuerySchema>;
|
|
6
|
+
import type { WithOptionalMeta } from '../../types/execution.js';
|
|
7
|
+
type PartialRepoStructureQuery = WithOptionalMeta<GitHubViewRepoStructureQuery>;
|
|
8
|
+
import type { ToolExecutionArgs } from '../../types/execution.js';
|
|
9
|
+
export declare function filterStructure(structure: Record<string, GitHubRepoStructureDirectoryEntry>): Record<string, GitHubRepoStructureDirectoryEntry>;
|
|
10
|
+
export declare function exploreMultipleRepositoryStructures(args: ToolExecutionArgs<PartialRepoStructureQuery>): Promise<CallToolResult>;
|
|
11
|
+
export declare function buildRepoStructureOutput(input: {
|
|
12
|
+
data: Record<string, unknown>;
|
|
13
|
+
entryCount: number;
|
|
14
|
+
wasTruncated: boolean;
|
|
15
|
+
extraHints: string[];
|
|
16
|
+
}, _query: PartialRepoStructureQuery): {
|
|
17
|
+
data: Record<string, unknown>;
|
|
18
|
+
extraHints: string[];
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export declare const GitHubViewRepoStructureQueryLocalSchema: import("zod").ZodObject<{
|
|
2
|
+
owner: import("zod").ZodString;
|
|
3
|
+
repo: import("zod").ZodString;
|
|
4
|
+
branch: import("zod").ZodOptional<import("zod").ZodString>;
|
|
5
|
+
path: import("zod").ZodOptional<import("zod").ZodString>;
|
|
6
|
+
maxDepth: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
7
|
+
page: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
8
|
+
itemsPerPage: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
9
|
+
includeSizes: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
10
|
+
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
11
|
+
mainResearchGoal: import("zod").ZodOptional<import("zod").ZodString>;
|
|
12
|
+
researchGoal: import("zod").ZodOptional<import("zod").ZodString>;
|
|
13
|
+
reasoning: import("zod").ZodOptional<import("zod").ZodString>;
|
|
14
|
+
}, import("zod/v4/core").$strip>;
|
|
15
|
+
export declare const GitHubViewRepoStructureBulkQueryLocalSchema: import("zod").ZodObject<{
|
|
16
|
+
responseCharOffset: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodNumber>>;
|
|
17
|
+
responseCharLength: import("zod").ZodOptional<import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodNumber>>;
|
|
18
|
+
queries: import("zod").ZodArray<import("zod").ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>>;
|
|
19
|
+
}, import("zod/v4/core").$strip>;
|
|
20
|
+
export declare const GitHubViewRepoStructureOutputLocalSchema: import("zod").ZodObject<{
|
|
21
|
+
status: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
22
|
+
empty: import("@octocodeai/octocode-core/types").ToolStatus.Empty;
|
|
23
|
+
error: import("@octocodeai/octocode-core/types").ToolStatus.Error;
|
|
24
|
+
}>>;
|
|
25
|
+
data: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
26
|
+
entries: import("zod").ZodArray<import("zod").ZodObject<{
|
|
27
|
+
path: import("zod").ZodString;
|
|
28
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
29
|
+
type: import("zod").ZodOptional<import("zod").ZodString>;
|
|
30
|
+
size: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
31
|
+
}, import("zod/v4/core").$loose>>;
|
|
32
|
+
pagination: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
33
|
+
currentPage: import("zod").ZodNumber;
|
|
34
|
+
totalPages: import("zod").ZodNumber;
|
|
35
|
+
hasMore: import("zod").ZodBoolean;
|
|
36
|
+
perPage: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
37
|
+
totalMatches: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
38
|
+
totalFiles: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
39
|
+
totalEntries: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
40
|
+
totalResults: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
41
|
+
entriesPerPage: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
42
|
+
filesPerPage: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
43
|
+
matchesPerPage: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
44
|
+
}, import("zod/v4/core").$strip>>;
|
|
45
|
+
}, import("zod/v4/core").$strip>>;
|
|
46
|
+
entries: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
|
|
47
|
+
path: import("zod").ZodString;
|
|
48
|
+
name: import("zod").ZodOptional<import("zod").ZodString>;
|
|
49
|
+
type: import("zod").ZodOptional<import("zod").ZodString>;
|
|
50
|
+
size: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
51
|
+
}, import("zod/v4/core").$loose>>>;
|
|
52
|
+
pagination: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
53
|
+
currentPage: import("zod").ZodNumber;
|
|
54
|
+
totalPages: import("zod").ZodNumber;
|
|
55
|
+
hasMore: import("zod").ZodBoolean;
|
|
56
|
+
perPage: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
57
|
+
totalMatches: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
58
|
+
totalFiles: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
59
|
+
totalEntries: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
60
|
+
totalResults: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
61
|
+
entriesPerPage: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
62
|
+
filesPerPage: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
63
|
+
matchesPerPage: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
64
|
+
}, import("zod/v4/core").$strip>>;
|
|
65
|
+
warnings: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodObject<{
|
|
66
|
+
kind: import("zod").ZodString;
|
|
67
|
+
}, import("zod/v4/core").$loose>]>>>;
|
|
68
|
+
error: import("zod").ZodOptional<import("zod").ZodString>;
|
|
69
|
+
readonly hints: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
70
|
+
readonly base: import("zod").ZodOptional<import("zod").ZodString>;
|
|
71
|
+
readonly shared: import("zod").ZodOptional<import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber, import("zod").ZodBoolean]>>>;
|
|
72
|
+
readonly responsePagination: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
73
|
+
currentPage: import("zod").ZodNumber;
|
|
74
|
+
totalPages: import("zod").ZodNumber;
|
|
75
|
+
hasMore: import("zod").ZodBoolean;
|
|
76
|
+
charOffset: import("zod").ZodNumber;
|
|
77
|
+
charLength: import("zod").ZodNumber;
|
|
78
|
+
totalChars: import("zod").ZodNumber;
|
|
79
|
+
nextCharOffset: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
80
|
+
}, import("zod/v4/core").$strip>>;
|
|
81
|
+
}, import("zod/v4/core").$loose>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { GitHubRepoStructureDirectoryEntry } from '@octocodeai/octocode-core/extra-types';
|
|
2
|
+
import type { ContentDirectoryEntry } from '../../github/githubAPI.js';
|
|
3
|
+
import type { PaginationInfo } from '../../types/toolResults.js';
|
|
4
|
+
export type GitHubApiFileItem = ContentDirectoryEntry;
|
|
5
|
+
export interface GitHubRepositoryStructureResult {
|
|
6
|
+
owner: string;
|
|
7
|
+
repo: string;
|
|
8
|
+
branch: string;
|
|
9
|
+
defaultBranch?: string;
|
|
10
|
+
path: string;
|
|
11
|
+
apiSource: boolean;
|
|
12
|
+
summary: {
|
|
13
|
+
totalFiles: number;
|
|
14
|
+
totalFolders: number;
|
|
15
|
+
truncated: boolean;
|
|
16
|
+
filtered: boolean;
|
|
17
|
+
originalCount: number;
|
|
18
|
+
};
|
|
19
|
+
structure: Record<string, GitHubRepoStructureDirectoryEntry>;
|
|
20
|
+
fileSizeMap?: Record<string, Record<string, number>>;
|
|
21
|
+
pagination?: PaginationInfo;
|
|
22
|
+
hints?: string[];
|
|
23
|
+
_cachedItems?: {
|
|
24
|
+
path: string;
|
|
25
|
+
type: 'file' | 'dir';
|
|
26
|
+
}[];
|
|
27
|
+
_cachedFileSizeMap?: Record<string, Record<string, number>>;
|
|
28
|
+
rawResponseChars?: number;
|
|
29
|
+
}
|
|
30
|
+
export interface GitHubRepositoryStructureError {
|
|
31
|
+
error: string;
|
|
32
|
+
status?: number;
|
|
33
|
+
triedBranches?: string[];
|
|
34
|
+
defaultBranch?: string;
|
|
35
|
+
rateLimitRemaining?: number;
|
|
36
|
+
rateLimitReset?: number;
|
|
37
|
+
retryAfter?: number;
|
|
38
|
+
hints?: string[];
|
|
39
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Archive list/extract operations.
|
|
3
|
+
* Backs mode="list" and mode="extract" in localBinaryInspect.
|
|
4
|
+
*
|
|
5
|
+
* Backend selection (falls through on missing CLI):
|
|
6
|
+
* .aar/.yaa → aa only
|
|
7
|
+
* .dmg/.rar/.cpgz → 7z → 7zz → bsdtar
|
|
8
|
+
* .7z/.iso/.cab/… → bsdtar → 7z → 7zz
|
|
9
|
+
* .tar.* → tar → bsdtar → 7z
|
|
10
|
+
* default (zip-fam.) → unzip → tar → bsdtar → 7z
|
|
11
|
+
*/
|
|
12
|
+
export interface ArchiveChainResult {
|
|
13
|
+
success: boolean;
|
|
14
|
+
stdout: string;
|
|
15
|
+
stderr: string;
|
|
16
|
+
commandUsed?: string;
|
|
17
|
+
missingCommands?: string[];
|
|
18
|
+
}
|
|
19
|
+
export declare function listArchiveEntries(path: string, verbose: boolean): Promise<ArchiveChainResult & {
|
|
20
|
+
entries?: string[];
|
|
21
|
+
}>;
|
|
22
|
+
export declare function extractArchiveEntry(path: string, entry: string): Promise<ArchiveChainResult>;
|