@github-tools/sdk 1.9.0 → 1.11.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 +86 -27
- package/dist/connect/eve.d.mts +16 -10
- package/dist/connect/eve.d.mts.map +1 -1
- package/dist/connect/eve.mjs +21 -11
- package/dist/connect/eve.mjs.map +1 -1
- package/dist/connect.d.mts +123 -10
- package/dist/connect.d.mts.map +1 -1
- package/dist/connect.mjs +3 -3
- package/dist/eve-runtime-BqfQZAP7.d.mts +54 -0
- package/dist/eve-runtime-BqfQZAP7.d.mts.map +1 -0
- package/dist/eve-runtime-DXZgfCMb.mjs +701 -0
- package/dist/eve-runtime-DXZgfCMb.mjs.map +1 -0
- package/dist/eve-runtime.d.mts +4 -0
- package/dist/eve-runtime.mjs +3 -0
- package/dist/eve.d.mts +33 -34
- package/dist/eve.d.mts.map +1 -1
- package/dist/eve.mjs +384 -3
- package/dist/eve.mjs.map +1 -0
- package/dist/{index-CtID5dUi.d.mts → index-BNeMjmgp.d.mts} +183 -19
- package/dist/index-BNeMjmgp.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/{src-D6vC3V8r.mjs → src-jQWS2Txw.mjs} +414 -68
- package/dist/src-jQWS2Txw.mjs.map +1 -0
- package/dist/token-OPdZa0t3.mjs +390 -0
- package/dist/token-OPdZa0t3.mjs.map +1 -0
- package/dist/{types-BVLof-5R.d.mts → types-BD5YvGxm.d.mts} +7 -3
- package/dist/types-BD5YvGxm.d.mts.map +1 -0
- package/dist/{types-BOnJ0Rou.d.mts → types-BDO-Mmn6.d.mts} +4 -3
- package/dist/types-BDO-Mmn6.d.mts.map +1 -0
- package/dist/workflow.d.mts +1 -1
- package/dist/workflow.mjs +2 -2
- package/dist/{write-tools-cg_ialNd.mjs → write-tools-Dk32V9Hl.mjs} +885 -26
- package/dist/write-tools-Dk32V9Hl.mjs.map +1 -0
- package/package.json +5 -1
- package/dist/eve-DmiXBuli.mjs +0 -864
- package/dist/eve-DmiXBuli.mjs.map +0 -1
- package/dist/index-CtID5dUi.d.mts.map +0 -1
- package/dist/src-D6vC3V8r.mjs.map +0 -1
- package/dist/token-sbepWIkd.mjs +0 -138
- package/dist/token-sbepWIkd.mjs.map +0 -1
- package/dist/types-BOnJ0Rou.d.mts.map +0 -1
- package/dist/types-BVLof-5R.d.mts.map +0 -1
- package/dist/write-tools-cg_ialNd.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as listWorkflowJobsDescription, $n as getIssueDescription, $r as requestReviewersDescription, $t as searchRepositoriesDescription, A as getLatestReleaseInputSchema, Ai as getRepositoryDescription, An as addAssigneesInputSchema, Ar as createPullRequestInputSchema, At as listGistsInputSchema, B as getCombinedStatusCore, Bn as createIssueCore, Br as listPullRequestFilesCore, Bt as getCommitCore, C as createReleaseDescription, Ci as forkRepositoryCore, Cn as listCommentReactionsDescription, Cr as updateLabelDescription, Ct as getGistDescription, D as deleteReleaseInputSchema, Di as getFileContentDescription, Dn as listIssueReactionsInputSchema, Dr as addPullRequestCommentInputSchema, Dt as listGistCommentsInputSchema, E as deleteReleaseDescription, Ei as getFileContentCore, En as listIssueReactionsDescription, Er as addPullRequestCommentDescription, Et as listGistCommentsDescription, F as listReleasesDescription, Fi as listBranchesCore, Fn as addLabelsDescription, Fr as deletePullRequestCommentDescription, Ft as compareCommitsDescription, G as listCheckRunsInputSchema, Gn as createLabelInputSchema, Gr as listPullRequestReviewsInputSchema, Gt as listCommitsInputSchema, H as getCombinedStatusInputSchema, Hn as createIssueInputSchema, Hr as listPullRequestFilesInputSchema, Ht as getCommitInputSchema, I as listReleasesInputSchema, Ii as listBranchesDescription, In as addLabelsInputSchema, Ir as deletePullRequestCommentInputSchema, It as compareCommitsInputSchema, J as cancelWorkflowRunInputSchema, Jn as deleteIssueCommentInputSchema, Jr as listPullRequestsInputSchema, Jt as searchCodeInputSchema, K as cancelWorkflowRunCore, Kn as deleteIssueCommentCore, Kr as listPullRequestsCore, Kt as searchCodeCore, L as updateReleaseCore, Li as listBranchesInputSchema, Ln as closeIssueCore, Lr as getPullRequestCore, Lt as getBlameCore, M as getReleaseDescription, Mi as getRepositoryTreeCore, Mn as addIssueCommentDescription, Mr as createPullRequestReviewDescription, Mt as updateGistDescription, N as getReleaseInputSchema, Ni as getRepositoryTreeDescription, Nn as addIssueCommentInputSchema, Nr as createPullRequestReviewInputSchema, Nt as updateGistInputSchema, O as getLatestReleaseCore, Oi as getFileContentInputSchema, On as addAssigneesCore, Or as createPullRequestCore, Ot as listGistsCore, P as listReleasesCore, Pi as getRepositoryTreeInputSchema, Pn as addLabelsCore, Pr as deletePullRequestCommentCore, Pt as compareCommitsCore, Q as listWorkflowJobsCore, Qn as getIssueCore, Qr as requestReviewersCore, Qt as searchRepositoriesCore, R as updateReleaseDescription, Rn as closeIssueDescription, Rr as getPullRequestDescription, Rt as getBlameDescription, S as createReleaseCore, Si as createRepositoryInputSchema, Sn as listCommentReactionsCore, Sr as updateLabelCore, St as getGistCore, T as deleteReleaseCore, Ti as forkRepositoryInputSchema, Tn as listIssueReactionsCore, Tr as addPullRequestCommentCore, Tt as listGistCommentsCore, U as listCheckRunsCore, Un as createLabelCore, Ur as listPullRequestReviewsCore, Ut as listCommitsCore, V as getCombinedStatusDescription, Vn as createIssueDescription, Vr as listPullRequestFilesDescription, Vt as getCommitDescription, W as listCheckRunsDescription, Wn as createLabelDescription, Wr as listPullRequestReviewsDescription, Wt as listCommitsDescription, X as getWorkflowRunDescription, Xn as deleteLabelDescription, Xr as mergePullRequestDescription, Xt as searchIssuesDescription, Y as getWorkflowRunCore, Yn as deleteLabelCore, Yr as mergePullRequestCore, Yt as searchIssuesCore, Z as getWorkflowRunInputSchema, Zn as deleteLabelInputSchema, Zr as mergePullRequestInputSchema, Zt as searchIssuesInputSchema, _ as getPullRequestContextDescription, _i as createOrUpdateFileCore, _n as addCommentReactionDescription, _r as updateIssueCommentDescription, _t as createGistDescription, a as resolvePresetTools, ai as updatePullRequestDescription, an as markNotificationReadDescription, ar as listIssuesDescription, at as listWorkflowsDescription, b as getReleaseContextDescription, bi as createRepositoryCore, bn as addIssueReactionDescription, br as updateIssueDescription, bt as deleteGistDescription, ci as resolveGithubToken, cn as addDiscussionCommentDescription, cr as listLabelsDescription, ct as rerunWorkflowRunDescription, d as getCiFailureContextDescription, di as getFileContentToModelOutput, dn as getDiscussionDescription, dr as removeAssigneesDescription, dt as triggerWorkflowDescription, ei as requestReviewersInputSchema, en as searchRepositoriesInputSchema, er as getIssueInputSchema, et as listWorkflowJobsInputSchema, f as getCiFailureContextInputSchema, fi as getPullRequestContextToModelOutput, fn as getDiscussionInputSchema, fr as removeAssigneesInputSchema, ft as triggerWorkflowInputSchema, g as getPullRequestContextCore, gi as createBranchInputSchema, gn as addCommentReactionCore, gr as updateIssueCommentCore, gt as createGistCore, h as getIssueContextInputSchema, hi as createBranchDescription, hn as listDiscussionsInputSchema, hr as removeLabelInputSchema, ht as createGistCommentInputSchema, ii as updatePullRequestCore, in as markNotificationReadCore, ir as listIssuesCore, it as listWorkflowsCore, j as getReleaseCore, ji as getRepositoryInputSchema, jn as addIssueCommentCore, jr as createPullRequestReviewCore, jt as updateGistCore, k as getLatestReleaseDescription, ki as getRepositoryCore, kn as addAssigneesDescription, kr as createPullRequestDescription, kt as listGistsDescription, li as compareCommitsToModelOutput, ln as addDiscussionCommentInputSchema, lr as listLabelsInputSchema, lt as rerunWorkflowRunInputSchema, m as getIssueContextDescription, mi as createBranchCore, mn as listDiscussionsDescription, mr as removeLabelDescription, mt as createGistCommentDescription, ni as updatePullRequestCommentDescription, nn as listNotificationsDescription, nr as listIssueCommentsDescription, nt as listWorkflowRunsDescription, o as bindToolsContext, oi as updatePullRequestInputSchema, on as markNotificationReadInputSchema, or as listIssuesInputSchema, ot as listWorkflowsInputSchema, p as getIssueContextCore, pi as listPullRequestFilesToModelOutput, pn as listDiscussionsCore, pr as removeLabelCore, pt as createGistCommentCore, q as cancelWorkflowRunDescription, qn as deleteIssueCommentDescription, qr as listPullRequestsDescription, qt as searchCodeDescription, ri as updatePullRequestCommentInputSchema, rn as listNotificationsInputSchema, rr as listIssueCommentsInputSchema, rt as listWorkflowRunsInputSchema, s as formatContextInstructions, si as createGithubTokenResolver, sn as addDiscussionCommentCore, sr as listLabelsCore, st as rerunWorkflowRunCore, ti as updatePullRequestCommentCore, tn as listNotificationsCore, tr as listIssueCommentsCore, tt as listWorkflowRunsCore, u as getCiFailureContextCore, ui as getCommitToModelOutput, un as getDiscussionCore, ur as removeAssigneesCore, ut as triggerWorkflowCore, v as getPullRequestContextInputSchema, vi as createOrUpdateFileDescription, vn as addCommentReactionInputSchema, vr as updateIssueCommentInputSchema, vt as createGistInputSchema, w as createReleaseInputSchema, wi as forkRepositoryDescription, wn as listCommentReactionsInputSchema, wr as updateLabelInputSchema, wt as getGistInputSchema, x as getReleaseContextInputSchema, xi as createRepositoryDescription, xn as addIssueReactionInputSchema, xr as updateIssueInputSchema, xt as deleteGistInputSchema, y as getReleaseContextCore, yi as createOrUpdateFileInputSchema, yn as addIssueReactionCore, yr as updateIssueCore, yt as deleteGistCore, z as updateReleaseInputSchema, zn as closeIssueInputSchema, zr as getPullRequestInputSchema, zt as getBlameInputSchema } from "./write-tools-Dk32V9Hl.mjs";
|
|
2
2
|
import { ToolLoopAgent, tool } from "ai";
|
|
3
3
|
//#region src/tools/repository.ts
|
|
4
4
|
async function getRepositoryStep(args) {
|
|
@@ -170,6 +170,20 @@ const mergePullRequest = (token, { needsApproval = true, coAuthors } = {}) => to
|
|
|
170
170
|
...args
|
|
171
171
|
})
|
|
172
172
|
});
|
|
173
|
+
async function updatePullRequestStep(args) {
|
|
174
|
+
"use step";
|
|
175
|
+
return updatePullRequestCore(args);
|
|
176
|
+
}
|
|
177
|
+
/** Update a pull request — title, body, state, base branch, or draft status. Requires approval by default. */
|
|
178
|
+
const updatePullRequest = (token, { needsApproval = true } = {}) => tool({
|
|
179
|
+
description: updatePullRequestDescription,
|
|
180
|
+
needsApproval,
|
|
181
|
+
inputSchema: updatePullRequestInputSchema,
|
|
182
|
+
execute: async (args) => updatePullRequestStep({
|
|
183
|
+
token: await resolveGithubToken(token),
|
|
184
|
+
...args
|
|
185
|
+
})
|
|
186
|
+
});
|
|
173
187
|
async function addPullRequestCommentStep(args) {
|
|
174
188
|
"use step";
|
|
175
189
|
return addPullRequestCommentCore(args);
|
|
@@ -184,6 +198,34 @@ const addPullRequestComment = (token, { needsApproval = true } = {}) => tool({
|
|
|
184
198
|
...args
|
|
185
199
|
})
|
|
186
200
|
});
|
|
201
|
+
async function updatePullRequestCommentStep(args) {
|
|
202
|
+
"use step";
|
|
203
|
+
return updatePullRequestCommentCore(args);
|
|
204
|
+
}
|
|
205
|
+
/** Update the body of a comment on a pull request. Requires approval by default. */
|
|
206
|
+
const updatePullRequestComment = (token, { needsApproval = true } = {}) => tool({
|
|
207
|
+
description: updatePullRequestCommentDescription,
|
|
208
|
+
needsApproval,
|
|
209
|
+
inputSchema: updatePullRequestCommentInputSchema,
|
|
210
|
+
execute: async (args) => updatePullRequestCommentStep({
|
|
211
|
+
token: await resolveGithubToken(token),
|
|
212
|
+
...args
|
|
213
|
+
})
|
|
214
|
+
});
|
|
215
|
+
async function deletePullRequestCommentStep(args) {
|
|
216
|
+
"use step";
|
|
217
|
+
return deletePullRequestCommentCore(args);
|
|
218
|
+
}
|
|
219
|
+
/** Delete a comment from a pull request permanently. Requires approval by default. */
|
|
220
|
+
const deletePullRequestComment = (token, { needsApproval = true } = {}) => tool({
|
|
221
|
+
description: deletePullRequestCommentDescription,
|
|
222
|
+
needsApproval,
|
|
223
|
+
inputSchema: deletePullRequestCommentInputSchema,
|
|
224
|
+
execute: async (args) => deletePullRequestCommentStep({
|
|
225
|
+
token: await resolveGithubToken(token),
|
|
226
|
+
...args
|
|
227
|
+
})
|
|
228
|
+
});
|
|
187
229
|
async function listPullRequestFilesStep(args) {
|
|
188
230
|
"use step";
|
|
189
231
|
return listPullRequestFilesCore(args);
|
|
@@ -267,6 +309,19 @@ const getIssue = (token) => tool({
|
|
|
267
309
|
...args
|
|
268
310
|
})
|
|
269
311
|
});
|
|
312
|
+
async function listIssueCommentsStep(args) {
|
|
313
|
+
"use step";
|
|
314
|
+
return listIssueCommentsCore(args);
|
|
315
|
+
}
|
|
316
|
+
/** List comments on a GitHub issue. Prefer getIssueContext for the first page when triaging. */
|
|
317
|
+
const listIssueComments = (token) => tool({
|
|
318
|
+
description: listIssueCommentsDescription,
|
|
319
|
+
inputSchema: listIssueCommentsInputSchema,
|
|
320
|
+
execute: async (args) => listIssueCommentsStep({
|
|
321
|
+
token: await resolveGithubToken(token),
|
|
322
|
+
...args
|
|
323
|
+
})
|
|
324
|
+
});
|
|
270
325
|
async function createIssueStep(args) {
|
|
271
326
|
"use step";
|
|
272
327
|
return createIssueCore(args);
|
|
@@ -309,6 +364,48 @@ const closeIssue = (token, { needsApproval = true } = {}) => tool({
|
|
|
309
364
|
...args
|
|
310
365
|
})
|
|
311
366
|
});
|
|
367
|
+
async function updateIssueStep(args) {
|
|
368
|
+
"use step";
|
|
369
|
+
return updateIssueCore(args);
|
|
370
|
+
}
|
|
371
|
+
/** Update a GitHub issue — title, body, state, labels, milestone, or assignees. Requires approval by default. */
|
|
372
|
+
const updateIssue = (token, { needsApproval = true } = {}) => tool({
|
|
373
|
+
description: updateIssueDescription,
|
|
374
|
+
needsApproval,
|
|
375
|
+
inputSchema: updateIssueInputSchema,
|
|
376
|
+
execute: async (args) => updateIssueStep({
|
|
377
|
+
token: await resolveGithubToken(token),
|
|
378
|
+
...args
|
|
379
|
+
})
|
|
380
|
+
});
|
|
381
|
+
async function updateIssueCommentStep(args) {
|
|
382
|
+
"use step";
|
|
383
|
+
return updateIssueCommentCore(args);
|
|
384
|
+
}
|
|
385
|
+
/** Update the body of a comment on a GitHub issue. Requires approval by default. */
|
|
386
|
+
const updateIssueComment = (token, { needsApproval = true } = {}) => tool({
|
|
387
|
+
description: updateIssueCommentDescription,
|
|
388
|
+
needsApproval,
|
|
389
|
+
inputSchema: updateIssueCommentInputSchema,
|
|
390
|
+
execute: async (args) => updateIssueCommentStep({
|
|
391
|
+
token: await resolveGithubToken(token),
|
|
392
|
+
...args
|
|
393
|
+
})
|
|
394
|
+
});
|
|
395
|
+
async function deleteIssueCommentStep(args) {
|
|
396
|
+
"use step";
|
|
397
|
+
return deleteIssueCommentCore(args);
|
|
398
|
+
}
|
|
399
|
+
/** Delete a comment from a GitHub issue permanently. Requires approval by default. */
|
|
400
|
+
const deleteIssueComment = (token, { needsApproval = true } = {}) => tool({
|
|
401
|
+
description: deleteIssueCommentDescription,
|
|
402
|
+
needsApproval,
|
|
403
|
+
inputSchema: deleteIssueCommentInputSchema,
|
|
404
|
+
execute: async (args) => deleteIssueCommentStep({
|
|
405
|
+
token: await resolveGithubToken(token),
|
|
406
|
+
...args
|
|
407
|
+
})
|
|
408
|
+
});
|
|
312
409
|
async function listLabelsStep(args) {
|
|
313
410
|
"use step";
|
|
314
411
|
return listLabelsCore(args);
|
|
@@ -350,6 +447,48 @@ const removeLabel = (token, { needsApproval = true } = {}) => tool({
|
|
|
350
447
|
...args
|
|
351
448
|
})
|
|
352
449
|
});
|
|
450
|
+
async function createLabelStep(args) {
|
|
451
|
+
"use step";
|
|
452
|
+
return createLabelCore(args);
|
|
453
|
+
}
|
|
454
|
+
/** Create a label in a GitHub repository. Requires approval by default. */
|
|
455
|
+
const createLabel = (token, { needsApproval = true } = {}) => tool({
|
|
456
|
+
description: createLabelDescription,
|
|
457
|
+
needsApproval,
|
|
458
|
+
inputSchema: createLabelInputSchema,
|
|
459
|
+
execute: async (args) => createLabelStep({
|
|
460
|
+
token: await resolveGithubToken(token),
|
|
461
|
+
...args
|
|
462
|
+
})
|
|
463
|
+
});
|
|
464
|
+
async function updateLabelStep(args) {
|
|
465
|
+
"use step";
|
|
466
|
+
return updateLabelCore(args);
|
|
467
|
+
}
|
|
468
|
+
/** Update a label in a GitHub repository. Requires approval by default. */
|
|
469
|
+
const updateLabel = (token, { needsApproval = true } = {}) => tool({
|
|
470
|
+
description: updateLabelDescription,
|
|
471
|
+
needsApproval,
|
|
472
|
+
inputSchema: updateLabelInputSchema,
|
|
473
|
+
execute: async (args) => updateLabelStep({
|
|
474
|
+
token: await resolveGithubToken(token),
|
|
475
|
+
...args
|
|
476
|
+
})
|
|
477
|
+
});
|
|
478
|
+
async function deleteLabelStep(args) {
|
|
479
|
+
"use step";
|
|
480
|
+
return deleteLabelCore(args);
|
|
481
|
+
}
|
|
482
|
+
/** Delete a label from a GitHub repository permanently. Requires approval by default. */
|
|
483
|
+
const deleteLabel = (token, { needsApproval = true } = {}) => tool({
|
|
484
|
+
description: deleteLabelDescription,
|
|
485
|
+
needsApproval,
|
|
486
|
+
inputSchema: deleteLabelInputSchema,
|
|
487
|
+
execute: async (args) => deleteLabelStep({
|
|
488
|
+
token: await resolveGithubToken(token),
|
|
489
|
+
...args
|
|
490
|
+
})
|
|
491
|
+
});
|
|
353
492
|
async function addAssigneesStep(args) {
|
|
354
493
|
"use step";
|
|
355
494
|
return addAssigneesCore(args);
|
|
@@ -379,12 +518,139 @@ const removeAssignees = (token, { needsApproval = true } = {}) => tool({
|
|
|
379
518
|
})
|
|
380
519
|
});
|
|
381
520
|
//#endregion
|
|
521
|
+
//#region src/tools/reactions.ts
|
|
522
|
+
async function listIssueReactionsStep(args) {
|
|
523
|
+
"use step";
|
|
524
|
+
return listIssueReactionsCore(args);
|
|
525
|
+
}
|
|
526
|
+
/** List reactions on an issue or pull request conversation. */
|
|
527
|
+
const listIssueReactions = (token) => tool({
|
|
528
|
+
description: listIssueReactionsDescription,
|
|
529
|
+
inputSchema: listIssueReactionsInputSchema,
|
|
530
|
+
execute: async (args) => listIssueReactionsStep({
|
|
531
|
+
token: await resolveGithubToken(token),
|
|
532
|
+
...args
|
|
533
|
+
})
|
|
534
|
+
});
|
|
535
|
+
async function addIssueReactionStep(args) {
|
|
536
|
+
"use step";
|
|
537
|
+
return addIssueReactionCore(args);
|
|
538
|
+
}
|
|
539
|
+
/** React to an issue or pull request with an emoji. Requires approval by default. */
|
|
540
|
+
const addIssueReaction = (token, { needsApproval = true } = {}) => tool({
|
|
541
|
+
description: addIssueReactionDescription,
|
|
542
|
+
needsApproval,
|
|
543
|
+
inputSchema: addIssueReactionInputSchema,
|
|
544
|
+
execute: async (args) => addIssueReactionStep({
|
|
545
|
+
token: await resolveGithubToken(token),
|
|
546
|
+
...args
|
|
547
|
+
})
|
|
548
|
+
});
|
|
549
|
+
async function listCommentReactionsStep(args) {
|
|
550
|
+
"use step";
|
|
551
|
+
return listCommentReactionsCore(args);
|
|
552
|
+
}
|
|
553
|
+
/** List reactions on an issue or pull request comment. */
|
|
554
|
+
const listCommentReactions = (token) => tool({
|
|
555
|
+
description: listCommentReactionsDescription,
|
|
556
|
+
inputSchema: listCommentReactionsInputSchema,
|
|
557
|
+
execute: async (args) => listCommentReactionsStep({
|
|
558
|
+
token: await resolveGithubToken(token),
|
|
559
|
+
...args
|
|
560
|
+
})
|
|
561
|
+
});
|
|
562
|
+
async function addCommentReactionStep(args) {
|
|
563
|
+
"use step";
|
|
564
|
+
return addCommentReactionCore(args);
|
|
565
|
+
}
|
|
566
|
+
/** React to an issue or pull request comment with an emoji. Requires approval by default. */
|
|
567
|
+
const addCommentReaction = (token, { needsApproval = true } = {}) => tool({
|
|
568
|
+
description: addCommentReactionDescription,
|
|
569
|
+
needsApproval,
|
|
570
|
+
inputSchema: addCommentReactionInputSchema,
|
|
571
|
+
execute: async (args) => addCommentReactionStep({
|
|
572
|
+
token: await resolveGithubToken(token),
|
|
573
|
+
...args
|
|
574
|
+
})
|
|
575
|
+
});
|
|
576
|
+
//#endregion
|
|
577
|
+
//#region src/tools/discussions.ts
|
|
578
|
+
async function listDiscussionsStep(args) {
|
|
579
|
+
"use step";
|
|
580
|
+
return listDiscussionsCore(args);
|
|
581
|
+
}
|
|
582
|
+
/** List discussions in a repository, optionally filtered by category. */
|
|
583
|
+
const listDiscussions = (token) => tool({
|
|
584
|
+
description: listDiscussionsDescription,
|
|
585
|
+
inputSchema: listDiscussionsInputSchema,
|
|
586
|
+
execute: async (args) => listDiscussionsStep({
|
|
587
|
+
token: await resolveGithubToken(token),
|
|
588
|
+
...args
|
|
589
|
+
})
|
|
590
|
+
});
|
|
591
|
+
async function getDiscussionStep(args) {
|
|
592
|
+
"use step";
|
|
593
|
+
return getDiscussionCore(args);
|
|
594
|
+
}
|
|
595
|
+
/** Get a discussion by number. */
|
|
596
|
+
const getDiscussion = (token) => tool({
|
|
597
|
+
description: getDiscussionDescription,
|
|
598
|
+
inputSchema: getDiscussionInputSchema,
|
|
599
|
+
execute: async (args) => getDiscussionStep({
|
|
600
|
+
token: await resolveGithubToken(token),
|
|
601
|
+
...args
|
|
602
|
+
})
|
|
603
|
+
});
|
|
604
|
+
async function addDiscussionCommentStep(args) {
|
|
605
|
+
"use step";
|
|
606
|
+
return addDiscussionCommentCore(args);
|
|
607
|
+
}
|
|
608
|
+
/** Add a comment to a discussion. Requires approval by default. */
|
|
609
|
+
const addDiscussionComment = (token, { needsApproval = true } = {}) => tool({
|
|
610
|
+
description: addDiscussionCommentDescription,
|
|
611
|
+
needsApproval,
|
|
612
|
+
inputSchema: addDiscussionCommentInputSchema,
|
|
613
|
+
execute: async (args) => addDiscussionCommentStep({
|
|
614
|
+
token: await resolveGithubToken(token),
|
|
615
|
+
...args
|
|
616
|
+
})
|
|
617
|
+
});
|
|
618
|
+
//#endregion
|
|
619
|
+
//#region src/tools/notifications.ts
|
|
620
|
+
async function listNotificationsStep(args) {
|
|
621
|
+
"use step";
|
|
622
|
+
return listNotificationsCore(args);
|
|
623
|
+
}
|
|
624
|
+
/** List notification threads for the authenticated user. */
|
|
625
|
+
const listNotifications = (token) => tool({
|
|
626
|
+
description: listNotificationsDescription,
|
|
627
|
+
inputSchema: listNotificationsInputSchema,
|
|
628
|
+
execute: async (args) => listNotificationsStep({
|
|
629
|
+
token: await resolveGithubToken(token),
|
|
630
|
+
...args
|
|
631
|
+
})
|
|
632
|
+
});
|
|
633
|
+
async function markNotificationReadStep(args) {
|
|
634
|
+
"use step";
|
|
635
|
+
return markNotificationReadCore(args);
|
|
636
|
+
}
|
|
637
|
+
/** Mark a notification thread as read. Requires approval by default. */
|
|
638
|
+
const markNotificationRead = (token, { needsApproval = true } = {}) => tool({
|
|
639
|
+
description: markNotificationReadDescription,
|
|
640
|
+
needsApproval,
|
|
641
|
+
inputSchema: markNotificationReadInputSchema,
|
|
642
|
+
execute: async (args) => markNotificationReadStep({
|
|
643
|
+
token: await resolveGithubToken(token),
|
|
644
|
+
...args
|
|
645
|
+
})
|
|
646
|
+
});
|
|
647
|
+
//#endregion
|
|
382
648
|
//#region src/tools/search.ts
|
|
383
649
|
async function searchCodeStep(args) {
|
|
384
650
|
"use step";
|
|
385
651
|
return searchCodeCore(args);
|
|
386
652
|
}
|
|
387
|
-
/** Search for code in GitHub repositories. Use qualifiers like "repo:owner/name" to scope the search. */
|
|
653
|
+
/** Search for code in GitHub repositories. Use qualifiers like "repo:owner/name" to scope the search. Results include matching text snippets when GitHub returns them. */
|
|
388
654
|
const searchCode = (token) => tool({
|
|
389
655
|
description: searchCodeDescription,
|
|
390
656
|
inputSchema: searchCodeInputSchema,
|
|
@@ -406,6 +672,19 @@ const searchRepositories = (token) => tool({
|
|
|
406
672
|
...args
|
|
407
673
|
})
|
|
408
674
|
});
|
|
675
|
+
async function searchIssuesStep(args) {
|
|
676
|
+
"use step";
|
|
677
|
+
return searchIssuesCore(args);
|
|
678
|
+
}
|
|
679
|
+
/** Search for issues and pull requests across GitHub using search qualifiers like "repo:owner/name is:open". */
|
|
680
|
+
const searchIssues = (token) => tool({
|
|
681
|
+
description: searchIssuesDescription,
|
|
682
|
+
inputSchema: searchIssuesInputSchema,
|
|
683
|
+
execute: async (args) => searchIssuesStep({
|
|
684
|
+
token: await resolveGithubToken(token),
|
|
685
|
+
...args
|
|
686
|
+
})
|
|
687
|
+
});
|
|
409
688
|
//#endregion
|
|
410
689
|
//#region src/tools/commits.ts
|
|
411
690
|
async function listCommitsStep(args) {
|
|
@@ -738,6 +1017,34 @@ const createRelease = (token, { needsApproval = true } = {}) => tool({
|
|
|
738
1017
|
...args
|
|
739
1018
|
})
|
|
740
1019
|
});
|
|
1020
|
+
async function updateReleaseStep(args) {
|
|
1021
|
+
"use step";
|
|
1022
|
+
return updateReleaseCore(args);
|
|
1023
|
+
}
|
|
1024
|
+
/** Update an existing release — tag, target, title, notes, draft, or prerelease status. Requires approval by default. */
|
|
1025
|
+
const updateRelease = (token, { needsApproval = true } = {}) => tool({
|
|
1026
|
+
description: updateReleaseDescription,
|
|
1027
|
+
needsApproval,
|
|
1028
|
+
inputSchema: updateReleaseInputSchema,
|
|
1029
|
+
execute: async (args) => updateReleaseStep({
|
|
1030
|
+
token: await resolveGithubToken(token),
|
|
1031
|
+
...args
|
|
1032
|
+
})
|
|
1033
|
+
});
|
|
1034
|
+
async function deleteReleaseStep(args) {
|
|
1035
|
+
"use step";
|
|
1036
|
+
return deleteReleaseCore(args);
|
|
1037
|
+
}
|
|
1038
|
+
/** Delete a release permanently. Requires approval by default. */
|
|
1039
|
+
const deleteRelease = (token, { needsApproval = true } = {}) => tool({
|
|
1040
|
+
description: deleteReleaseDescription,
|
|
1041
|
+
needsApproval,
|
|
1042
|
+
inputSchema: deleteReleaseInputSchema,
|
|
1043
|
+
execute: async (args) => deleteReleaseStep({
|
|
1044
|
+
token: await resolveGithubToken(token),
|
|
1045
|
+
...args
|
|
1046
|
+
})
|
|
1047
|
+
});
|
|
741
1048
|
//#endregion
|
|
742
1049
|
//#region src/tools/bundles.ts
|
|
743
1050
|
async function getPullRequestContextStep(args) {
|
|
@@ -758,7 +1065,7 @@ async function getIssueContextStep(args) {
|
|
|
758
1065
|
"use step";
|
|
759
1066
|
return getIssueContextCore(args);
|
|
760
1067
|
}
|
|
761
|
-
/** Fetch an issue plus available
|
|
1068
|
+
/** Fetch an issue plus available label names and recent comments in one call. */
|
|
762
1069
|
const getIssueContext = (token) => tool({
|
|
763
1070
|
description: getIssueContextDescription,
|
|
764
1071
|
inputSchema: getIssueContextInputSchema,
|
|
@@ -808,100 +1115,117 @@ function resolveAiSdkApproval(toolName, config) {
|
|
|
808
1115
|
}
|
|
809
1116
|
//#endregion
|
|
810
1117
|
//#region src/agents.ts
|
|
811
|
-
const SHARED_RULES = `When a tool execution is denied by the user, do not retry it. Briefly acknowledge the decision and move on
|
|
812
|
-
|
|
1118
|
+
const SHARED_RULES = `When a tool execution is denied by the user, do not retry it. Briefly acknowledge the decision and move on.
|
|
1119
|
+
Call independent read tools in the same step when you already know the arguments — never serialize reads that could run in parallel.
|
|
1120
|
+
Bodies default to detail summary; patches default to includePatch false; prefer getFileContent with startLine/endLine or maxLines for large files.`;
|
|
1121
|
+
const DEFAULT_INSTRUCTIONS = `You are a helpful GitHub assistant. You can read and explore repositories, issues, pull requests, discussions, commits, code, gists, and workflows. You can also create issues, pull requests, comments, gists, reactions, trigger workflows, and update files when asked.
|
|
813
1122
|
|
|
814
|
-
Prefer getPullRequestContext, getIssueContext, getReleaseContext, or getCiFailureContext
|
|
1123
|
+
Prefer getPullRequestContext, getIssueContext, getReleaseContext, or getCiFailureContext for multi-part reads instead of chaining separate tools.
|
|
815
1124
|
|
|
816
1125
|
${SHARED_RULES}`;
|
|
817
1126
|
const PRESET_INSTRUCTIONS = {
|
|
818
1127
|
"code-review": `You are a code review assistant. Your job is to review pull requests thoroughly and provide constructive feedback.
|
|
819
1128
|
|
|
820
1129
|
When reviewing a PR:
|
|
821
|
-
-
|
|
822
|
-
-
|
|
823
|
-
-
|
|
824
|
-
-
|
|
825
|
-
-
|
|
826
|
-
-
|
|
827
|
-
- Check for bugs, logic errors, and edge cases
|
|
828
|
-
- Suggest improvements when you spot issues
|
|
829
|
-
- Be constructive — explain why something is a problem and how to fix it
|
|
830
|
-
- Use createPullRequestReview to submit a formal review with inline comments on specific lines
|
|
831
|
-
- Post your review as PR comments when asked
|
|
1130
|
+
- Start with getPullRequestContext (set includeChecks true when CI matters)
|
|
1131
|
+
- Then listPullRequestFiles with includePatch true and filenames for only the files you need — in the same step as any getFileContent / getBlame calls when possible
|
|
1132
|
+
- Use getBlame then getCommit(includePatch true) only when line history matters
|
|
1133
|
+
- Check for bugs, logic errors, and edge cases; be constructive
|
|
1134
|
+
- Use createPullRequestReview for formal reviews when asked
|
|
1135
|
+
- Use updatePullRequest to change title, body, base branch, or draft status; addPullRequestComment / updatePullRequestComment / deletePullRequestComment to manage comments
|
|
832
1136
|
|
|
833
1137
|
${SHARED_RULES}`,
|
|
834
1138
|
"issue-triage": `You are an issue triage assistant. Your job is to help manage and organize GitHub issues.
|
|
835
1139
|
|
|
836
1140
|
When triaging issues:
|
|
837
|
-
-
|
|
838
|
-
-
|
|
839
|
-
-
|
|
840
|
-
-
|
|
841
|
-
-
|
|
842
|
-
- Use
|
|
843
|
-
-
|
|
844
|
-
-
|
|
1141
|
+
- Call getIssueContext exactly once (full body + labelNames + recent comments). In that same step, call listIssues or searchIssues if you need duplicate checks
|
|
1142
|
+
- Never re-call getIssueContext for the same issue
|
|
1143
|
+
- Use listIssueComments to paginate beyond the comments returned by getIssueContext
|
|
1144
|
+
- Pick labels from labelNames; use addLabels / removeLabel to apply them. Use createLabel / updateLabel / deleteLabel when the repository taxonomy itself needs changing
|
|
1145
|
+
- Create issues with clear titles and descriptions when asked
|
|
1146
|
+
- Use updateIssue to edit title, body, labels, milestone, or assignees, and to reopen a closed issue (state: 'open') — there is no separate reopen tool
|
|
1147
|
+
- Use updateIssueComment / deleteIssueComment to correct or remove existing comments
|
|
1148
|
+
- Acknowledge a report or a comment with addIssueReaction / addCommentReaction instead of posting a comment that says nothing new
|
|
845
1149
|
|
|
846
1150
|
${SHARED_RULES}`,
|
|
847
1151
|
"ci-ops": `You are a CI/CD operations assistant. Your job is to help monitor and manage GitHub Actions workflows.
|
|
848
1152
|
|
|
849
1153
|
When working with workflows:
|
|
850
|
-
- Prefer getCiFailureContext
|
|
851
|
-
- Use listCheckRuns
|
|
852
|
-
- Inspect job steps to
|
|
853
|
-
-
|
|
854
|
-
- Trigger workflow dispatches with the correct inputs and branch
|
|
855
|
-
- Be careful with cancel and re-run operations — confirm the target run
|
|
856
|
-
- Summarize run history and trends when asked
|
|
1154
|
+
- Prefer getCiFailureContext first when diagnosing a failing ref
|
|
1155
|
+
- Use listCheckRuns / getCombinedStatus for narrower follow-ups
|
|
1156
|
+
- Inspect job steps to find the failing step; confirm before cancel/re-run
|
|
1157
|
+
- Trigger workflow_dispatch with the correct inputs and branch when asked
|
|
857
1158
|
|
|
858
1159
|
${SHARED_RULES}`,
|
|
859
1160
|
"security-audit": `You are a security audit assistant. Your job is to review repositories for security risks and report findings clearly — you never make destructive changes.
|
|
860
1161
|
|
|
861
1162
|
When auditing a repository:
|
|
862
|
-
- Use searchCode
|
|
863
|
-
- Use
|
|
864
|
-
- Prefer getCiFailureContext or getPullRequestContext
|
|
865
|
-
- Use
|
|
866
|
-
-
|
|
867
|
-
-
|
|
868
|
-
- This preset can only read, create issues, comment, and label — never assume you can fix the code directly
|
|
1163
|
+
- Use searchCode for secrets and unsafe patterns; getBlame / listCommits to trace introductions
|
|
1164
|
+
- Use searchIssues to check for prior reports of the same vulnerability before filing a duplicate
|
|
1165
|
+
- Prefer getCiFailureContext or getPullRequestContext for CI / PR context
|
|
1166
|
+
- Use compareCommits to scope changes (includePatch only when you need diffs)
|
|
1167
|
+
- Report findings as issues with reproduction, impact, and severity
|
|
1168
|
+
- Read-only plus createIssue / addIssueComment / addLabels — never assume you can fix code directly
|
|
869
1169
|
|
|
870
1170
|
${SHARED_RULES}`,
|
|
871
1171
|
"repo-explorer": `You are a repository explorer. Your job is to help users understand codebases and find information across GitHub repositories.
|
|
872
1172
|
|
|
873
1173
|
When exploring repos:
|
|
874
|
-
- Answer questions about
|
|
875
|
-
-
|
|
876
|
-
- Use
|
|
877
|
-
-
|
|
878
|
-
-
|
|
879
|
-
-
|
|
880
|
-
- You have read-only access — you cannot make changes
|
|
1174
|
+
- Answer questions about structure and organization; find files and patterns with searchCode / getFileContent
|
|
1175
|
+
- Use searchIssues to find issues or pull requests by qualifier across a repository or organization
|
|
1176
|
+
- Use listDiscussions / getDiscussion for questions answered in the repository's discussions rather than its issues
|
|
1177
|
+
- Prefer getPullRequestContext or getCiFailureContext when summarizing a PR or failing CI
|
|
1178
|
+
- Use getBlame for line ownership; summarize recent commits / PRs / issues when asked
|
|
1179
|
+
- Read-only — you cannot make changes
|
|
881
1180
|
|
|
882
1181
|
${SHARED_RULES}`,
|
|
883
1182
|
"release-manager": `You are a release management assistant. Your job is to help prepare and publish GitHub releases.
|
|
884
1183
|
|
|
885
1184
|
When preparing a release:
|
|
886
|
-
- Prefer getReleaseContext
|
|
887
|
-
- Use compareCommits
|
|
888
|
-
-
|
|
889
|
-
-
|
|
890
|
-
- Use
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
-
|
|
1185
|
+
- Prefer getReleaseContext first (current/latest release, previous release, tag compare)
|
|
1186
|
+
- Use compareCommits / listCommits for more changelog detail; getCiFailureContext before cutting
|
|
1187
|
+
- createRelease with generateReleaseNotes when there is no manual changelog
|
|
1188
|
+
- Double-check the target branch or SHA — releases and tags are hard to undo
|
|
1189
|
+
- Use updateRelease to fix notes or toggle draft/prerelease after publishing; deleteRelease only when explicitly asked — it does not delete the underlying tag
|
|
1190
|
+
|
|
1191
|
+
${SHARED_RULES}`,
|
|
1192
|
+
"discussion-moderator": `You are a discussion moderator. Your job is to answer and guide repository Discussions clearly and on-topic.
|
|
1193
|
+
|
|
1194
|
+
When working in discussions:
|
|
1195
|
+
- Use listDiscussions / getDiscussion to load the thread before replying
|
|
1196
|
+
- Prefer addDiscussionComment for answers that belong in Discussions
|
|
1197
|
+
- Use searchIssues / getIssueContext when the question overlaps an existing issue; addIssueComment only when the follow-up belongs on that issue
|
|
1198
|
+
- Keep replies concise and point to docs or code when helpful
|
|
1199
|
+
|
|
1200
|
+
${SHARED_RULES}`,
|
|
1201
|
+
"notification-inbox": `You are a notification inbox assistant. Your job is to help triage GitHub notification threads for the authenticated user.
|
|
1202
|
+
|
|
1203
|
+
When clearing the inbox:
|
|
1204
|
+
- Use listNotifications to see unread threads (set all true only when asked)
|
|
1205
|
+
- Open the related getIssue or getPullRequest when you need context before acting
|
|
1206
|
+
- Use markNotificationRead once a thread is handled or is noise
|
|
1207
|
+
- These tools need a user PAT with Notifications access — say so if calls fail for that reason
|
|
894
1208
|
|
|
895
1209
|
${SHARED_RULES}`,
|
|
896
|
-
"
|
|
1210
|
+
"pr-author": `You are a pull request authoring assistant. Your job is to prepare branches, edit files, and open focused PRs.
|
|
1211
|
+
|
|
1212
|
+
When opening a PR:
|
|
1213
|
+
- Inspect the repo with getRepository / listBranches / getFileContent before editing
|
|
1214
|
+
- createBranch from a sensible base, then createOrUpdateFile for the change set
|
|
1215
|
+
- createPullRequest with a clear title and body; updatePullRequest if the draft or description needs a fix
|
|
1216
|
+
- Use listPullRequestFiles / compareCommits / getCommit to verify what will land
|
|
1217
|
+
- Stay scoped to authoring — you do not review, merge, or manage issues
|
|
1218
|
+
|
|
1219
|
+
${SHARED_RULES}`,
|
|
1220
|
+
"maintainer": `You are a repository maintainer assistant. You have full access to manage repositories, issues, pull requests, discussions, notifications, gists, and workflows.
|
|
897
1221
|
|
|
898
1222
|
When maintaining repos:
|
|
899
|
-
- Prefer getPullRequestContext or getCiFailureContext for multi-part reads
|
|
900
|
-
- Be careful with
|
|
901
|
-
-
|
|
902
|
-
- Use
|
|
903
|
-
-
|
|
904
|
-
-
|
|
1223
|
+
- Prefer getPullRequestContext or getCiFailureContext for multi-part reads
|
|
1224
|
+
- Be careful with writes — review before acting
|
|
1225
|
+
- Keep issues, PRs, and commits clear and well-structured
|
|
1226
|
+
- Use listNotifications to find what needs attention, then markNotificationRead once a thread is handled
|
|
1227
|
+
- Acknowledge a thread with addIssueReaction / addCommentReaction instead of a comment that adds nothing
|
|
1228
|
+
- Answer questions in discussions with addDiscussionComment
|
|
905
1229
|
|
|
906
1230
|
${SHARED_RULES}`
|
|
907
1231
|
};
|
|
@@ -962,14 +1286,11 @@ function createGithubAgent({ token, preset, requireApproval, context, instructio
|
|
|
962
1286
|
*
|
|
963
1287
|
* Write operations require user approval by default.
|
|
964
1288
|
* Control this globally or per-tool via `requireApproval`.
|
|
965
|
-
*
|
|
1289
|
+
* Prefer `preset` to expose only the tools your agent needs.
|
|
966
1290
|
* Pass `context` to default owner/repo/PR/issue/ref on tool inputs.
|
|
967
1291
|
*
|
|
968
1292
|
* @example
|
|
969
1293
|
* ```ts
|
|
970
|
-
* // All tools (default)
|
|
971
|
-
* createGithubTools({ token })
|
|
972
|
-
*
|
|
973
1294
|
* // Code-review agent — only PR & commit tools
|
|
974
1295
|
* createGithubTools({ token, preset: 'code-review' })
|
|
975
1296
|
*
|
|
@@ -983,6 +1304,9 @@ function createGithubAgent({ token, preset, requireApproval, context, instructio
|
|
|
983
1304
|
* // Combine presets
|
|
984
1305
|
* createGithubTools({ token, preset: ['code-review', 'issue-triage'] })
|
|
985
1306
|
*
|
|
1307
|
+
* // Full catalog (same as omitting preset)
|
|
1308
|
+
* createGithubTools({ token, preset: 'maintainer' })
|
|
1309
|
+
*
|
|
986
1310
|
* // Granular approval
|
|
987
1311
|
* createGithubTools({
|
|
988
1312
|
* token,
|
|
@@ -1010,6 +1334,7 @@ function createGithubTools({ token, requireApproval = true, preset, context, ove
|
|
|
1010
1334
|
getIssue: getIssue(resolveToken),
|
|
1011
1335
|
searchCode: searchCode(resolveToken),
|
|
1012
1336
|
searchRepositories: searchRepositories(resolveToken),
|
|
1337
|
+
searchIssues: searchIssues(resolveToken),
|
|
1013
1338
|
listCommits: listCommits(resolveToken),
|
|
1014
1339
|
getCommit: getCommit(resolveToken),
|
|
1015
1340
|
getBlame: getBlame(resolveToken),
|
|
@@ -1028,21 +1353,40 @@ function createGithubTools({ token, requireApproval = true, preset, context, ove
|
|
|
1028
1353
|
...approval("mergePullRequest"),
|
|
1029
1354
|
coAuthors
|
|
1030
1355
|
}),
|
|
1356
|
+
updatePullRequest: updatePullRequest(resolveToken, approval("updatePullRequest")),
|
|
1031
1357
|
addPullRequestComment: addPullRequestComment(resolveToken, approval("addPullRequestComment")),
|
|
1358
|
+
updatePullRequestComment: updatePullRequestComment(resolveToken, approval("updatePullRequestComment")),
|
|
1359
|
+
deletePullRequestComment: deletePullRequestComment(resolveToken, approval("deletePullRequestComment")),
|
|
1032
1360
|
listPullRequestFiles: listPullRequestFiles(resolveToken),
|
|
1033
1361
|
listPullRequestReviews: listPullRequestReviews(resolveToken),
|
|
1034
1362
|
createPullRequestReview: createPullRequestReview(resolveToken, approval("createPullRequestReview")),
|
|
1035
1363
|
requestReviewers: requestReviewers(resolveToken, approval("requestReviewers")),
|
|
1036
1364
|
getPullRequestContext: getPullRequestContext(resolveToken),
|
|
1037
1365
|
getIssueContext: getIssueContext(resolveToken),
|
|
1366
|
+
listIssueComments: listIssueComments(resolveToken),
|
|
1038
1367
|
createIssue: createIssue(resolveToken, approval("createIssue")),
|
|
1039
1368
|
addIssueComment: addIssueComment(resolveToken, approval("addIssueComment")),
|
|
1369
|
+
updateIssueComment: updateIssueComment(resolveToken, approval("updateIssueComment")),
|
|
1370
|
+
deleteIssueComment: deleteIssueComment(resolveToken, approval("deleteIssueComment")),
|
|
1040
1371
|
closeIssue: closeIssue(resolveToken, approval("closeIssue")),
|
|
1372
|
+
updateIssue: updateIssue(resolveToken, approval("updateIssue")),
|
|
1041
1373
|
listLabels: listLabels(resolveToken),
|
|
1042
1374
|
addLabels: addLabels(resolveToken, approval("addLabels")),
|
|
1043
1375
|
removeLabel: removeLabel(resolveToken, approval("removeLabel")),
|
|
1376
|
+
createLabel: createLabel(resolveToken, approval("createLabel")),
|
|
1377
|
+
updateLabel: updateLabel(resolveToken, approval("updateLabel")),
|
|
1378
|
+
deleteLabel: deleteLabel(resolveToken, approval("deleteLabel")),
|
|
1044
1379
|
addAssignees: addAssignees(resolveToken, approval("addAssignees")),
|
|
1045
1380
|
removeAssignees: removeAssignees(resolveToken, approval("removeAssignees")),
|
|
1381
|
+
listIssueReactions: listIssueReactions(resolveToken),
|
|
1382
|
+
addIssueReaction: addIssueReaction(resolveToken, approval("addIssueReaction")),
|
|
1383
|
+
listCommentReactions: listCommentReactions(resolveToken),
|
|
1384
|
+
addCommentReaction: addCommentReaction(resolveToken, approval("addCommentReaction")),
|
|
1385
|
+
listDiscussions: listDiscussions(resolveToken),
|
|
1386
|
+
getDiscussion: getDiscussion(resolveToken),
|
|
1387
|
+
addDiscussionComment: addDiscussionComment(resolveToken, approval("addDiscussionComment")),
|
|
1388
|
+
listNotifications: listNotifications(resolveToken),
|
|
1389
|
+
markNotificationRead: markNotificationRead(resolveToken, approval("markNotificationRead")),
|
|
1046
1390
|
listGists: listGists(resolveToken),
|
|
1047
1391
|
getGist: getGist(resolveToken),
|
|
1048
1392
|
listGistComments: listGistComments(resolveToken),
|
|
@@ -1064,7 +1408,9 @@ function createGithubTools({ token, requireApproval = true, preset, context, ove
|
|
|
1064
1408
|
getLatestRelease: getLatestRelease(resolveToken),
|
|
1065
1409
|
getRelease: getRelease(resolveToken),
|
|
1066
1410
|
getReleaseContext: getReleaseContext(resolveToken),
|
|
1067
|
-
createRelease: createRelease(resolveToken, approval("createRelease"))
|
|
1411
|
+
createRelease: createRelease(resolveToken, approval("createRelease")),
|
|
1412
|
+
updateRelease: updateRelease(resolveToken, approval("updateRelease")),
|
|
1413
|
+
deleteRelease: deleteRelease(resolveToken, approval("deleteRelease"))
|
|
1068
1414
|
};
|
|
1069
1415
|
if (overrides) {
|
|
1070
1416
|
for (const [name, toolOverrides] of Object.entries(overrides)) if (name in allTools && toolOverrides) {
|
|
@@ -1080,6 +1426,6 @@ function createGithubTools({ token, requireApproval = true, preset, context, ove
|
|
|
1080
1426
|
return Object.fromEntries(Object.entries(scoped).filter(([name]) => allowed.has(name)));
|
|
1081
1427
|
}
|
|
1082
1428
|
//#endregion
|
|
1083
|
-
export {
|
|
1429
|
+
export { deleteLabel as $, compareCommits as A, getDiscussion as B, createGist as C, createRepository as Ct, listGistComments as D, getRepositoryTree as Dt, getGist as E, getRepository as Et, searchIssues as F, listIssueReactions as G, addCommentReaction as H, searchRepositories as I, addLabels as J, addAssignees as K, listNotifications as L, getCommit as M, listCommits as N, listGists as O, listBranches as Ot, searchCode as P, deleteIssueComment as Q, markNotificationRead as R, triggerWorkflow as S, createOrUpdateFile as St, deleteGist as T, getFileContent as Tt, addIssueReaction as U, listDiscussions as V, listCommentReactions as W, createIssue as X, closeIssue as Y, createLabel as Z, getWorkflowRun as _, mergePullRequest as _t, getIssueContext as a, removeLabel as at, listWorkflows as b, updatePullRequestComment as bt, createRelease as c, updateLabel as ct, getRelease as d, createPullRequestReview as dt, getIssue as et, listReleases as f, deletePullRequestComment as ft, cancelWorkflowRun as g, listPullRequests as gt, listCheckRuns as h, listPullRequestReviews as ht, getCiFailureContext as i, removeAssignees as it, getBlame as j, updateGist as k, deleteRelease as l, addPullRequestComment as lt, getCombinedStatus as m, listPullRequestFiles as mt, createGithubAgent as n, listIssues as nt, getPullRequestContext as o, updateIssue as ot, updateRelease as p, getPullRequest as pt, addIssueComment as q, resolveInstructions as r, listLabels as rt, getReleaseContext as s, updateIssueComment as st, createGithubTools as t, listIssueComments as tt, getLatestRelease as u, createPullRequest as ut, listWorkflowJobs as v, requestReviewers as vt, createGistComment as w, forkRepository as wt, rerunWorkflowRun as x, createBranch as xt, listWorkflowRuns as y, updatePullRequest as yt, addDiscussionComment as z };
|
|
1084
1430
|
|
|
1085
|
-
//# sourceMappingURL=src-
|
|
1431
|
+
//# sourceMappingURL=src-jQWS2Txw.mjs.map
|