@github-tools/sdk 1.8.2 → 1.9.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/README.md +184 -70
- package/dist/connect/eve.d.mts +11 -5
- package/dist/connect/eve.d.mts.map +1 -1
- package/dist/connect/eve.mjs +10 -2
- package/dist/connect/eve.mjs.map +1 -1
- package/dist/connect.d.mts +23 -11
- package/dist/connect.d.mts.map +1 -1
- package/dist/connect.mjs +6 -3
- package/dist/connect.mjs.map +1 -1
- package/dist/eve-DmiXBuli.mjs +864 -0
- package/dist/eve-DmiXBuli.mjs.map +1 -0
- package/dist/eve.d.mts +338 -90
- package/dist/eve.d.mts.map +1 -1
- package/dist/eve.mjs +3 -3
- package/dist/index-CtID5dUi.d.mts +606 -0
- package/dist/index-CtID5dUi.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/{src-CfzZfU82.mjs → src-D6vC3V8r.mjs} +293 -20
- package/dist/src-D6vC3V8r.mjs.map +1 -0
- package/dist/{token-CW8lQBND.mjs → token-sbepWIkd.mjs} +45 -7
- package/dist/token-sbepWIkd.mjs.map +1 -0
- package/dist/{types-B0mvQgJf.d.mts → types-BOnJ0Rou.d.mts} +28 -8
- package/dist/types-BOnJ0Rou.d.mts.map +1 -0
- package/dist/types-BVLof-5R.d.mts +39 -0
- package/dist/types-BVLof-5R.d.mts.map +1 -0
- package/dist/workflow.d.mts +7 -7
- package/dist/workflow.d.mts.map +1 -1
- package/dist/workflow.mjs +6 -4
- package/dist/workflow.mjs.map +1 -1
- package/dist/{write-tools-Dx9LfYlU.mjs → write-tools-cg_ialNd.mjs} +1009 -107
- package/dist/write-tools-cg_ialNd.mjs.map +1 -0
- package/package.json +13 -13
- package/dist/eve-UPaHEGVi.mjs +0 -512
- package/dist/eve-UPaHEGVi.mjs.map +0 -1
- package/dist/index-Cs1Kebmt.d.mts +0 -463
- package/dist/index-Cs1Kebmt.d.mts.map +0 -1
- package/dist/src-CfzZfU82.mjs.map +0 -1
- package/dist/token-CW8lQBND.mjs.map +0 -1
- package/dist/types-B0mvQgJf.d.mts.map +0 -1
- package/dist/types-DwHrGKWO.d.mts +0 -27
- package/dist/types-DwHrGKWO.d.mts.map +0 -1
- package/dist/write-tools-Dx9LfYlU.mjs.map +0 -1
|
@@ -0,0 +1,864 @@
|
|
|
1
|
+
import { $ as listWorkflowsDescription, $n as getFileContentToModelOutput, $t as addLabelsDescription, A as getReleaseInputSchema, An as createPullRequestReviewInputSchema, At as compareCommitsInputSchema, B as cancelWorkflowRunCore, Bn as listPullRequestsCore, Bt as searchCodeCore, C as createReleaseDescription, Cn as addPullRequestCommentDescription, Cr as listBranchesCore, Ct as listGistsDescription, D as getLatestReleaseInputSchema, Dn as createPullRequestInputSchema, Dt as updateGistInputSchema, E as getLatestReleaseDescription, En as createPullRequestDescription, Et as updateGistDescription, F as getCombinedStatusDescription, Fn as listPullRequestFilesDescription, Ft as getCommitDescription, G as getWorkflowRunInputSchema, Gn as mergePullRequestInputSchema, Gt as searchRepositoriesInputSchema, H as cancelWorkflowRunInputSchema, Hn as listPullRequestsInputSchema, Ht as searchCodeInputSchema, I as getCombinedStatusInputSchema, In as listPullRequestFilesInputSchema, It as getCommitInputSchema, J as listWorkflowJobsInputSchema, Jn as requestReviewersInputSchema, Jt as addAssigneesInputSchema, K as listWorkflowJobsCore, Kn as requestReviewersCore, Kt as addAssigneesCore, L as listCheckRunsCore, Ln as listPullRequestReviewsCore, Lt as listCommitsCore, M as listReleasesDescription, Mn as getPullRequestDescription, Mt as getBlameDescription, N as listReleasesInputSchema, Nn as getPullRequestInputSchema, Nt as getBlameInputSchema, O as getReleaseCore, On as createPullRequestReviewCore, Ot as compareCommitsCore, P as getCombinedStatusCore, Pn as listPullRequestFilesCore, Pt as getCommitCore, Q as listWorkflowsCore, Qn as getCommitToModelOutput, Qt as addLabelsCore, R as listCheckRunsDescription, Rn as listPullRequestReviewsDescription, Rt as listCommitsDescription, S as createReleaseCore, Sn as addPullRequestCommentCore, Sr as getRepositoryTreeInputSchema, St as listGistsCore, T as getLatestReleaseCore, Tn as createPullRequestCore, Tr as listBranchesInputSchema, Tt as updateGistCore, U as getWorkflowRunCore, Un as mergePullRequestCore, Ut as searchRepositoriesCore, V as cancelWorkflowRunDescription, Vn as listPullRequestsDescription, Vt as searchCodeDescription, W as getWorkflowRunDescription, Wn as mergePullRequestDescription, Wt as searchRepositoriesDescription, X as listWorkflowRunsDescription, Xn as resolveGithubToken, Xt as addIssueCommentDescription, Y as listWorkflowRunsCore, Yn as createGithubTokenResolver, Yt as addIssueCommentCore, Z as listWorkflowRunsInputSchema, Zn as compareCommitsToModelOutput, Zt as addIssueCommentInputSchema, _ as getPullRequestContextDescription, _n as removeAssigneesDescription, _r as getRepositoryCore, _t as getGistDescription, a as resolvePresetTools, an as createIssueDescription, ar as createOrUpdateFileCore, at as triggerWorkflowDescription, b as getReleaseContextDescription, bn as removeLabelDescription, br as getRepositoryTreeCore, bt as listGistCommentsDescription, c as mergeContextArgs, cn as getIssueDescription, cr as createRepositoryCore, ct as createGistCommentDescription, d as getCiFailureContextDescription, dn as listIssuesDescription, dr as forkRepositoryCore, dt as createGistDescription, en as addLabelsInputSchema, er as getPullRequestContextToModelOutput, et as listWorkflowsInputSchema, f as getCiFailureContextInputSchema, fn as listIssuesInputSchema, fr as forkRepositoryDescription, ft as createGistInputSchema, g as getPullRequestContextCore, gn as removeAssigneesCore, gr as getFileContentInputSchema, gt as getGistCore, h as getIssueContextInputSchema, hn as listLabelsInputSchema, hr as getFileContentDescription, ht as deleteGistInputSchema, in as createIssueCore, ir as createBranchInputSchema, it as triggerWorkflowCore, j as listReleasesCore, jn as getPullRequestCore, jt as getBlameCore, k as getReleaseDescription, kn as createPullRequestReviewDescription, kt as compareCommitsDescription, l as softenContextSchema, ln as getIssueInputSchema, lr as createRepositoryDescription, lt as createGistCommentInputSchema, m as getIssueContextDescription, mn as listLabelsDescription, mr as getFileContentCore, mt as deleteGistDescription, n as ALL_GITHUB_TOOL_NAMES, nn as closeIssueDescription, nr as createBranchCore, nt as rerunWorkflowRunDescription, on as createIssueInputSchema, or as createOrUpdateFileDescription, ot as triggerWorkflowInputSchema, p as getIssueContextCore, pn as listLabelsCore, pr as forkRepositoryInputSchema, pt as deleteGistCore, q as listWorkflowJobsDescription, qn as requestReviewersDescription, qt as addAssigneesDescription, rn as closeIssueInputSchema, rr as createBranchDescription, rt as rerunWorkflowRunInputSchema, sn as getIssueCore, sr as createOrUpdateFileInputSchema, st as createGistCommentCore, tn as closeIssueCore, tr as listPullRequestFilesToModelOutput, tt as rerunWorkflowRunCore, u as getCiFailureContextCore, un as listIssuesCore, ur as createRepositoryInputSchema, ut as createGistCore, v as getPullRequestContextInputSchema, vn as removeAssigneesInputSchema, vr as getRepositoryDescription, vt as getGistInputSchema, w as createReleaseInputSchema, wn as addPullRequestCommentInputSchema, wr as listBranchesDescription, wt as listGistsInputSchema, x as getReleaseContextInputSchema, xn as removeLabelInputSchema, xr as getRepositoryTreeDescription, xt as listGistCommentsInputSchema, y as getReleaseContextCore, yn as removeLabelCore, yr as getRepositoryInputSchema, yt as listGistCommentsCore, z as listCheckRunsInputSchema, zn as listPullRequestReviewsInputSchema, zt as listCommitsInputSchema } from "./write-tools-cg_ialNd.mjs";
|
|
2
|
+
import * as eveTools from "eve/tools";
|
|
3
|
+
import * as eveApproval from "eve/tools/approval";
|
|
4
|
+
//#region src/eve/load-eve.ts
|
|
5
|
+
const MISSING_EVE_MESSAGE = "The \"eve\" package is required to use @github-tools/sdk/eve. Install it with: pnpm add eve";
|
|
6
|
+
function getEveTools() {
|
|
7
|
+
return eveTools;
|
|
8
|
+
}
|
|
9
|
+
function getEveApprovalHelpers() {
|
|
10
|
+
return eveApproval;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/eve/approval.ts
|
|
14
|
+
function mapEveApprovalValue(value) {
|
|
15
|
+
if (typeof value === "function") return value;
|
|
16
|
+
const { always, never, once } = getEveApprovalHelpers();
|
|
17
|
+
if (value === true || value === "always") return always();
|
|
18
|
+
if (value === false || value === "never") return never();
|
|
19
|
+
if (value === "once") return once();
|
|
20
|
+
return always();
|
|
21
|
+
}
|
|
22
|
+
function resolveEveApproval(toolName, config) {
|
|
23
|
+
if (config === void 0) return getEveApprovalHelpers().always();
|
|
24
|
+
if (config === true) return getEveApprovalHelpers().always();
|
|
25
|
+
if (config === false) return getEveApprovalHelpers().never();
|
|
26
|
+
const value = config[toolName];
|
|
27
|
+
if (value === void 0) return getEveApprovalHelpers().always();
|
|
28
|
+
return mapEveApprovalValue(value);
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/eve/registry.ts
|
|
32
|
+
function withToken(core, ctx, extra) {
|
|
33
|
+
return async (input) => core({
|
|
34
|
+
token: await resolveGithubToken(ctx.token),
|
|
35
|
+
...extra,
|
|
36
|
+
...mergeContextArgs(input, ctx.context ?? {})
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function modelOutputAdapter(fn) {
|
|
40
|
+
return (output) => fn({
|
|
41
|
+
toolCallId: "",
|
|
42
|
+
input: {},
|
|
43
|
+
output
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function createToolRegistry(ctx) {
|
|
47
|
+
const entries = [
|
|
48
|
+
{
|
|
49
|
+
name: "getRepository",
|
|
50
|
+
description: getRepositoryDescription,
|
|
51
|
+
inputSchema: getRepositoryInputSchema,
|
|
52
|
+
execute: withToken(getRepositoryCore, ctx)
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "listBranches",
|
|
56
|
+
description: listBranchesDescription,
|
|
57
|
+
inputSchema: listBranchesInputSchema,
|
|
58
|
+
execute: withToken(listBranchesCore, ctx)
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "getFileContent",
|
|
62
|
+
description: getFileContentDescription,
|
|
63
|
+
inputSchema: getFileContentInputSchema,
|
|
64
|
+
execute: withToken(getFileContentCore, ctx),
|
|
65
|
+
toModelOutput: modelOutputAdapter(getFileContentToModelOutput)
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "getRepositoryTree",
|
|
69
|
+
description: getRepositoryTreeDescription,
|
|
70
|
+
inputSchema: getRepositoryTreeInputSchema,
|
|
71
|
+
execute: withToken(getRepositoryTreeCore, ctx)
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "createBranch",
|
|
75
|
+
writeTool: "createBranch",
|
|
76
|
+
description: createBranchDescription,
|
|
77
|
+
inputSchema: createBranchInputSchema,
|
|
78
|
+
execute: withToken(createBranchCore, ctx)
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "forkRepository",
|
|
82
|
+
writeTool: "forkRepository",
|
|
83
|
+
description: forkRepositoryDescription,
|
|
84
|
+
inputSchema: forkRepositoryInputSchema,
|
|
85
|
+
execute: withToken(forkRepositoryCore, ctx)
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: "createRepository",
|
|
89
|
+
writeTool: "createRepository",
|
|
90
|
+
description: createRepositoryDescription,
|
|
91
|
+
inputSchema: createRepositoryInputSchema,
|
|
92
|
+
execute: withToken(createRepositoryCore, ctx)
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "createOrUpdateFile",
|
|
96
|
+
writeTool: "createOrUpdateFile",
|
|
97
|
+
description: createOrUpdateFileDescription,
|
|
98
|
+
inputSchema: createOrUpdateFileInputSchema,
|
|
99
|
+
execute: withToken(createOrUpdateFileCore, ctx, {
|
|
100
|
+
author: ctx.author,
|
|
101
|
+
committer: ctx.committer,
|
|
102
|
+
coAuthors: ctx.coAuthors
|
|
103
|
+
})
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "listPullRequests",
|
|
107
|
+
description: listPullRequestsDescription,
|
|
108
|
+
inputSchema: listPullRequestsInputSchema,
|
|
109
|
+
execute: withToken(listPullRequestsCore, ctx)
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "getPullRequest",
|
|
113
|
+
description: getPullRequestDescription,
|
|
114
|
+
inputSchema: getPullRequestInputSchema,
|
|
115
|
+
execute: withToken(getPullRequestCore, ctx)
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "createPullRequest",
|
|
119
|
+
writeTool: "createPullRequest",
|
|
120
|
+
description: createPullRequestDescription,
|
|
121
|
+
inputSchema: createPullRequestInputSchema,
|
|
122
|
+
execute: withToken(createPullRequestCore, ctx)
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "mergePullRequest",
|
|
126
|
+
writeTool: "mergePullRequest",
|
|
127
|
+
description: mergePullRequestDescription,
|
|
128
|
+
inputSchema: mergePullRequestInputSchema,
|
|
129
|
+
execute: withToken(mergePullRequestCore, ctx, { coAuthors: ctx.coAuthors })
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: "addPullRequestComment",
|
|
133
|
+
writeTool: "addPullRequestComment",
|
|
134
|
+
description: addPullRequestCommentDescription,
|
|
135
|
+
inputSchema: addPullRequestCommentInputSchema,
|
|
136
|
+
execute: withToken(addPullRequestCommentCore, ctx)
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: "listPullRequestFiles",
|
|
140
|
+
description: listPullRequestFilesDescription,
|
|
141
|
+
inputSchema: listPullRequestFilesInputSchema,
|
|
142
|
+
execute: withToken(listPullRequestFilesCore, ctx),
|
|
143
|
+
toModelOutput: modelOutputAdapter(listPullRequestFilesToModelOutput)
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "listPullRequestReviews",
|
|
147
|
+
description: listPullRequestReviewsDescription,
|
|
148
|
+
inputSchema: listPullRequestReviewsInputSchema,
|
|
149
|
+
execute: withToken(listPullRequestReviewsCore, ctx)
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: "createPullRequestReview",
|
|
153
|
+
writeTool: "createPullRequestReview",
|
|
154
|
+
description: createPullRequestReviewDescription,
|
|
155
|
+
inputSchema: createPullRequestReviewInputSchema,
|
|
156
|
+
execute: withToken(createPullRequestReviewCore, ctx)
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "requestReviewers",
|
|
160
|
+
writeTool: "requestReviewers",
|
|
161
|
+
description: requestReviewersDescription,
|
|
162
|
+
inputSchema: requestReviewersInputSchema,
|
|
163
|
+
execute: withToken(requestReviewersCore, ctx)
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: "getPullRequestContext",
|
|
167
|
+
description: getPullRequestContextDescription,
|
|
168
|
+
inputSchema: getPullRequestContextInputSchema,
|
|
169
|
+
execute: withToken(getPullRequestContextCore, ctx),
|
|
170
|
+
toModelOutput: modelOutputAdapter(getPullRequestContextToModelOutput)
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: "getIssueContext",
|
|
174
|
+
description: getIssueContextDescription,
|
|
175
|
+
inputSchema: getIssueContextInputSchema,
|
|
176
|
+
execute: withToken(getIssueContextCore, ctx)
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: "listIssues",
|
|
180
|
+
description: listIssuesDescription,
|
|
181
|
+
inputSchema: listIssuesInputSchema,
|
|
182
|
+
execute: withToken(listIssuesCore, ctx)
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
name: "getIssue",
|
|
186
|
+
description: getIssueDescription,
|
|
187
|
+
inputSchema: getIssueInputSchema,
|
|
188
|
+
execute: withToken(getIssueCore, ctx)
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
name: "createIssue",
|
|
192
|
+
writeTool: "createIssue",
|
|
193
|
+
description: createIssueDescription,
|
|
194
|
+
inputSchema: createIssueInputSchema,
|
|
195
|
+
execute: withToken(createIssueCore, ctx)
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
name: "addIssueComment",
|
|
199
|
+
writeTool: "addIssueComment",
|
|
200
|
+
description: addIssueCommentDescription,
|
|
201
|
+
inputSchema: addIssueCommentInputSchema,
|
|
202
|
+
execute: withToken(addIssueCommentCore, ctx)
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
name: "closeIssue",
|
|
206
|
+
writeTool: "closeIssue",
|
|
207
|
+
description: closeIssueDescription,
|
|
208
|
+
inputSchema: closeIssueInputSchema,
|
|
209
|
+
execute: withToken(closeIssueCore, ctx)
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: "listLabels",
|
|
213
|
+
description: listLabelsDescription,
|
|
214
|
+
inputSchema: listLabelsInputSchema,
|
|
215
|
+
execute: withToken(listLabelsCore, ctx)
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
name: "addLabels",
|
|
219
|
+
writeTool: "addLabels",
|
|
220
|
+
description: addLabelsDescription,
|
|
221
|
+
inputSchema: addLabelsInputSchema,
|
|
222
|
+
execute: withToken(addLabelsCore, ctx)
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
name: "removeLabel",
|
|
226
|
+
writeTool: "removeLabel",
|
|
227
|
+
description: removeLabelDescription,
|
|
228
|
+
inputSchema: removeLabelInputSchema,
|
|
229
|
+
execute: withToken(removeLabelCore, ctx)
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "addAssignees",
|
|
233
|
+
writeTool: "addAssignees",
|
|
234
|
+
description: addAssigneesDescription,
|
|
235
|
+
inputSchema: addAssigneesInputSchema,
|
|
236
|
+
execute: withToken(addAssigneesCore, ctx)
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
name: "removeAssignees",
|
|
240
|
+
writeTool: "removeAssignees",
|
|
241
|
+
description: removeAssigneesDescription,
|
|
242
|
+
inputSchema: removeAssigneesInputSchema,
|
|
243
|
+
execute: withToken(removeAssigneesCore, ctx)
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: "searchCode",
|
|
247
|
+
description: searchCodeDescription,
|
|
248
|
+
inputSchema: searchCodeInputSchema,
|
|
249
|
+
execute: withToken(searchCodeCore, ctx)
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: "searchRepositories",
|
|
253
|
+
description: searchRepositoriesDescription,
|
|
254
|
+
inputSchema: searchRepositoriesInputSchema,
|
|
255
|
+
execute: withToken(searchRepositoriesCore, ctx)
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
name: "listCommits",
|
|
259
|
+
description: listCommitsDescription,
|
|
260
|
+
inputSchema: listCommitsInputSchema,
|
|
261
|
+
execute: withToken(listCommitsCore, ctx)
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
name: "getCommit",
|
|
265
|
+
description: getCommitDescription,
|
|
266
|
+
inputSchema: getCommitInputSchema,
|
|
267
|
+
execute: withToken(getCommitCore, ctx),
|
|
268
|
+
toModelOutput: modelOutputAdapter(getCommitToModelOutput)
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
name: "getBlame",
|
|
272
|
+
description: getBlameDescription,
|
|
273
|
+
inputSchema: getBlameInputSchema,
|
|
274
|
+
execute: withToken(getBlameCore, ctx)
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
name: "compareCommits",
|
|
278
|
+
description: compareCommitsDescription,
|
|
279
|
+
inputSchema: compareCommitsInputSchema,
|
|
280
|
+
execute: withToken(compareCommitsCore, ctx),
|
|
281
|
+
toModelOutput: modelOutputAdapter(compareCommitsToModelOutput)
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
name: "listGists",
|
|
285
|
+
description: listGistsDescription,
|
|
286
|
+
inputSchema: listGistsInputSchema,
|
|
287
|
+
execute: withToken(listGistsCore, ctx)
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: "getGist",
|
|
291
|
+
description: getGistDescription,
|
|
292
|
+
inputSchema: getGistInputSchema,
|
|
293
|
+
execute: withToken(getGistCore, ctx)
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
name: "listGistComments",
|
|
297
|
+
description: listGistCommentsDescription,
|
|
298
|
+
inputSchema: listGistCommentsInputSchema,
|
|
299
|
+
execute: withToken(listGistCommentsCore, ctx)
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
name: "createGist",
|
|
303
|
+
writeTool: "createGist",
|
|
304
|
+
description: createGistDescription,
|
|
305
|
+
inputSchema: createGistInputSchema,
|
|
306
|
+
execute: withToken(createGistCore, ctx)
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
name: "updateGist",
|
|
310
|
+
writeTool: "updateGist",
|
|
311
|
+
description: updateGistDescription,
|
|
312
|
+
inputSchema: updateGistInputSchema,
|
|
313
|
+
execute: withToken(updateGistCore, ctx)
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
name: "deleteGist",
|
|
317
|
+
writeTool: "deleteGist",
|
|
318
|
+
description: deleteGistDescription,
|
|
319
|
+
inputSchema: deleteGistInputSchema,
|
|
320
|
+
execute: withToken(deleteGistCore, ctx)
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
name: "createGistComment",
|
|
324
|
+
writeTool: "createGistComment",
|
|
325
|
+
description: createGistCommentDescription,
|
|
326
|
+
inputSchema: createGistCommentInputSchema,
|
|
327
|
+
execute: withToken(createGistCommentCore, ctx)
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
name: "listWorkflows",
|
|
331
|
+
description: listWorkflowsDescription,
|
|
332
|
+
inputSchema: listWorkflowsInputSchema,
|
|
333
|
+
execute: withToken(listWorkflowsCore, ctx)
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
name: "listWorkflowRuns",
|
|
337
|
+
description: listWorkflowRunsDescription,
|
|
338
|
+
inputSchema: listWorkflowRunsInputSchema,
|
|
339
|
+
execute: withToken(listWorkflowRunsCore, ctx)
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
name: "getWorkflowRun",
|
|
343
|
+
description: getWorkflowRunDescription,
|
|
344
|
+
inputSchema: getWorkflowRunInputSchema,
|
|
345
|
+
execute: withToken(getWorkflowRunCore, ctx)
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
name: "listWorkflowJobs",
|
|
349
|
+
description: listWorkflowJobsDescription,
|
|
350
|
+
inputSchema: listWorkflowJobsInputSchema,
|
|
351
|
+
execute: withToken(listWorkflowJobsCore, ctx)
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
name: "triggerWorkflow",
|
|
355
|
+
writeTool: "triggerWorkflow",
|
|
356
|
+
description: triggerWorkflowDescription,
|
|
357
|
+
inputSchema: triggerWorkflowInputSchema,
|
|
358
|
+
execute: withToken(triggerWorkflowCore, ctx)
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
name: "cancelWorkflowRun",
|
|
362
|
+
writeTool: "cancelWorkflowRun",
|
|
363
|
+
description: cancelWorkflowRunDescription,
|
|
364
|
+
inputSchema: cancelWorkflowRunInputSchema,
|
|
365
|
+
execute: withToken(cancelWorkflowRunCore, ctx)
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
name: "rerunWorkflowRun",
|
|
369
|
+
writeTool: "rerunWorkflowRun",
|
|
370
|
+
description: rerunWorkflowRunDescription,
|
|
371
|
+
inputSchema: rerunWorkflowRunInputSchema,
|
|
372
|
+
execute: withToken(rerunWorkflowRunCore, ctx)
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
name: "listCheckRuns",
|
|
376
|
+
description: listCheckRunsDescription,
|
|
377
|
+
inputSchema: listCheckRunsInputSchema,
|
|
378
|
+
execute: withToken(listCheckRunsCore, ctx)
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
name: "getCombinedStatus",
|
|
382
|
+
description: getCombinedStatusDescription,
|
|
383
|
+
inputSchema: getCombinedStatusInputSchema,
|
|
384
|
+
execute: withToken(getCombinedStatusCore, ctx)
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
name: "getCiFailureContext",
|
|
388
|
+
description: getCiFailureContextDescription,
|
|
389
|
+
inputSchema: getCiFailureContextInputSchema,
|
|
390
|
+
execute: withToken(getCiFailureContextCore, ctx)
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
name: "listReleases",
|
|
394
|
+
description: listReleasesDescription,
|
|
395
|
+
inputSchema: listReleasesInputSchema,
|
|
396
|
+
execute: withToken(listReleasesCore, ctx)
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
name: "getLatestRelease",
|
|
400
|
+
description: getLatestReleaseDescription,
|
|
401
|
+
inputSchema: getLatestReleaseInputSchema,
|
|
402
|
+
execute: withToken(getLatestReleaseCore, ctx)
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
name: "getRelease",
|
|
406
|
+
description: getReleaseDescription,
|
|
407
|
+
inputSchema: getReleaseInputSchema,
|
|
408
|
+
execute: withToken(getReleaseCore, ctx)
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
name: "getReleaseContext",
|
|
412
|
+
description: getReleaseContextDescription,
|
|
413
|
+
inputSchema: getReleaseContextInputSchema,
|
|
414
|
+
execute: withToken(getReleaseContextCore, ctx)
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
name: "createRelease",
|
|
418
|
+
writeTool: "createRelease",
|
|
419
|
+
description: createReleaseDescription,
|
|
420
|
+
inputSchema: createReleaseInputSchema,
|
|
421
|
+
execute: withToken(createReleaseCore, ctx)
|
|
422
|
+
}
|
|
423
|
+
];
|
|
424
|
+
if (!ctx.context) return entries;
|
|
425
|
+
return entries.map((entry) => ({
|
|
426
|
+
...entry,
|
|
427
|
+
inputSchema: softenContextSchema(entry.inputSchema, ctx.context)
|
|
428
|
+
}));
|
|
429
|
+
}
|
|
430
|
+
//#endregion
|
|
431
|
+
//#region src/eve/steps.ts
|
|
432
|
+
async function executeGithubToolStep(name, input, ctx) {
|
|
433
|
+
"use step";
|
|
434
|
+
const entry = createToolRegistry(ctx).find((tool) => tool.name === name);
|
|
435
|
+
if (!entry) throw new Error(`Unknown GitHub tool: ${name}`);
|
|
436
|
+
return entry.execute(input);
|
|
437
|
+
}
|
|
438
|
+
async function runGithubToolStep(name, input, ctx) {
|
|
439
|
+
const token = await resolveGithubToken(ctx.token);
|
|
440
|
+
return executeGithubToolStep(name, input, {
|
|
441
|
+
...ctx,
|
|
442
|
+
token
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
//#endregion
|
|
446
|
+
//#region src/eve/build.ts
|
|
447
|
+
function resolveAllowedToolNames(options) {
|
|
448
|
+
const presetAllowed = options.preset ? resolvePresetTools(options.preset) : null;
|
|
449
|
+
const includeAllowed = options.include ? new Set(options.include) : null;
|
|
450
|
+
const excluded = options.exclude ? new Set(options.exclude) : null;
|
|
451
|
+
const allowed = presetAllowed && includeAllowed ? /* @__PURE__ */ new Set([...presetAllowed, ...includeAllowed]) : presetAllowed ?? includeAllowed;
|
|
452
|
+
return (name) => (!allowed || allowed.has(name)) && !excluded?.has(name);
|
|
453
|
+
}
|
|
454
|
+
function applyOverrides(tool, name, overrides) {
|
|
455
|
+
const override = overrides?.[name];
|
|
456
|
+
if (!override) return tool;
|
|
457
|
+
return {
|
|
458
|
+
...tool,
|
|
459
|
+
...override.description !== void 0 && { description: override.description },
|
|
460
|
+
...override.approval !== void 0 && { approval: mapEveApprovalValue(override.approval) },
|
|
461
|
+
...override.toModelOutput !== void 0 && { toModelOutput: override.toModelOutput },
|
|
462
|
+
...override.outputSchema !== void 0 && { outputSchema: override.outputSchema }
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
function buildEveToolDefinition(name, options = {}) {
|
|
466
|
+
const { defineTool } = getEveTools();
|
|
467
|
+
const ctx = {
|
|
468
|
+
token: createGithubTokenResolver(options.token),
|
|
469
|
+
context: options.context,
|
|
470
|
+
author: options.author,
|
|
471
|
+
committer: options.committer,
|
|
472
|
+
coAuthors: options.coAuthors
|
|
473
|
+
};
|
|
474
|
+
const entry = createToolRegistry(ctx).find((tool) => tool.name === name);
|
|
475
|
+
if (!entry) throw new Error(`Unknown GitHub tool: ${name}`);
|
|
476
|
+
return applyOverrides(defineTool({
|
|
477
|
+
description: entry.description,
|
|
478
|
+
inputSchema: entry.inputSchema,
|
|
479
|
+
...entry.writeTool && { approval: resolveEveApproval(entry.writeTool, options.requireApproval) },
|
|
480
|
+
...entry.toModelOutput && { toModelOutput: entry.toModelOutput },
|
|
481
|
+
execute: async (input) => runGithubToolStep(name, input, ctx)
|
|
482
|
+
}), name, options.overrides);
|
|
483
|
+
}
|
|
484
|
+
function buildEveToolMap(options = {}) {
|
|
485
|
+
const { defineTool } = getEveTools();
|
|
486
|
+
const ctx = {
|
|
487
|
+
token: createGithubTokenResolver(options.token),
|
|
488
|
+
context: options.context,
|
|
489
|
+
author: options.author,
|
|
490
|
+
committer: options.committer,
|
|
491
|
+
coAuthors: options.coAuthors
|
|
492
|
+
};
|
|
493
|
+
const isAllowed = resolveAllowedToolNames(options);
|
|
494
|
+
const registry = createToolRegistry(ctx);
|
|
495
|
+
const tools = {};
|
|
496
|
+
for (const entry of registry) {
|
|
497
|
+
if (!isAllowed(entry.name)) continue;
|
|
498
|
+
const tool = defineTool({
|
|
499
|
+
description: entry.description,
|
|
500
|
+
inputSchema: entry.inputSchema,
|
|
501
|
+
...entry.writeTool && { approval: resolveEveApproval(entry.writeTool, options.requireApproval) },
|
|
502
|
+
...entry.toModelOutput && { toModelOutput: entry.toModelOutput },
|
|
503
|
+
execute: async (input) => runGithubToolStep(entry.name, input, ctx)
|
|
504
|
+
});
|
|
505
|
+
tools[entry.name] = applyOverrides(tool, entry.name, options.overrides);
|
|
506
|
+
}
|
|
507
|
+
return tools;
|
|
508
|
+
}
|
|
509
|
+
function createEveGithubToolsDynamic(options = {}) {
|
|
510
|
+
const { defineDynamic } = getEveTools();
|
|
511
|
+
return defineDynamic({ events: { "session.started": async () => buildEveToolMap(options) } });
|
|
512
|
+
}
|
|
513
|
+
function listResolvedEveToolNames(options = {}) {
|
|
514
|
+
const isAllowed = resolveAllowedToolNames(options);
|
|
515
|
+
return ALL_GITHUB_TOOL_NAMES.filter(isAllowed);
|
|
516
|
+
}
|
|
517
|
+
//#endregion
|
|
518
|
+
//#region src/eve.ts
|
|
519
|
+
/**
|
|
520
|
+
* Register all GitHub tools (or a preset subset) as eve dynamic capabilities.
|
|
521
|
+
*
|
|
522
|
+
* Export as the default from `agent/tools/github.ts`:
|
|
523
|
+
*
|
|
524
|
+
* ```ts
|
|
525
|
+
* import { createGithubTools } from '@github-tools/sdk/eve'
|
|
526
|
+
* export default createGithubTools({ preset: 'code-review' })
|
|
527
|
+
* ```
|
|
528
|
+
*
|
|
529
|
+
* @deprecated Use the mountable `@github-tools/eve-extension` (`githubExtension`) instead — it is now the
|
|
530
|
+
* recommended way to add GitHub tools to an eve agent. This direct import keeps working but is no longer
|
|
531
|
+
* the recommended path. See https://github-tools.com/frameworks/eve-extension.
|
|
532
|
+
*/
|
|
533
|
+
function createGithubTools(options) {
|
|
534
|
+
return createEveGithubToolsDynamic(options ?? {});
|
|
535
|
+
}
|
|
536
|
+
function factory(name) {
|
|
537
|
+
return (options) => buildEveToolDefinition(name, options);
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Get information about a GitHub repository including description, stars, forks, language, and default branch.
|
|
541
|
+
*
|
|
542
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
543
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
544
|
+
*/
|
|
545
|
+
const getRepository = factory("getRepository");
|
|
546
|
+
/**
|
|
547
|
+
* List branches in a GitHub repository.
|
|
548
|
+
*
|
|
549
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
550
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
551
|
+
*/
|
|
552
|
+
const listBranches = factory("listBranches");
|
|
553
|
+
/**
|
|
554
|
+
* Get the content of a file from a GitHub repository.
|
|
555
|
+
*
|
|
556
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
557
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
558
|
+
*/
|
|
559
|
+
const getFileContent = factory("getFileContent");
|
|
560
|
+
/**
|
|
561
|
+
* Create a new branch in a GitHub repository from an existing branch or commit SHA. Requires approval by default.
|
|
562
|
+
*
|
|
563
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
564
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
565
|
+
*/
|
|
566
|
+
const createBranch = factory("createBranch");
|
|
567
|
+
/**
|
|
568
|
+
* Fork a GitHub repository to the authenticated user account or a specified organization. Requires approval by default.
|
|
569
|
+
*
|
|
570
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
571
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
572
|
+
*/
|
|
573
|
+
const forkRepository = factory("forkRepository");
|
|
574
|
+
/**
|
|
575
|
+
* Create a new GitHub repository for the authenticated user or a specified organization. Requires approval by default.
|
|
576
|
+
*
|
|
577
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
578
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
579
|
+
*/
|
|
580
|
+
const createRepository = factory("createRepository");
|
|
581
|
+
/**
|
|
582
|
+
* Create or update a file in a GitHub repository. Provide the SHA when updating an existing file. Requires approval by default.
|
|
583
|
+
*
|
|
584
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
585
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
586
|
+
*/
|
|
587
|
+
const createOrUpdateFile = factory("createOrUpdateFile");
|
|
588
|
+
/**
|
|
589
|
+
* List pull requests for a GitHub repository.
|
|
590
|
+
*
|
|
591
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
592
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
593
|
+
*/
|
|
594
|
+
const listPullRequests = factory("listPullRequests");
|
|
595
|
+
/**
|
|
596
|
+
* Get detailed information about a specific pull request.
|
|
597
|
+
*
|
|
598
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
599
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
600
|
+
*/
|
|
601
|
+
const getPullRequest = factory("getPullRequest");
|
|
602
|
+
/**
|
|
603
|
+
* Create a new pull request in a GitHub repository. Requires approval by default.
|
|
604
|
+
*
|
|
605
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
606
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
607
|
+
*/
|
|
608
|
+
const createPullRequest = factory("createPullRequest");
|
|
609
|
+
/**
|
|
610
|
+
* Merge a pull request. Requires approval by default.
|
|
611
|
+
*
|
|
612
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
613
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
614
|
+
*/
|
|
615
|
+
const mergePullRequest = factory("mergePullRequest");
|
|
616
|
+
/**
|
|
617
|
+
* Add a comment to a pull request. Requires approval by default.
|
|
618
|
+
*
|
|
619
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
620
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
621
|
+
*/
|
|
622
|
+
const addPullRequestComment = factory("addPullRequestComment");
|
|
623
|
+
/**
|
|
624
|
+
* List files changed in a pull request, including diff status and patch content.
|
|
625
|
+
*
|
|
626
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
627
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
628
|
+
*/
|
|
629
|
+
const listPullRequestFiles = factory("listPullRequestFiles");
|
|
630
|
+
/**
|
|
631
|
+
* List reviews on a pull request (approvals, change requests, and comments).
|
|
632
|
+
*
|
|
633
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
634
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
635
|
+
*/
|
|
636
|
+
const listPullRequestReviews = factory("listPullRequestReviews");
|
|
637
|
+
/**
|
|
638
|
+
* Submit a pull request review with optional inline comments. Requires approval by default.
|
|
639
|
+
*
|
|
640
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
641
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
642
|
+
*/
|
|
643
|
+
const createPullRequestReview = factory("createPullRequestReview");
|
|
644
|
+
/**
|
|
645
|
+
* Fetch pull request details plus files, reviews, and optional CI checks in one call.
|
|
646
|
+
*
|
|
647
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
648
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
649
|
+
*/
|
|
650
|
+
const getPullRequestContext = factory("getPullRequestContext");
|
|
651
|
+
/**
|
|
652
|
+
* Fetch an issue plus available labels and recent comments in one call.
|
|
653
|
+
*
|
|
654
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
655
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
656
|
+
*/
|
|
657
|
+
const getIssueContext = factory("getIssueContext");
|
|
658
|
+
/**
|
|
659
|
+
* List issues for a GitHub repository (excludes pull requests).
|
|
660
|
+
*
|
|
661
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
662
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
663
|
+
*/
|
|
664
|
+
const listIssues = factory("listIssues");
|
|
665
|
+
/**
|
|
666
|
+
* Get detailed information about a specific issue.
|
|
667
|
+
*
|
|
668
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
669
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
670
|
+
*/
|
|
671
|
+
const getIssue = factory("getIssue");
|
|
672
|
+
/**
|
|
673
|
+
* Create a new issue in a GitHub repository. Requires approval by default.
|
|
674
|
+
*
|
|
675
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
676
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
677
|
+
*/
|
|
678
|
+
const createIssue = factory("createIssue");
|
|
679
|
+
/**
|
|
680
|
+
* Add a comment to a GitHub issue. Requires approval by default.
|
|
681
|
+
*
|
|
682
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
683
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
684
|
+
*/
|
|
685
|
+
const addIssueComment = factory("addIssueComment");
|
|
686
|
+
/**
|
|
687
|
+
* Close an open GitHub issue. Requires approval by default.
|
|
688
|
+
*
|
|
689
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
690
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
691
|
+
*/
|
|
692
|
+
const closeIssue = factory("closeIssue");
|
|
693
|
+
/**
|
|
694
|
+
* List labels available in a GitHub repository.
|
|
695
|
+
*
|
|
696
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
697
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
698
|
+
*/
|
|
699
|
+
const listLabels = factory("listLabels");
|
|
700
|
+
/**
|
|
701
|
+
* Add labels to an issue or pull request. Requires approval by default.
|
|
702
|
+
*
|
|
703
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
704
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
705
|
+
*/
|
|
706
|
+
const addLabels = factory("addLabels");
|
|
707
|
+
/**
|
|
708
|
+
* Remove a label from an issue or pull request. Requires approval by default.
|
|
709
|
+
*
|
|
710
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
711
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
712
|
+
*/
|
|
713
|
+
const removeLabel = factory("removeLabel");
|
|
714
|
+
/**
|
|
715
|
+
* Search for code in GitHub repositories. Use qualifiers like "repo:owner/name" to scope the search.
|
|
716
|
+
*
|
|
717
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
718
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
719
|
+
*/
|
|
720
|
+
const searchCode = factory("searchCode");
|
|
721
|
+
/**
|
|
722
|
+
* Search for GitHub repositories by keyword, topic, language, or other qualifiers.
|
|
723
|
+
*
|
|
724
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
725
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
726
|
+
*/
|
|
727
|
+
const searchRepositories = factory("searchRepositories");
|
|
728
|
+
/**
|
|
729
|
+
* List commits for a GitHub repository. Filter by file path to see commits that touched a file.
|
|
730
|
+
*
|
|
731
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
732
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
733
|
+
*/
|
|
734
|
+
const listCommits = factory("listCommits");
|
|
735
|
+
/**
|
|
736
|
+
* Get detailed information about a specific commit, including files changed with additions and deletions.
|
|
737
|
+
*
|
|
738
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
739
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
740
|
+
*/
|
|
741
|
+
const getCommit = factory("getCommit");
|
|
742
|
+
/**
|
|
743
|
+
* Line-level git blame for a file at a commit-like ref (branch, tag, or SHA).
|
|
744
|
+
*
|
|
745
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
746
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
747
|
+
*/
|
|
748
|
+
const getBlame = factory("getBlame");
|
|
749
|
+
/**
|
|
750
|
+
* List gists for the authenticated user or a specific user.
|
|
751
|
+
*
|
|
752
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
753
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
754
|
+
*/
|
|
755
|
+
const listGists = factory("listGists");
|
|
756
|
+
/**
|
|
757
|
+
* Get a gist by ID, including file contents.
|
|
758
|
+
*
|
|
759
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
760
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
761
|
+
*/
|
|
762
|
+
const getGist = factory("getGist");
|
|
763
|
+
/**
|
|
764
|
+
* List comments on a gist.
|
|
765
|
+
*
|
|
766
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
767
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
768
|
+
*/
|
|
769
|
+
const listGistComments = factory("listGistComments");
|
|
770
|
+
/**
|
|
771
|
+
* Create a new gist with one or more files. Requires approval by default.
|
|
772
|
+
*
|
|
773
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
774
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
775
|
+
*/
|
|
776
|
+
const createGist = factory("createGist");
|
|
777
|
+
/**
|
|
778
|
+
* Update an existing gist. Requires approval by default.
|
|
779
|
+
*
|
|
780
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
781
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
782
|
+
*/
|
|
783
|
+
const updateGist = factory("updateGist");
|
|
784
|
+
/**
|
|
785
|
+
* Delete a gist permanently. Requires approval by default.
|
|
786
|
+
*
|
|
787
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
788
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
789
|
+
*/
|
|
790
|
+
const deleteGist = factory("deleteGist");
|
|
791
|
+
/**
|
|
792
|
+
* Add a comment to a gist. Requires approval by default.
|
|
793
|
+
*
|
|
794
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
795
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
796
|
+
*/
|
|
797
|
+
const createGistComment = factory("createGistComment");
|
|
798
|
+
/**
|
|
799
|
+
* List GitHub Actions workflows in a repository.
|
|
800
|
+
*
|
|
801
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
802
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
803
|
+
*/
|
|
804
|
+
const listWorkflows = factory("listWorkflows");
|
|
805
|
+
/**
|
|
806
|
+
* List workflow runs for a repository, optionally filtered by workflow, branch, status, or event.
|
|
807
|
+
*
|
|
808
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
809
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
810
|
+
*/
|
|
811
|
+
const listWorkflowRuns = factory("listWorkflowRuns");
|
|
812
|
+
/**
|
|
813
|
+
* Get details of a specific workflow run including status, timing, and trigger info.
|
|
814
|
+
*
|
|
815
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
816
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
817
|
+
*/
|
|
818
|
+
const getWorkflowRun = factory("getWorkflowRun");
|
|
819
|
+
/**
|
|
820
|
+
* List jobs for a workflow run, including step-level status and timing.
|
|
821
|
+
*
|
|
822
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
823
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
824
|
+
*/
|
|
825
|
+
const listWorkflowJobs = factory("listWorkflowJobs");
|
|
826
|
+
/**
|
|
827
|
+
* Trigger a workflow via workflow_dispatch event. Requires approval by default.
|
|
828
|
+
*
|
|
829
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
830
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
831
|
+
*/
|
|
832
|
+
const triggerWorkflow = factory("triggerWorkflow");
|
|
833
|
+
/**
|
|
834
|
+
* Cancel an in-progress workflow run. Requires approval by default.
|
|
835
|
+
*
|
|
836
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
837
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
838
|
+
*/
|
|
839
|
+
const cancelWorkflowRun = factory("cancelWorkflowRun");
|
|
840
|
+
/**
|
|
841
|
+
* Re-run a workflow run, optionally only the failed jobs. Requires approval by default.
|
|
842
|
+
*
|
|
843
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
844
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
845
|
+
*/
|
|
846
|
+
const rerunWorkflowRun = factory("rerunWorkflowRun");
|
|
847
|
+
/**
|
|
848
|
+
* Diagnose CI failures for a ref — combined status, failing checks, and failed workflow jobs in one call.
|
|
849
|
+
*
|
|
850
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
851
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
852
|
+
*/
|
|
853
|
+
const getCiFailureContext = factory("getCiFailureContext");
|
|
854
|
+
/**
|
|
855
|
+
* Fetch a release plus the previous release and tag comparison in one call.
|
|
856
|
+
*
|
|
857
|
+
* @deprecated Cherry-picking eve tool factories directly is deprecated — mount `@github-tools/eve-extension`
|
|
858
|
+
* instead. See https://github-tools.com/frameworks/eve-extension.
|
|
859
|
+
*/
|
|
860
|
+
const getReleaseContext = factory("getReleaseContext");
|
|
861
|
+
//#endregion
|
|
862
|
+
export { listCommits as A, listWorkflows as B, getIssueContext as C, getRepository as D, getReleaseContext as E, listPullRequestFiles as F, searchRepositories as G, removeLabel as H, listPullRequestReviews as I, buildEveToolDefinition as J, triggerWorkflow as K, listPullRequests as L, listGists as M, listIssues as N, getWorkflowRun as O, listLabels as P, MISSING_EVE_MESSAGE as Q, listWorkflowJobs as R, getIssue as S, getPullRequestContext as T, rerunWorkflowRun as U, mergePullRequest as V, searchCode as W, createEveGithubToolsDynamic as X, buildEveToolMap as Y, listResolvedEveToolNames as Z, getBlame as _, closeIssue as a, getFileContent as b, createGistComment as c, createOrUpdateFile as d, createPullRequest as f, forkRepository as g, deleteGist as h, cancelWorkflowRun as i, listGistComments as j, listBranches as k, createGithubTools as l, createRepository as m, addLabels as n, createBranch as o, createPullRequestReview as p, updateGist as q, addPullRequestComment as r, createGist as s, addIssueComment as t, createIssue as u, getCiFailureContext as v, getPullRequest as w, getGist as x, getCommit as y, listWorkflowRuns as z };
|
|
863
|
+
|
|
864
|
+
//# sourceMappingURL=eve-DmiXBuli.mjs.map
|