@github-tools/sdk 1.6.0 → 1.8.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 +150 -10
- package/dist/connect/eve.d.mts +17 -0
- package/dist/connect/eve.d.mts.map +1 -0
- package/dist/connect/eve.mjs +27 -0
- package/dist/connect/eve.mjs.map +1 -0
- package/dist/connect.d.mts +46 -0
- package/dist/connect.d.mts.map +1 -0
- package/dist/connect.mjs +22 -0
- package/dist/connect.mjs.map +1 -0
- package/dist/eve-B-LChKzS.mjs +526 -0
- package/dist/eve-B-LChKzS.mjs.map +1 -0
- package/dist/eve.d.mts +125 -0
- package/dist/eve.d.mts.map +1 -0
- package/dist/eve.mjs +3 -0
- package/dist/index-SZCaP-y9.d.mts +220 -0
- package/dist/index-SZCaP-y9.d.mts.map +1 -0
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +3 -2
- package/dist/src-CfzZfU82.mjs +812 -0
- package/dist/src-CfzZfU82.mjs.map +1 -0
- package/dist/token-CW8lQBND.mjs +100 -0
- package/dist/token-CW8lQBND.mjs.map +1 -0
- package/dist/tool-types-C0kszIwd.d.mts +249 -0
- package/dist/tool-types-C0kszIwd.d.mts.map +1 -0
- package/dist/types-BTanS_dq.d.mts +49 -0
- package/dist/types-BTanS_dq.d.mts.map +1 -0
- package/dist/types-DOeq0Iia.d.mts +27 -0
- package/dist/types-DOeq0Iia.d.mts.map +1 -0
- package/dist/workflow.d.mts +53 -730
- package/dist/workflow.d.mts.map +1 -1
- package/dist/workflow.mjs +14 -74
- package/dist/workflow.mjs.map +1 -1
- package/dist/write-tools-Dx9LfYlU.mjs +1840 -0
- package/dist/write-tools-Dx9LfYlU.mjs.map +1 -0
- package/package.json +40 -8
- package/dist/index-ikP-LT-3.d.mts +0 -1634
- package/dist/index-ikP-LT-3.d.mts.map +0 -1
- package/dist/src--pAdGYqY.mjs +0 -1961
- package/dist/src--pAdGYqY.mjs.map +0 -1
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
import { $ as getCommitInputSchema, $t as listPullRequestsInputSchema, A as createGistCore, At as removeLabelCore, B as listGistCommentsDescription, Bt as createPullRequestReviewDescription, C as rerunWorkflowRunInputSchema, Cn as getRepositoryCore, Ct as getIssueInputSchema, D as createGistCommentCore, Dn as listBranchesDescription, Dt as listLabelsCore, E as triggerWorkflowInputSchema, En as listBranchesCore, Et as listIssuesInputSchema, F as deleteGistInputSchema, Ft as addPullRequestCommentInputSchema, G as updateGistCore, Gt as listPullRequestFilesCore, H as listGistsCore, Ht as getPullRequestCore, I as getGistCore, It as createPullRequestCore, J as getBlameCore, Jt as listPullRequestReviewsCore, K as updateGistDescription, Kt as listPullRequestFilesDescription, L as getGistDescription, Lt as createPullRequestDescription, M as createGistInputSchema, Mt as removeLabelInputSchema, N as deleteGistCore, Nt as addPullRequestCommentCore, O as createGistCommentDescription, On as listBranchesInputSchema, Ot as listLabelsDescription, P as deleteGistDescription, Pt as addPullRequestCommentDescription, Q as getCommitDescription, Qt as listPullRequestsDescription, R as getGistInputSchema, Rt as createPullRequestInputSchema, S as rerunWorkflowRunDescription, Sn as getFileContentInputSchema, St as getIssueDescription, T as triggerWorkflowDescription, Tn as getRepositoryInputSchema, Tt as listIssuesDescription, U as listGistsDescription, Ut as getPullRequestDescription, V as listGistCommentsInputSchema, Vt as createPullRequestReviewInputSchema, W as listGistsInputSchema, Wt as getPullRequestInputSchema, X as getBlameInputSchema, Xt as listPullRequestReviewsInputSchema, Y as getBlameDescription, Yt as listPullRequestReviewsDescription, Z as getCommitCore, Zt as listPullRequestsCore, _ as listWorkflowRunsInputSchema, _n as forkRepositoryCore, _t as closeIssueInputSchema, a as resolvePresetTools, an as getCommitToModelOutput, at as searchCodeInputSchema, b as listWorkflowsInputSchema, bn as getFileContentCore, bt as createIssueInputSchema, c as cancelWorkflowRunInputSchema, cn as createBranchCore, ct as searchRepositoriesInputSchema, d as getWorkflowRunInputSchema, dn as createOrUpdateFileCore, dt as addIssueCommentInputSchema, en as mergePullRequestCore, et as listCommitsCore, f as listWorkflowJobsCore, fn as createOrUpdateFileDescription, ft as addLabelsCore, g as listWorkflowRunsDescription, gn as createRepositoryInputSchema, gt as closeIssueDescription, h as listWorkflowRunsCore, hn as createRepositoryDescription, ht as closeIssueCore, in as resolveGithubToken, it as searchCodeDescription, j as createGistDescription, jt as removeLabelDescription, k as createGistCommentInputSchema, kt as listLabelsInputSchema, l as getWorkflowRunCore, ln as createBranchDescription, lt as addIssueCommentCore, m as listWorkflowJobsInputSchema, mn as createRepositoryCore, mt as addLabelsInputSchema, n as ALL_GITHUB_TOOL_NAMES, nn as mergePullRequestInputSchema, nt as listCommitsInputSchema, o as cancelWorkflowRunCore, on as getFileContentToModelOutput, ot as searchRepositoriesCore, p as listWorkflowJobsDescription, pn as createOrUpdateFileInputSchema, pt as addLabelsDescription, q as updateGistInputSchema, qt as listPullRequestFilesInputSchema, rn as createGithubTokenResolver, rt as searchCodeCore, s as cancelWorkflowRunDescription, sn as listPullRequestFilesToModelOutput, st as searchRepositoriesDescription, tn as mergePullRequestDescription, tt as listCommitsDescription, u as getWorkflowRunDescription, un as createBranchInputSchema, ut as addIssueCommentDescription, v as listWorkflowsCore, vn as forkRepositoryDescription, vt as createIssueCore, w as triggerWorkflowCore, wn as getRepositoryDescription, wt as listIssuesCore, x as rerunWorkflowRunCore, xn as getFileContentDescription, xt as getIssueCore, y as listWorkflowsDescription, yn as forkRepositoryInputSchema, yt as createIssueDescription, z as listGistCommentsCore, zt as createPullRequestReviewCore } from "./write-tools-Dx9LfYlU.mjs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
//#region src/eve/load-eve.ts
|
|
4
|
+
const require = createRequire(import.meta.url);
|
|
5
|
+
const MISSING_EVE_MESSAGE = "The \"eve\" package is required to use @github-tools/sdk/eve. Install it with: pnpm add eve";
|
|
6
|
+
let eveToolsModule;
|
|
7
|
+
let eveApprovalModule;
|
|
8
|
+
function getEveTools() {
|
|
9
|
+
if (eveToolsModule) return eveToolsModule;
|
|
10
|
+
try {
|
|
11
|
+
eveToolsModule = require("eve/tools");
|
|
12
|
+
return eveToolsModule;
|
|
13
|
+
} catch {
|
|
14
|
+
throw new Error(MISSING_EVE_MESSAGE);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function getEveApprovalHelpers() {
|
|
18
|
+
if (eveApprovalModule) return eveApprovalModule;
|
|
19
|
+
try {
|
|
20
|
+
eveApprovalModule = require("eve/tools/approval");
|
|
21
|
+
return eveApprovalModule;
|
|
22
|
+
} catch {
|
|
23
|
+
throw new Error(MISSING_EVE_MESSAGE);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/eve/approval.ts
|
|
28
|
+
function mapEveApprovalValue(value) {
|
|
29
|
+
if (typeof value === "function") return value;
|
|
30
|
+
const { always, never, once } = getEveApprovalHelpers();
|
|
31
|
+
if (value === true || value === "always") return always();
|
|
32
|
+
if (value === false || value === "never") return never();
|
|
33
|
+
if (value === "once") return once();
|
|
34
|
+
return always();
|
|
35
|
+
}
|
|
36
|
+
function resolveEveApproval(toolName, config) {
|
|
37
|
+
if (config === void 0) return getEveApprovalHelpers().always();
|
|
38
|
+
if (config === true) return getEveApprovalHelpers().always();
|
|
39
|
+
if (config === false) return getEveApprovalHelpers().never();
|
|
40
|
+
const value = config[toolName];
|
|
41
|
+
if (value === void 0) return getEveApprovalHelpers().always();
|
|
42
|
+
return mapEveApprovalValue(value);
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/eve/registry.ts
|
|
46
|
+
function withToken(core, ctx, extra) {
|
|
47
|
+
return async (input) => core({
|
|
48
|
+
token: await resolveGithubToken(ctx.token),
|
|
49
|
+
...extra,
|
|
50
|
+
...input
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function modelOutputAdapter(fn) {
|
|
54
|
+
return (output) => fn({
|
|
55
|
+
toolCallId: "",
|
|
56
|
+
input: {},
|
|
57
|
+
output
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function createToolRegistry(ctx) {
|
|
61
|
+
return [
|
|
62
|
+
{
|
|
63
|
+
name: "getRepository",
|
|
64
|
+
description: getRepositoryDescription,
|
|
65
|
+
inputSchema: getRepositoryInputSchema,
|
|
66
|
+
execute: withToken(getRepositoryCore, ctx)
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "listBranches",
|
|
70
|
+
description: listBranchesDescription,
|
|
71
|
+
inputSchema: listBranchesInputSchema,
|
|
72
|
+
execute: withToken(listBranchesCore, ctx)
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "getFileContent",
|
|
76
|
+
description: getFileContentDescription,
|
|
77
|
+
inputSchema: getFileContentInputSchema,
|
|
78
|
+
execute: withToken(getFileContentCore, ctx),
|
|
79
|
+
toModelOutput: modelOutputAdapter(getFileContentToModelOutput)
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "createBranch",
|
|
83
|
+
writeTool: "createBranch",
|
|
84
|
+
description: createBranchDescription,
|
|
85
|
+
inputSchema: createBranchInputSchema,
|
|
86
|
+
execute: withToken(createBranchCore, ctx)
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "forkRepository",
|
|
90
|
+
writeTool: "forkRepository",
|
|
91
|
+
description: forkRepositoryDescription,
|
|
92
|
+
inputSchema: forkRepositoryInputSchema,
|
|
93
|
+
execute: withToken(forkRepositoryCore, ctx)
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "createRepository",
|
|
97
|
+
writeTool: "createRepository",
|
|
98
|
+
description: createRepositoryDescription,
|
|
99
|
+
inputSchema: createRepositoryInputSchema,
|
|
100
|
+
execute: withToken(createRepositoryCore, ctx)
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "createOrUpdateFile",
|
|
104
|
+
writeTool: "createOrUpdateFile",
|
|
105
|
+
description: createOrUpdateFileDescription,
|
|
106
|
+
inputSchema: createOrUpdateFileInputSchema,
|
|
107
|
+
execute: withToken(createOrUpdateFileCore, ctx, {
|
|
108
|
+
author: ctx.author,
|
|
109
|
+
committer: ctx.committer,
|
|
110
|
+
coAuthors: ctx.coAuthors
|
|
111
|
+
})
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "listPullRequests",
|
|
115
|
+
description: listPullRequestsDescription,
|
|
116
|
+
inputSchema: listPullRequestsInputSchema,
|
|
117
|
+
execute: withToken(listPullRequestsCore, ctx)
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "getPullRequest",
|
|
121
|
+
description: getPullRequestDescription,
|
|
122
|
+
inputSchema: getPullRequestInputSchema,
|
|
123
|
+
execute: withToken(getPullRequestCore, ctx)
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "createPullRequest",
|
|
127
|
+
writeTool: "createPullRequest",
|
|
128
|
+
description: createPullRequestDescription,
|
|
129
|
+
inputSchema: createPullRequestInputSchema,
|
|
130
|
+
execute: withToken(createPullRequestCore, ctx)
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: "mergePullRequest",
|
|
134
|
+
writeTool: "mergePullRequest",
|
|
135
|
+
description: mergePullRequestDescription,
|
|
136
|
+
inputSchema: mergePullRequestInputSchema,
|
|
137
|
+
execute: withToken(mergePullRequestCore, ctx, { coAuthors: ctx.coAuthors })
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "addPullRequestComment",
|
|
141
|
+
writeTool: "addPullRequestComment",
|
|
142
|
+
description: addPullRequestCommentDescription,
|
|
143
|
+
inputSchema: addPullRequestCommentInputSchema,
|
|
144
|
+
execute: withToken(addPullRequestCommentCore, ctx)
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "listPullRequestFiles",
|
|
148
|
+
description: listPullRequestFilesDescription,
|
|
149
|
+
inputSchema: listPullRequestFilesInputSchema,
|
|
150
|
+
execute: withToken(listPullRequestFilesCore, ctx),
|
|
151
|
+
toModelOutput: modelOutputAdapter(listPullRequestFilesToModelOutput)
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: "listPullRequestReviews",
|
|
155
|
+
description: listPullRequestReviewsDescription,
|
|
156
|
+
inputSchema: listPullRequestReviewsInputSchema,
|
|
157
|
+
execute: withToken(listPullRequestReviewsCore, ctx)
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "createPullRequestReview",
|
|
161
|
+
writeTool: "createPullRequestReview",
|
|
162
|
+
description: createPullRequestReviewDescription,
|
|
163
|
+
inputSchema: createPullRequestReviewInputSchema,
|
|
164
|
+
execute: withToken(createPullRequestReviewCore, ctx)
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: "listIssues",
|
|
168
|
+
description: listIssuesDescription,
|
|
169
|
+
inputSchema: listIssuesInputSchema,
|
|
170
|
+
execute: withToken(listIssuesCore, ctx)
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
name: "getIssue",
|
|
174
|
+
description: getIssueDescription,
|
|
175
|
+
inputSchema: getIssueInputSchema,
|
|
176
|
+
execute: withToken(getIssueCore, ctx)
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
name: "createIssue",
|
|
180
|
+
writeTool: "createIssue",
|
|
181
|
+
description: createIssueDescription,
|
|
182
|
+
inputSchema: createIssueInputSchema,
|
|
183
|
+
execute: withToken(createIssueCore, ctx)
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
name: "addIssueComment",
|
|
187
|
+
writeTool: "addIssueComment",
|
|
188
|
+
description: addIssueCommentDescription,
|
|
189
|
+
inputSchema: addIssueCommentInputSchema,
|
|
190
|
+
execute: withToken(addIssueCommentCore, ctx)
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
name: "closeIssue",
|
|
194
|
+
writeTool: "closeIssue",
|
|
195
|
+
description: closeIssueDescription,
|
|
196
|
+
inputSchema: closeIssueInputSchema,
|
|
197
|
+
execute: withToken(closeIssueCore, ctx)
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
name: "listLabels",
|
|
201
|
+
description: listLabelsDescription,
|
|
202
|
+
inputSchema: listLabelsInputSchema,
|
|
203
|
+
execute: withToken(listLabelsCore, ctx)
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
name: "addLabels",
|
|
207
|
+
writeTool: "addLabels",
|
|
208
|
+
description: addLabelsDescription,
|
|
209
|
+
inputSchema: addLabelsInputSchema,
|
|
210
|
+
execute: withToken(addLabelsCore, ctx)
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
name: "removeLabel",
|
|
214
|
+
writeTool: "removeLabel",
|
|
215
|
+
description: removeLabelDescription,
|
|
216
|
+
inputSchema: removeLabelInputSchema,
|
|
217
|
+
execute: withToken(removeLabelCore, ctx)
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "searchCode",
|
|
221
|
+
description: searchCodeDescription,
|
|
222
|
+
inputSchema: searchCodeInputSchema,
|
|
223
|
+
execute: withToken(searchCodeCore, ctx)
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
name: "searchRepositories",
|
|
227
|
+
description: searchRepositoriesDescription,
|
|
228
|
+
inputSchema: searchRepositoriesInputSchema,
|
|
229
|
+
execute: withToken(searchRepositoriesCore, ctx)
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "listCommits",
|
|
233
|
+
description: listCommitsDescription,
|
|
234
|
+
inputSchema: listCommitsInputSchema,
|
|
235
|
+
execute: withToken(listCommitsCore, ctx)
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
name: "getCommit",
|
|
239
|
+
description: getCommitDescription,
|
|
240
|
+
inputSchema: getCommitInputSchema,
|
|
241
|
+
execute: withToken(getCommitCore, ctx),
|
|
242
|
+
toModelOutput: modelOutputAdapter(getCommitToModelOutput)
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
name: "getBlame",
|
|
246
|
+
description: getBlameDescription,
|
|
247
|
+
inputSchema: getBlameInputSchema,
|
|
248
|
+
execute: withToken(getBlameCore, ctx)
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
name: "listGists",
|
|
252
|
+
description: listGistsDescription,
|
|
253
|
+
inputSchema: listGistsInputSchema,
|
|
254
|
+
execute: withToken(listGistsCore, ctx)
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
name: "getGist",
|
|
258
|
+
description: getGistDescription,
|
|
259
|
+
inputSchema: getGistInputSchema,
|
|
260
|
+
execute: withToken(getGistCore, ctx)
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
name: "listGistComments",
|
|
264
|
+
description: listGistCommentsDescription,
|
|
265
|
+
inputSchema: listGistCommentsInputSchema,
|
|
266
|
+
execute: withToken(listGistCommentsCore, ctx)
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
name: "createGist",
|
|
270
|
+
writeTool: "createGist",
|
|
271
|
+
description: createGistDescription,
|
|
272
|
+
inputSchema: createGistInputSchema,
|
|
273
|
+
execute: withToken(createGistCore, ctx)
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
name: "updateGist",
|
|
277
|
+
writeTool: "updateGist",
|
|
278
|
+
description: updateGistDescription,
|
|
279
|
+
inputSchema: updateGistInputSchema,
|
|
280
|
+
execute: withToken(updateGistCore, ctx)
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
name: "deleteGist",
|
|
284
|
+
writeTool: "deleteGist",
|
|
285
|
+
description: deleteGistDescription,
|
|
286
|
+
inputSchema: deleteGistInputSchema,
|
|
287
|
+
execute: withToken(deleteGistCore, ctx)
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
name: "createGistComment",
|
|
291
|
+
writeTool: "createGistComment",
|
|
292
|
+
description: createGistCommentDescription,
|
|
293
|
+
inputSchema: createGistCommentInputSchema,
|
|
294
|
+
execute: withToken(createGistCommentCore, ctx)
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
name: "listWorkflows",
|
|
298
|
+
description: listWorkflowsDescription,
|
|
299
|
+
inputSchema: listWorkflowsInputSchema,
|
|
300
|
+
execute: withToken(listWorkflowsCore, ctx)
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
name: "listWorkflowRuns",
|
|
304
|
+
description: listWorkflowRunsDescription,
|
|
305
|
+
inputSchema: listWorkflowRunsInputSchema,
|
|
306
|
+
execute: withToken(listWorkflowRunsCore, ctx)
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
name: "getWorkflowRun",
|
|
310
|
+
description: getWorkflowRunDescription,
|
|
311
|
+
inputSchema: getWorkflowRunInputSchema,
|
|
312
|
+
execute: withToken(getWorkflowRunCore, ctx)
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
name: "listWorkflowJobs",
|
|
316
|
+
description: listWorkflowJobsDescription,
|
|
317
|
+
inputSchema: listWorkflowJobsInputSchema,
|
|
318
|
+
execute: withToken(listWorkflowJobsCore, ctx)
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
name: "triggerWorkflow",
|
|
322
|
+
writeTool: "triggerWorkflow",
|
|
323
|
+
description: triggerWorkflowDescription,
|
|
324
|
+
inputSchema: triggerWorkflowInputSchema,
|
|
325
|
+
execute: withToken(triggerWorkflowCore, ctx)
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
name: "cancelWorkflowRun",
|
|
329
|
+
writeTool: "cancelWorkflowRun",
|
|
330
|
+
description: cancelWorkflowRunDescription,
|
|
331
|
+
inputSchema: cancelWorkflowRunInputSchema,
|
|
332
|
+
execute: withToken(cancelWorkflowRunCore, ctx)
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
name: "rerunWorkflowRun",
|
|
336
|
+
writeTool: "rerunWorkflowRun",
|
|
337
|
+
description: rerunWorkflowRunDescription,
|
|
338
|
+
inputSchema: rerunWorkflowRunInputSchema,
|
|
339
|
+
execute: withToken(rerunWorkflowRunCore, ctx)
|
|
340
|
+
}
|
|
341
|
+
];
|
|
342
|
+
}
|
|
343
|
+
//#endregion
|
|
344
|
+
//#region src/eve/steps.ts
|
|
345
|
+
async function executeGithubToolStep(name, input, ctx) {
|
|
346
|
+
"use step";
|
|
347
|
+
const entry = createToolRegistry(ctx).find((tool) => tool.name === name);
|
|
348
|
+
if (!entry) throw new Error(`Unknown GitHub tool: ${name}`);
|
|
349
|
+
return entry.execute(input);
|
|
350
|
+
}
|
|
351
|
+
async function runGithubToolStep(name, input, ctx) {
|
|
352
|
+
const token = await resolveGithubToken(ctx.token);
|
|
353
|
+
return executeGithubToolStep(name, input, {
|
|
354
|
+
...ctx,
|
|
355
|
+
token
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region src/eve/build.ts
|
|
360
|
+
function applyOverrides(tool, name, overrides) {
|
|
361
|
+
const override = overrides?.[name];
|
|
362
|
+
if (!override) return tool;
|
|
363
|
+
return {
|
|
364
|
+
...tool,
|
|
365
|
+
...override.description !== void 0 && { description: override.description },
|
|
366
|
+
...override.approval !== void 0 && { approval: mapEveApprovalValue(override.approval) },
|
|
367
|
+
...override.toModelOutput !== void 0 && { toModelOutput: override.toModelOutput },
|
|
368
|
+
...override.outputSchema !== void 0 && { outputSchema: override.outputSchema }
|
|
369
|
+
};
|
|
370
|
+
}
|
|
371
|
+
function buildEveToolDefinition(name, options = {}) {
|
|
372
|
+
const { defineTool } = getEveTools();
|
|
373
|
+
const ctx = {
|
|
374
|
+
token: createGithubTokenResolver(options.token),
|
|
375
|
+
author: options.author,
|
|
376
|
+
committer: options.committer,
|
|
377
|
+
coAuthors: options.coAuthors
|
|
378
|
+
};
|
|
379
|
+
const entry = createToolRegistry(ctx).find((tool) => tool.name === name);
|
|
380
|
+
if (!entry) throw new Error(`Unknown GitHub tool: ${name}`);
|
|
381
|
+
return applyOverrides(defineTool({
|
|
382
|
+
description: entry.description,
|
|
383
|
+
inputSchema: entry.inputSchema,
|
|
384
|
+
...entry.writeTool && { approval: resolveEveApproval(entry.writeTool, options.requireApproval) },
|
|
385
|
+
...entry.toModelOutput && { toModelOutput: entry.toModelOutput },
|
|
386
|
+
execute: async (input) => runGithubToolStep(name, input, ctx)
|
|
387
|
+
}), name, options.overrides);
|
|
388
|
+
}
|
|
389
|
+
function buildEveToolMap(options = {}) {
|
|
390
|
+
const { defineTool } = getEveTools();
|
|
391
|
+
const ctx = {
|
|
392
|
+
token: createGithubTokenResolver(options.token),
|
|
393
|
+
author: options.author,
|
|
394
|
+
committer: options.committer,
|
|
395
|
+
coAuthors: options.coAuthors
|
|
396
|
+
};
|
|
397
|
+
const allowed = options.preset ? resolvePresetTools(options.preset) : null;
|
|
398
|
+
const registry = createToolRegistry(ctx);
|
|
399
|
+
const tools = {};
|
|
400
|
+
for (const entry of registry) {
|
|
401
|
+
if (allowed && !allowed.has(entry.name)) continue;
|
|
402
|
+
const tool = defineTool({
|
|
403
|
+
description: entry.description,
|
|
404
|
+
inputSchema: entry.inputSchema,
|
|
405
|
+
...entry.writeTool && { approval: resolveEveApproval(entry.writeTool, options.requireApproval) },
|
|
406
|
+
...entry.toModelOutput && { toModelOutput: entry.toModelOutput },
|
|
407
|
+
execute: async (input) => runGithubToolStep(entry.name, input, ctx)
|
|
408
|
+
});
|
|
409
|
+
tools[entry.name] = applyOverrides(tool, entry.name, options.overrides);
|
|
410
|
+
}
|
|
411
|
+
return tools;
|
|
412
|
+
}
|
|
413
|
+
function createEveGithubToolsDynamic(options = {}) {
|
|
414
|
+
const { defineDynamic } = getEveTools();
|
|
415
|
+
return defineDynamic({ events: { "session.started": async () => buildEveToolMap(options) } });
|
|
416
|
+
}
|
|
417
|
+
function listResolvedEveToolNames(options = {}) {
|
|
418
|
+
if (!options.preset) return [...ALL_GITHUB_TOOL_NAMES];
|
|
419
|
+
return ALL_GITHUB_TOOL_NAMES.filter((name) => resolvePresetTools(options.preset).has(name));
|
|
420
|
+
}
|
|
421
|
+
//#endregion
|
|
422
|
+
//#region src/eve.ts
|
|
423
|
+
/**
|
|
424
|
+
* Register all GitHub tools (or a preset subset) as eve dynamic capabilities.
|
|
425
|
+
*
|
|
426
|
+
* Export as the default from `agent/tools/github.ts`:
|
|
427
|
+
*
|
|
428
|
+
* ```ts
|
|
429
|
+
* import { createGithubTools } from '@github-tools/sdk/eve'
|
|
430
|
+
* export default createGithubTools({ preset: 'code-review' })
|
|
431
|
+
* ```
|
|
432
|
+
*/
|
|
433
|
+
function createGithubTools(options) {
|
|
434
|
+
return createEveGithubToolsDynamic(options ?? {});
|
|
435
|
+
}
|
|
436
|
+
function factory(name) {
|
|
437
|
+
return (options) => buildEveToolDefinition(name, options);
|
|
438
|
+
}
|
|
439
|
+
/** Get information about a GitHub repository including description, stars, forks, language, and default branch. */
|
|
440
|
+
const getRepository = factory("getRepository");
|
|
441
|
+
/** List branches in a GitHub repository. */
|
|
442
|
+
const listBranches = factory("listBranches");
|
|
443
|
+
/** Get the content of a file from a GitHub repository. */
|
|
444
|
+
const getFileContent = factory("getFileContent");
|
|
445
|
+
/** Create a new branch in a GitHub repository from an existing branch or commit SHA. Requires approval by default. */
|
|
446
|
+
const createBranch = factory("createBranch");
|
|
447
|
+
/** Fork a GitHub repository to the authenticated user account or a specified organization. Requires approval by default. */
|
|
448
|
+
const forkRepository = factory("forkRepository");
|
|
449
|
+
/** Create a new GitHub repository for the authenticated user or a specified organization. Requires approval by default. */
|
|
450
|
+
const createRepository = factory("createRepository");
|
|
451
|
+
/** Create or update a file in a GitHub repository. Provide the SHA when updating an existing file. Requires approval by default. */
|
|
452
|
+
const createOrUpdateFile = factory("createOrUpdateFile");
|
|
453
|
+
/** List pull requests for a GitHub repository. */
|
|
454
|
+
const listPullRequests = factory("listPullRequests");
|
|
455
|
+
/** Get detailed information about a specific pull request. */
|
|
456
|
+
const getPullRequest = factory("getPullRequest");
|
|
457
|
+
/** Create a new pull request in a GitHub repository. Requires approval by default. */
|
|
458
|
+
const createPullRequest = factory("createPullRequest");
|
|
459
|
+
/** Merge a pull request. Requires approval by default. */
|
|
460
|
+
const mergePullRequest = factory("mergePullRequest");
|
|
461
|
+
/** Add a comment to a pull request. Requires approval by default. */
|
|
462
|
+
const addPullRequestComment = factory("addPullRequestComment");
|
|
463
|
+
/** List files changed in a pull request, including diff status and patch content. */
|
|
464
|
+
const listPullRequestFiles = factory("listPullRequestFiles");
|
|
465
|
+
/** List reviews on a pull request (approvals, change requests, and comments). */
|
|
466
|
+
const listPullRequestReviews = factory("listPullRequestReviews");
|
|
467
|
+
/** Submit a pull request review with optional inline comments. Requires approval by default. */
|
|
468
|
+
const createPullRequestReview = factory("createPullRequestReview");
|
|
469
|
+
/** List issues for a GitHub repository (excludes pull requests). */
|
|
470
|
+
const listIssues = factory("listIssues");
|
|
471
|
+
/** Get detailed information about a specific issue. */
|
|
472
|
+
const getIssue = factory("getIssue");
|
|
473
|
+
/** Create a new issue in a GitHub repository. Requires approval by default. */
|
|
474
|
+
const createIssue = factory("createIssue");
|
|
475
|
+
/** Add a comment to a GitHub issue. Requires approval by default. */
|
|
476
|
+
const addIssueComment = factory("addIssueComment");
|
|
477
|
+
/** Close an open GitHub issue. Requires approval by default. */
|
|
478
|
+
const closeIssue = factory("closeIssue");
|
|
479
|
+
/** List labels available in a GitHub repository. */
|
|
480
|
+
const listLabels = factory("listLabels");
|
|
481
|
+
/** Add labels to an issue or pull request. Requires approval by default. */
|
|
482
|
+
const addLabels = factory("addLabels");
|
|
483
|
+
/** Remove a label from an issue or pull request. Requires approval by default. */
|
|
484
|
+
const removeLabel = factory("removeLabel");
|
|
485
|
+
/** Search for code in GitHub repositories. Use qualifiers like "repo:owner/name" to scope the search. */
|
|
486
|
+
const searchCode = factory("searchCode");
|
|
487
|
+
/** Search for GitHub repositories by keyword, topic, language, or other qualifiers. */
|
|
488
|
+
const searchRepositories = factory("searchRepositories");
|
|
489
|
+
/** List commits for a GitHub repository. Filter by file path to see commits that touched a file. */
|
|
490
|
+
const listCommits = factory("listCommits");
|
|
491
|
+
/** Get detailed information about a specific commit, including files changed with additions and deletions. */
|
|
492
|
+
const getCommit = factory("getCommit");
|
|
493
|
+
/** Line-level git blame for a file at a commit-like ref (branch, tag, or SHA). */
|
|
494
|
+
const getBlame = factory("getBlame");
|
|
495
|
+
/** List gists for the authenticated user or a specific user. */
|
|
496
|
+
const listGists = factory("listGists");
|
|
497
|
+
/** Get a gist by ID, including file contents. */
|
|
498
|
+
const getGist = factory("getGist");
|
|
499
|
+
/** List comments on a gist. */
|
|
500
|
+
const listGistComments = factory("listGistComments");
|
|
501
|
+
/** Create a new gist with one or more files. Requires approval by default. */
|
|
502
|
+
const createGist = factory("createGist");
|
|
503
|
+
/** Update an existing gist. Requires approval by default. */
|
|
504
|
+
const updateGist = factory("updateGist");
|
|
505
|
+
/** Delete a gist permanently. Requires approval by default. */
|
|
506
|
+
const deleteGist = factory("deleteGist");
|
|
507
|
+
/** Add a comment to a gist. Requires approval by default. */
|
|
508
|
+
const createGistComment = factory("createGistComment");
|
|
509
|
+
/** List GitHub Actions workflows in a repository. */
|
|
510
|
+
const listWorkflows = factory("listWorkflows");
|
|
511
|
+
/** List workflow runs for a repository, optionally filtered by workflow, branch, status, or event. */
|
|
512
|
+
const listWorkflowRuns = factory("listWorkflowRuns");
|
|
513
|
+
/** Get details of a specific workflow run including status, timing, and trigger info. */
|
|
514
|
+
const getWorkflowRun = factory("getWorkflowRun");
|
|
515
|
+
/** List jobs for a workflow run, including step-level status and timing. */
|
|
516
|
+
const listWorkflowJobs = factory("listWorkflowJobs");
|
|
517
|
+
/** Trigger a workflow via workflow_dispatch event. Requires approval by default. */
|
|
518
|
+
const triggerWorkflow = factory("triggerWorkflow");
|
|
519
|
+
/** Cancel an in-progress workflow run. Requires approval by default. */
|
|
520
|
+
const cancelWorkflowRun = factory("cancelWorkflowRun");
|
|
521
|
+
/** Re-run a workflow run, optionally only the failed jobs. Requires approval by default. */
|
|
522
|
+
const rerunWorkflowRun = factory("rerunWorkflowRun");
|
|
523
|
+
//#endregion
|
|
524
|
+
export { listLabels as A, searchCode as B, getRepository as C, listGistComments as D, listCommits as E, listWorkflowRuns as F, buildEveToolMap as G, triggerWorkflow as H, listWorkflows as I, MISSING_EVE_MESSAGE as J, createEveGithubToolsDynamic as K, mergePullRequest as L, listPullRequestReviews as M, listPullRequests as N, listGists as O, listWorkflowJobs as P, removeLabel as R, getPullRequest as S, listBranches as T, updateGist as U, searchRepositories as V, buildEveToolDefinition as W, getBlame as _, closeIssue as a, getGist as b, createGistComment as c, createOrUpdateFile as d, createPullRequest as f, forkRepository as g, deleteGist as h, cancelWorkflowRun as i, listPullRequestFiles as j, listIssues as k, createGithubTools as l, createRepository as m, addLabels as n, createBranch as o, createPullRequestReview as p, listResolvedEveToolNames as q, addPullRequestComment as r, createGist as s, addIssueComment as t, createIssue as u, getCommit as v, getWorkflowRun as w, getIssue as x, getFileContent as y, rerunWorkflowRun as z };
|
|
525
|
+
|
|
526
|
+
//# sourceMappingURL=eve-B-LChKzS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eve-B-LChKzS.mjs","names":["repository.getRepositoryDescription","repository.getRepositoryInputSchema","repository.getRepositoryCore","repository.listBranchesDescription","repository.listBranchesInputSchema","repository.listBranchesCore","repository.getFileContentDescription","repository.getFileContentInputSchema","repository.getFileContentCore","repository.createBranchDescription","repository.createBranchInputSchema","repository.createBranchCore","repository.forkRepositoryDescription","repository.forkRepositoryInputSchema","repository.forkRepositoryCore","repository.createRepositoryDescription","repository.createRepositoryInputSchema","repository.createRepositoryCore","repository.createOrUpdateFileDescription","repository.createOrUpdateFileInputSchema","repository.createOrUpdateFileCore","pullRequests.listPullRequestsDescription","pullRequests.listPullRequestsInputSchema","pullRequests.listPullRequestsCore","pullRequests.getPullRequestDescription","pullRequests.getPullRequestInputSchema","pullRequests.getPullRequestCore","pullRequests.createPullRequestDescription","pullRequests.createPullRequestInputSchema","pullRequests.createPullRequestCore","pullRequests.mergePullRequestDescription","pullRequests.mergePullRequestInputSchema","pullRequests.mergePullRequestCore","pullRequests.addPullRequestCommentDescription","pullRequests.addPullRequestCommentInputSchema","pullRequests.addPullRequestCommentCore","pullRequests.listPullRequestFilesDescription","pullRequests.listPullRequestFilesInputSchema","pullRequests.listPullRequestFilesCore","pullRequests.listPullRequestReviewsDescription","pullRequests.listPullRequestReviewsInputSchema","pullRequests.listPullRequestReviewsCore","pullRequests.createPullRequestReviewDescription","pullRequests.createPullRequestReviewInputSchema","pullRequests.createPullRequestReviewCore","issues.listIssuesDescription","issues.listIssuesInputSchema","issues.listIssuesCore","issues.getIssueDescription","issues.getIssueInputSchema","issues.getIssueCore","issues.createIssueDescription","issues.createIssueInputSchema","issues.createIssueCore","issues.addIssueCommentDescription","issues.addIssueCommentInputSchema","issues.addIssueCommentCore","issues.closeIssueDescription","issues.closeIssueInputSchema","issues.closeIssueCore","issues.listLabelsDescription","issues.listLabelsInputSchema","issues.listLabelsCore","issues.addLabelsDescription","issues.addLabelsInputSchema","issues.addLabelsCore","issues.removeLabelDescription","issues.removeLabelInputSchema","issues.removeLabelCore","search.searchCodeDescription","search.searchCodeInputSchema","search.searchCodeCore","search.searchRepositoriesDescription","search.searchRepositoriesInputSchema","search.searchRepositoriesCore","commits.listCommitsDescription","commits.listCommitsInputSchema","commits.listCommitsCore","commits.getCommitDescription","commits.getCommitInputSchema","commits.getCommitCore","commits.getBlameDescription","commits.getBlameInputSchema","commits.getBlameCore","gists.listGistsDescription","gists.listGistsInputSchema","gists.listGistsCore","gists.getGistDescription","gists.getGistInputSchema","gists.getGistCore","gists.listGistCommentsDescription","gists.listGistCommentsInputSchema","gists.listGistCommentsCore","gists.createGistDescription","gists.createGistInputSchema","gists.createGistCore","gists.updateGistDescription","gists.updateGistInputSchema","gists.updateGistCore","gists.deleteGistDescription","gists.deleteGistInputSchema","gists.deleteGistCore","gists.createGistCommentDescription","gists.createGistCommentInputSchema","gists.createGistCommentCore","workflows.listWorkflowsDescription","workflows.listWorkflowsInputSchema","workflows.listWorkflowsCore","workflows.listWorkflowRunsDescription","workflows.listWorkflowRunsInputSchema","workflows.listWorkflowRunsCore","workflows.getWorkflowRunDescription","workflows.getWorkflowRunInputSchema","workflows.getWorkflowRunCore","workflows.listWorkflowJobsDescription","workflows.listWorkflowJobsInputSchema","workflows.listWorkflowJobsCore","workflows.triggerWorkflowDescription","workflows.triggerWorkflowInputSchema","workflows.triggerWorkflowCore","workflows.cancelWorkflowRunDescription","workflows.cancelWorkflowRunInputSchema","workflows.cancelWorkflowRunCore","workflows.rerunWorkflowRunDescription","workflows.rerunWorkflowRunInputSchema","workflows.rerunWorkflowRunCore"],"sources":["../src/eve/load-eve.ts","../src/eve/approval.ts","../src/eve/registry.ts","../src/eve/steps.ts","../src/eve/build.ts","../src/eve.ts"],"sourcesContent":["import { createRequire } from 'node:module'\n\nconst require = createRequire(import.meta.url)\n\nconst MISSING_EVE_MESSAGE =\n 'The \"eve\" package is required to use @github-tools/sdk/eve. Install it with: pnpm add eve'\n\nexport type EveToolsModule = typeof import('eve/tools')\nexport type EveApprovalModule = typeof import('eve/tools/approval')\n\nlet eveToolsModule: EveToolsModule | undefined\nlet eveApprovalModule: EveApprovalModule | undefined\n\nexport function getEveTools(): EveToolsModule {\n if (eveToolsModule) return eveToolsModule\n try {\n eveToolsModule = require('eve/tools') as EveToolsModule\n return eveToolsModule\n } catch {\n throw new Error(MISSING_EVE_MESSAGE)\n }\n}\n\nexport function getEveApprovalHelpers(): EveApprovalModule {\n if (eveApprovalModule) return eveApprovalModule\n try {\n eveApprovalModule = require('eve/tools/approval') as EveApprovalModule\n return eveApprovalModule\n } catch {\n throw new Error(MISSING_EVE_MESSAGE)\n }\n}\n\nexport { MISSING_EVE_MESSAGE }\n","import type { Approval } from 'eve/tools'\nimport type { GithubWriteToolName } from '../core/write-tools'\nimport { getEveApprovalHelpers } from './load-eve'\nimport type { EveApprovalConfig, EveApprovalValue } from './types'\n\nexport function mapEveApprovalValue(value: EveApprovalValue): Approval {\n if (typeof value === 'function') return value\n\n const { always, never, once } = getEveApprovalHelpers()\n\n if (value === true || value === 'always') return always()\n if (value === false || value === 'never') return never()\n if (value === 'once') return once()\n\n return always()\n}\n\nexport function resolveEveApproval(\n toolName: GithubWriteToolName,\n config: EveApprovalConfig | undefined,\n): Approval | undefined {\n if (config === undefined) return getEveApprovalHelpers().always()\n if (config === true) return getEveApprovalHelpers().always()\n if (config === false) return getEveApprovalHelpers().never()\n\n const value = config[toolName]\n if (value === undefined) return getEveApprovalHelpers().always()\n\n return mapEveApprovalValue(value)\n}\n","import type { ToolModelOutput } from 'eve/tools'\nimport type { z } from 'zod'\nimport type { CommitIdentity } from '../types'\nimport * as commits from '../core/commits'\nimport * as gists from '../core/gists'\nimport * as issues from '../core/issues'\nimport {\n getCommitToModelOutput,\n getFileContentToModelOutput,\n listPullRequestFilesToModelOutput,\n} from '../core/model-output'\nimport * as pullRequests from '../core/pull-requests'\nimport * as repository from '../core/repository'\nimport * as search from '../core/search'\nimport * as workflows from '../core/workflows'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { GithubWriteToolName } from '../core/write-tools'\nimport type { GithubToolName } from '../core/tool-names'\nexport type { GithubToolName } from '../core/tool-names'\nexport { ALL_GITHUB_TOOL_NAMES } from '../core/tool-names'\n\nexport type ToolBuildContext = {\n token: GithubTokenInput\n author?: CommitIdentity\n committer?: CommitIdentity\n coAuthors?: CommitIdentity[]\n}\n\ntype ToolRegistryEntry = {\n name: GithubToolName\n writeTool?: GithubWriteToolName\n description: string\n inputSchema: z.ZodType\n execute: (args: Record<string, unknown>) => Promise<unknown>\n toModelOutput?: (output: unknown) => ToolModelOutput\n}\n\nfunction withToken<T extends Record<string, unknown>>(\n core: (args: T & { token: string }) => Promise<unknown>,\n ctx: ToolBuildContext,\n extra?: Record<string, unknown>,\n) {\n return async (input: Record<string, unknown>) => core({ token: await resolveGithubToken(ctx.token), ...extra, ...input } as T & { token: string })\n}\n\nfunction modelOutputAdapter(\n fn: (options: { toolCallId: string, input: unknown, output: unknown }) => { type: 'json' | 'text', value: unknown },\n) {\n return (output: unknown) => fn({ toolCallId: '', input: {}, output }) as ToolModelOutput\n}\n\nexport function createToolRegistry(ctx: ToolBuildContext): ToolRegistryEntry[] {\n return [\n {\n name: 'getRepository',\n description: repository.getRepositoryDescription,\n inputSchema: repository.getRepositoryInputSchema,\n execute: withToken(repository.getRepositoryCore, ctx),\n },\n {\n name: 'listBranches',\n description: repository.listBranchesDescription,\n inputSchema: repository.listBranchesInputSchema,\n execute: withToken(repository.listBranchesCore, ctx),\n },\n {\n name: 'getFileContent',\n description: repository.getFileContentDescription,\n inputSchema: repository.getFileContentInputSchema,\n execute: withToken(repository.getFileContentCore, ctx),\n toModelOutput: modelOutputAdapter(getFileContentToModelOutput),\n },\n {\n name: 'createBranch',\n writeTool: 'createBranch',\n description: repository.createBranchDescription,\n inputSchema: repository.createBranchInputSchema,\n execute: withToken(repository.createBranchCore, ctx),\n },\n {\n name: 'forkRepository',\n writeTool: 'forkRepository',\n description: repository.forkRepositoryDescription,\n inputSchema: repository.forkRepositoryInputSchema,\n execute: withToken(repository.forkRepositoryCore, ctx),\n },\n {\n name: 'createRepository',\n writeTool: 'createRepository',\n description: repository.createRepositoryDescription,\n inputSchema: repository.createRepositoryInputSchema,\n execute: withToken(repository.createRepositoryCore, ctx),\n },\n {\n name: 'createOrUpdateFile',\n writeTool: 'createOrUpdateFile',\n description: repository.createOrUpdateFileDescription,\n inputSchema: repository.createOrUpdateFileInputSchema,\n execute: withToken(repository.createOrUpdateFileCore, ctx, {\n author: ctx.author,\n committer: ctx.committer,\n coAuthors: ctx.coAuthors,\n }),\n },\n {\n name: 'listPullRequests',\n description: pullRequests.listPullRequestsDescription,\n inputSchema: pullRequests.listPullRequestsInputSchema,\n execute: withToken(pullRequests.listPullRequestsCore, ctx),\n },\n {\n name: 'getPullRequest',\n description: pullRequests.getPullRequestDescription,\n inputSchema: pullRequests.getPullRequestInputSchema,\n execute: withToken(pullRequests.getPullRequestCore, ctx),\n },\n {\n name: 'createPullRequest',\n writeTool: 'createPullRequest',\n description: pullRequests.createPullRequestDescription,\n inputSchema: pullRequests.createPullRequestInputSchema,\n execute: withToken(pullRequests.createPullRequestCore, ctx),\n },\n {\n name: 'mergePullRequest',\n writeTool: 'mergePullRequest',\n description: pullRequests.mergePullRequestDescription,\n inputSchema: pullRequests.mergePullRequestInputSchema,\n execute: withToken(pullRequests.mergePullRequestCore, ctx, { coAuthors: ctx.coAuthors }),\n },\n {\n name: 'addPullRequestComment',\n writeTool: 'addPullRequestComment',\n description: pullRequests.addPullRequestCommentDescription,\n inputSchema: pullRequests.addPullRequestCommentInputSchema,\n execute: withToken(pullRequests.addPullRequestCommentCore, ctx),\n },\n {\n name: 'listPullRequestFiles',\n description: pullRequests.listPullRequestFilesDescription,\n inputSchema: pullRequests.listPullRequestFilesInputSchema,\n execute: withToken(pullRequests.listPullRequestFilesCore, ctx),\n toModelOutput: modelOutputAdapter(listPullRequestFilesToModelOutput),\n },\n {\n name: 'listPullRequestReviews',\n description: pullRequests.listPullRequestReviewsDescription,\n inputSchema: pullRequests.listPullRequestReviewsInputSchema,\n execute: withToken(pullRequests.listPullRequestReviewsCore, ctx),\n },\n {\n name: 'createPullRequestReview',\n writeTool: 'createPullRequestReview',\n description: pullRequests.createPullRequestReviewDescription,\n inputSchema: pullRequests.createPullRequestReviewInputSchema,\n execute: withToken(pullRequests.createPullRequestReviewCore, ctx),\n },\n {\n name: 'listIssues',\n description: issues.listIssuesDescription,\n inputSchema: issues.listIssuesInputSchema,\n execute: withToken(issues.listIssuesCore, ctx),\n },\n {\n name: 'getIssue',\n description: issues.getIssueDescription,\n inputSchema: issues.getIssueInputSchema,\n execute: withToken(issues.getIssueCore, ctx),\n },\n {\n name: 'createIssue',\n writeTool: 'createIssue',\n description: issues.createIssueDescription,\n inputSchema: issues.createIssueInputSchema,\n execute: withToken(issues.createIssueCore, ctx),\n },\n {\n name: 'addIssueComment',\n writeTool: 'addIssueComment',\n description: issues.addIssueCommentDescription,\n inputSchema: issues.addIssueCommentInputSchema,\n execute: withToken(issues.addIssueCommentCore, ctx),\n },\n {\n name: 'closeIssue',\n writeTool: 'closeIssue',\n description: issues.closeIssueDescription,\n inputSchema: issues.closeIssueInputSchema,\n execute: withToken(issues.closeIssueCore, ctx),\n },\n {\n name: 'listLabels',\n description: issues.listLabelsDescription,\n inputSchema: issues.listLabelsInputSchema,\n execute: withToken(issues.listLabelsCore, ctx),\n },\n {\n name: 'addLabels',\n writeTool: 'addLabels',\n description: issues.addLabelsDescription,\n inputSchema: issues.addLabelsInputSchema,\n execute: withToken(issues.addLabelsCore, ctx),\n },\n {\n name: 'removeLabel',\n writeTool: 'removeLabel',\n description: issues.removeLabelDescription,\n inputSchema: issues.removeLabelInputSchema,\n execute: withToken(issues.removeLabelCore, ctx),\n },\n {\n name: 'searchCode',\n description: search.searchCodeDescription,\n inputSchema: search.searchCodeInputSchema,\n execute: withToken(search.searchCodeCore, ctx),\n },\n {\n name: 'searchRepositories',\n description: search.searchRepositoriesDescription,\n inputSchema: search.searchRepositoriesInputSchema,\n execute: withToken(search.searchRepositoriesCore, ctx),\n },\n {\n name: 'listCommits',\n description: commits.listCommitsDescription,\n inputSchema: commits.listCommitsInputSchema,\n execute: withToken(commits.listCommitsCore, ctx),\n },\n {\n name: 'getCommit',\n description: commits.getCommitDescription,\n inputSchema: commits.getCommitInputSchema,\n execute: withToken(commits.getCommitCore, ctx),\n toModelOutput: modelOutputAdapter(getCommitToModelOutput),\n },\n {\n name: 'getBlame',\n description: commits.getBlameDescription,\n inputSchema: commits.getBlameInputSchema,\n execute: withToken(commits.getBlameCore, ctx),\n },\n {\n name: 'listGists',\n description: gists.listGistsDescription,\n inputSchema: gists.listGistsInputSchema,\n execute: withToken(gists.listGistsCore, ctx),\n },\n {\n name: 'getGist',\n description: gists.getGistDescription,\n inputSchema: gists.getGistInputSchema,\n execute: withToken(gists.getGistCore, ctx),\n },\n {\n name: 'listGistComments',\n description: gists.listGistCommentsDescription,\n inputSchema: gists.listGistCommentsInputSchema,\n execute: withToken(gists.listGistCommentsCore, ctx),\n },\n {\n name: 'createGist',\n writeTool: 'createGist',\n description: gists.createGistDescription,\n inputSchema: gists.createGistInputSchema,\n execute: withToken(gists.createGistCore, ctx),\n },\n {\n name: 'updateGist',\n writeTool: 'updateGist',\n description: gists.updateGistDescription,\n inputSchema: gists.updateGistInputSchema,\n execute: withToken(gists.updateGistCore, ctx),\n },\n {\n name: 'deleteGist',\n writeTool: 'deleteGist',\n description: gists.deleteGistDescription,\n inputSchema: gists.deleteGistInputSchema,\n execute: withToken(gists.deleteGistCore, ctx),\n },\n {\n name: 'createGistComment',\n writeTool: 'createGistComment',\n description: gists.createGistCommentDescription,\n inputSchema: gists.createGistCommentInputSchema,\n execute: withToken(gists.createGistCommentCore, ctx),\n },\n {\n name: 'listWorkflows',\n description: workflows.listWorkflowsDescription,\n inputSchema: workflows.listWorkflowsInputSchema,\n execute: withToken(workflows.listWorkflowsCore, ctx),\n },\n {\n name: 'listWorkflowRuns',\n description: workflows.listWorkflowRunsDescription,\n inputSchema: workflows.listWorkflowRunsInputSchema,\n execute: withToken(workflows.listWorkflowRunsCore, ctx),\n },\n {\n name: 'getWorkflowRun',\n description: workflows.getWorkflowRunDescription,\n inputSchema: workflows.getWorkflowRunInputSchema,\n execute: withToken(workflows.getWorkflowRunCore, ctx),\n },\n {\n name: 'listWorkflowJobs',\n description: workflows.listWorkflowJobsDescription,\n inputSchema: workflows.listWorkflowJobsInputSchema,\n execute: withToken(workflows.listWorkflowJobsCore, ctx),\n },\n {\n name: 'triggerWorkflow',\n writeTool: 'triggerWorkflow',\n description: workflows.triggerWorkflowDescription,\n inputSchema: workflows.triggerWorkflowInputSchema,\n execute: withToken(workflows.triggerWorkflowCore, ctx),\n },\n {\n name: 'cancelWorkflowRun',\n writeTool: 'cancelWorkflowRun',\n description: workflows.cancelWorkflowRunDescription,\n inputSchema: workflows.cancelWorkflowRunInputSchema,\n execute: withToken(workflows.cancelWorkflowRunCore, ctx),\n },\n {\n name: 'rerunWorkflowRun',\n writeTool: 'rerunWorkflowRun',\n description: workflows.rerunWorkflowRunDescription,\n inputSchema: workflows.rerunWorkflowRunInputSchema,\n execute: withToken(workflows.rerunWorkflowRunCore, ctx),\n },\n ]\n}\n","import { resolveGithubToken } from '../core/token'\nimport { createToolRegistry, type GithubToolName, type ToolBuildContext } from './registry'\n\nasync function executeGithubToolStep(\n name: GithubToolName,\n input: Record<string, unknown>,\n ctx: ToolBuildContext,\n) {\n 'use step'\n const entry = createToolRegistry(ctx).find(tool => tool.name === name)\n if (!entry) {\n throw new Error(`Unknown GitHub tool: ${name}`)\n }\n return entry.execute(input)\n}\n\nexport async function runGithubToolStep(\n name: GithubToolName,\n input: Record<string, unknown>,\n ctx: ToolBuildContext,\n) {\n // Resolve the token before entering the step so only a serializable string crosses the boundary.\n const token = await resolveGithubToken(ctx.token)\n return executeGithubToolStep(name, input, { ...ctx, token })\n}\n","import type { ToolDefinition } from 'eve/tools'\nimport { resolvePresetTools, type CombinedPresetToolNames, type GithubToolPreset, type PresetToolName } from '../core/presets'\nimport { createGithubTokenResolver } from '../core/token'\nimport { mapEveApprovalValue, resolveEveApproval } from './approval'\nimport { getEveTools } from './load-eve'\nimport { ALL_GITHUB_TOOL_NAMES, createToolRegistry, type GithubToolName, type ToolBuildContext } from './registry'\nimport { runGithubToolStep } from './steps'\nimport type { EveGithubToolsOptions, EveToolFactoryOptions, EveToolOverrides } from './types'\n\ntype BuildOptions = EveGithubToolsOptions | (EveToolFactoryOptions & { preset?: EveGithubToolsOptions['preset'] })\ntype EveToolMap = Partial<Record<GithubToolName, ToolDefinition>>\n\nfunction applyOverrides<T extends ToolDefinition>(\n tool: T,\n name: GithubToolName,\n overrides?: EveToolOverrides,\n): T {\n const override = overrides?.[name]\n if (!override) return tool\n return {\n ...tool,\n ...override.description !== undefined && { description: override.description },\n ...override.approval !== undefined && { approval: mapEveApprovalValue(override.approval) },\n ...override.toModelOutput !== undefined && { toModelOutput: override.toModelOutput },\n ...override.outputSchema !== undefined && { outputSchema: override.outputSchema },\n }\n}\n\nexport function buildEveToolDefinition(\n name: GithubToolName,\n options: BuildOptions = {},\n): ToolDefinition {\n const { defineTool } = getEveTools()\n const ctx: ToolBuildContext = {\n token: createGithubTokenResolver(options.token),\n author: options.author,\n committer: options.committer,\n coAuthors: options.coAuthors,\n }\n\n const entry = createToolRegistry(ctx).find(tool => tool.name === name)\n if (!entry) {\n throw new Error(`Unknown GitHub tool: ${name}`)\n }\n\n const tool = defineTool({\n description: entry.description,\n inputSchema: entry.inputSchema,\n ...(entry.writeTool && {\n approval: resolveEveApproval(entry.writeTool, options.requireApproval),\n }),\n ...(entry.toModelOutput && { toModelOutput: entry.toModelOutput }),\n execute: async (input) => runGithubToolStep(name, input as Record<string, unknown>, ctx),\n })\n\n return applyOverrides(tool, name, options.overrides)\n}\n\nexport function buildEveToolMap(options: EveGithubToolsOptions = {}): EveToolMap {\n const { defineTool } = getEveTools()\n const ctx: ToolBuildContext = {\n token: createGithubTokenResolver(options.token),\n author: options.author,\n committer: options.committer,\n coAuthors: options.coAuthors,\n }\n\n const allowed = options.preset ? resolvePresetTools(options.preset) : null\n const registry = createToolRegistry(ctx)\n const tools = {} as EveToolMap\n\n for (const entry of registry) {\n if (allowed && !allowed.has(entry.name)) continue\n\n const tool = defineTool({\n description: entry.description,\n inputSchema: entry.inputSchema,\n ...(entry.writeTool && {\n approval: resolveEveApproval(entry.writeTool, options.requireApproval),\n }),\n ...(entry.toModelOutput && { toModelOutput: entry.toModelOutput }),\n execute: async (input) => runGithubToolStep(entry.name, input as Record<string, unknown>, ctx),\n })\n\n tools[entry.name] = applyOverrides(tool, entry.name, options.overrides)\n }\n\n return tools\n}\n\nexport function createEveGithubToolsDynamic(options: EveGithubToolsOptions = {}) {\n const { defineDynamic } = getEveTools()\n\n // TODO(eve-auth): resolve token from ctx.getToken('github') when eve-managed auth lands.\n return defineDynamic({\n events: {\n 'session.started': async () => buildEveToolMap(options),\n },\n })\n}\n\nexport function listResolvedEveToolNames(options?: { preset?: undefined }): GithubToolName[]\nexport function listResolvedEveToolNames<P extends GithubToolPreset>(options: { preset: P }): PresetToolName<P>[]\nexport function listResolvedEveToolNames<P extends readonly GithubToolPreset[]>(options: { preset: P }): CombinedPresetToolNames<P>[]\nexport function listResolvedEveToolNames(options: Pick<EveGithubToolsOptions, 'preset'> = {}): GithubToolName[] {\n if (!options.preset) return [...ALL_GITHUB_TOOL_NAMES]\n return ALL_GITHUB_TOOL_NAMES.filter(name => resolvePresetTools(options.preset!)!.has(name))\n}\n","import { buildEveToolDefinition, createEveGithubToolsDynamic } from './eve/build'\nimport type { EveToolFactoryOptions } from './eve/types'\n\nexport { buildEveToolDefinition, buildEveToolMap, createEveGithubToolsDynamic, listResolvedEveToolNames } from './eve/build'\nexport type { EveApprovalConfig, EveApprovalValue, EveGithubToolsOptions, EveToolFactoryOptions, EveToolOverrides } from './eve/types'\nexport type { GithubToolPreset, PresetToolName, CombinedPresetToolNames } from './core/presets'\nexport type { GithubToolName } from './core/tool-names'\nexport type { GithubWriteToolName } from './core/write-tools'\nexport type { AllGithubTools, GithubToolsForPreset, PickGithubTools } from './core/tool-types'\nexport type { CommitIdentity } from './types'\nexport { PRESET_TOOLS } from './core/presets'\nexport { GITHUB_TOOL_NAMES } from './core/tool-names'\nexport { GITHUB_WRITE_TOOLS } from './core/write-tools'\nexport { MISSING_EVE_MESSAGE } from './eve/load-eve'\n\n/**\n * Register all GitHub tools (or a preset subset) as eve dynamic capabilities.\n *\n * Export as the default from `agent/tools/github.ts`:\n *\n * ```ts\n * import { createGithubTools } from '@github-tools/sdk/eve'\n * export default createGithubTools({ preset: 'code-review' })\n * ```\n */\nexport function createGithubTools(options?: import('./eve/types').EveGithubToolsOptions) {\n return createEveGithubToolsDynamic(options ?? {})\n}\n\nfunction factory(name: Parameters<typeof buildEveToolDefinition>[0]) {\n return (options?: EveToolFactoryOptions) => buildEveToolDefinition(name, options)\n}\n\n/** Get information about a GitHub repository including description, stars, forks, language, and default branch. */\nexport const getRepository = factory('getRepository')\n/** List branches in a GitHub repository. */\nexport const listBranches = factory('listBranches')\n/** Get the content of a file from a GitHub repository. */\nexport const getFileContent = factory('getFileContent')\n/** Create a new branch in a GitHub repository from an existing branch or commit SHA. Requires approval by default. */\nexport const createBranch = factory('createBranch')\n/** Fork a GitHub repository to the authenticated user account or a specified organization. Requires approval by default. */\nexport const forkRepository = factory('forkRepository')\n/** Create a new GitHub repository for the authenticated user or a specified organization. Requires approval by default. */\nexport const createRepository = factory('createRepository')\n/** Create or update a file in a GitHub repository. Provide the SHA when updating an existing file. Requires approval by default. */\nexport const createOrUpdateFile = factory('createOrUpdateFile')\n/** List pull requests for a GitHub repository. */\nexport const listPullRequests = factory('listPullRequests')\n/** Get detailed information about a specific pull request. */\nexport const getPullRequest = factory('getPullRequest')\n/** Create a new pull request in a GitHub repository. Requires approval by default. */\nexport const createPullRequest = factory('createPullRequest')\n/** Merge a pull request. Requires approval by default. */\nexport const mergePullRequest = factory('mergePullRequest')\n/** Add a comment to a pull request. Requires approval by default. */\nexport const addPullRequestComment = factory('addPullRequestComment')\n/** List files changed in a pull request, including diff status and patch content. */\nexport const listPullRequestFiles = factory('listPullRequestFiles')\n/** List reviews on a pull request (approvals, change requests, and comments). */\nexport const listPullRequestReviews = factory('listPullRequestReviews')\n/** Submit a pull request review with optional inline comments. Requires approval by default. */\nexport const createPullRequestReview = factory('createPullRequestReview')\n/** List issues for a GitHub repository (excludes pull requests). */\nexport const listIssues = factory('listIssues')\n/** Get detailed information about a specific issue. */\nexport const getIssue = factory('getIssue')\n/** Create a new issue in a GitHub repository. Requires approval by default. */\nexport const createIssue = factory('createIssue')\n/** Add a comment to a GitHub issue. Requires approval by default. */\nexport const addIssueComment = factory('addIssueComment')\n/** Close an open GitHub issue. Requires approval by default. */\nexport const closeIssue = factory('closeIssue')\n/** List labels available in a GitHub repository. */\nexport const listLabels = factory('listLabels')\n/** Add labels to an issue or pull request. Requires approval by default. */\nexport const addLabels = factory('addLabels')\n/** Remove a label from an issue or pull request. Requires approval by default. */\nexport const removeLabel = factory('removeLabel')\n/** Search for code in GitHub repositories. Use qualifiers like \"repo:owner/name\" to scope the search. */\nexport const searchCode = factory('searchCode')\n/** Search for GitHub repositories by keyword, topic, language, or other qualifiers. */\nexport const searchRepositories = factory('searchRepositories')\n/** List commits for a GitHub repository. Filter by file path to see commits that touched a file. */\nexport const listCommits = factory('listCommits')\n/** Get detailed information about a specific commit, including files changed with additions and deletions. */\nexport const getCommit = factory('getCommit')\n/** Line-level git blame for a file at a commit-like ref (branch, tag, or SHA). */\nexport const getBlame = factory('getBlame')\n/** List gists for the authenticated user or a specific user. */\nexport const listGists = factory('listGists')\n/** Get a gist by ID, including file contents. */\nexport const getGist = factory('getGist')\n/** List comments on a gist. */\nexport const listGistComments = factory('listGistComments')\n/** Create a new gist with one or more files. Requires approval by default. */\nexport const createGist = factory('createGist')\n/** Update an existing gist. Requires approval by default. */\nexport const updateGist = factory('updateGist')\n/** Delete a gist permanently. Requires approval by default. */\nexport const deleteGist = factory('deleteGist')\n/** Add a comment to a gist. Requires approval by default. */\nexport const createGistComment = factory('createGistComment')\n/** List GitHub Actions workflows in a repository. */\nexport const listWorkflows = factory('listWorkflows')\n/** List workflow runs for a repository, optionally filtered by workflow, branch, status, or event. */\nexport const listWorkflowRuns = factory('listWorkflowRuns')\n/** Get details of a specific workflow run including status, timing, and trigger info. */\nexport const getWorkflowRun = factory('getWorkflowRun')\n/** List jobs for a workflow run, including step-level status and timing. */\nexport const listWorkflowJobs = factory('listWorkflowJobs')\n/** Trigger a workflow via workflow_dispatch event. Requires approval by default. */\nexport const triggerWorkflow = factory('triggerWorkflow')\n/** Cancel an in-progress workflow run. Requires approval by default. */\nexport const cancelWorkflowRun = factory('cancelWorkflowRun')\n/** Re-run a workflow run, optionally only the failed jobs. Requires approval by default. */\n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