@github-tools/sdk 1.9.0 → 1.10.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 +82 -27
- package/dist/connect/eve.d.mts +14 -9
- package/dist/connect/eve.d.mts.map +1 -1
- package/dist/connect/eve.mjs +14 -9
- package/dist/connect/eve.mjs.map +1 -1
- package/dist/connect.d.mts +16 -8
- package/dist/connect.d.mts.map +1 -1
- package/dist/connect.mjs +2 -2
- package/dist/eve-runtime-CI4dR_hI.d.mts +54 -0
- package/dist/eve-runtime-CI4dR_hI.d.mts.map +1 -0
- package/dist/eve-runtime-CIcrt7MD.mjs +674 -0
- package/dist/eve-runtime-CIcrt7MD.mjs.map +1 -0
- package/dist/eve-runtime.d.mts +4 -0
- package/dist/eve-runtime.mjs +3 -0
- package/dist/eve.d.mts +5 -34
- package/dist/eve.d.mts.map +1 -1
- package/dist/eve.mjs +356 -3
- package/dist/eve.mjs.map +1 -0
- package/dist/{index-CtID5dUi.d.mts → index-B0nL0C00.d.mts} +159 -19
- package/dist/index-B0nL0C00.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -3
- package/dist/{src-D6vC3V8r.mjs → src-v-LjzPpR.mjs} +354 -68
- package/dist/src-v-LjzPpR.mjs.map +1 -0
- package/dist/{token-sbepWIkd.mjs → token-DDMlEkK-.mjs} +34 -5
- package/dist/token-DDMlEkK-.mjs.map +1 -0
- package/dist/{types-BVLof-5R.d.mts → types-VW0m0Uxl.d.mts} +3 -3
- package/dist/{types-BVLof-5R.d.mts.map → types-VW0m0Uxl.d.mts.map} +1 -1
- package/dist/{types-BOnJ0Rou.d.mts → types-Ygt1pw1N.d.mts} +4 -3
- package/dist/types-Ygt1pw1N.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-uIVfURVp.mjs} +792 -25
- package/dist/write-tools-uIVfURVp.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.map +0 -1
- package/dist/types-BOnJ0Rou.d.mts.map +0 -1
- package/dist/write-tools-cg_ialNd.mjs.map +0 -1
|
@@ -693,6 +693,54 @@ async function createPullRequestCore({ token, owner, repo, title, body, head, ba
|
|
|
693
693
|
base: data.base.ref
|
|
694
694
|
};
|
|
695
695
|
}
|
|
696
|
+
const MARK_READY_FOR_REVIEW_MUTATION = `
|
|
697
|
+
mutation($pullRequestId: ID!) {
|
|
698
|
+
markPullRequestReadyForReview(input: { pullRequestId: $pullRequestId }) {
|
|
699
|
+
pullRequest { id }
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
`;
|
|
703
|
+
const CONVERT_TO_DRAFT_MUTATION = `
|
|
704
|
+
mutation($pullRequestId: ID!) {
|
|
705
|
+
convertPullRequestToDraft(input: { pullRequestId: $pullRequestId }) {
|
|
706
|
+
pullRequest { id }
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
`;
|
|
710
|
+
const updatePullRequestInputSchema = z.object({
|
|
711
|
+
owner: z.string().describe("Repository owner"),
|
|
712
|
+
repo: z.string().describe("Repository name"),
|
|
713
|
+
pullNumber: z.number().describe("Pull request number"),
|
|
714
|
+
title: z.string().optional().describe("New pull request title"),
|
|
715
|
+
body: z.string().optional().describe("New pull request description (supports Markdown)"),
|
|
716
|
+
state: z.enum(["open", "closed"]).optional().describe("Open or close the pull request"),
|
|
717
|
+
base: z.string().optional().describe("Change the base branch to merge into"),
|
|
718
|
+
draft: z.boolean().optional().describe("Convert to draft (true) or mark as ready for review (false)")
|
|
719
|
+
});
|
|
720
|
+
const updatePullRequestDescription = "Update a pull request — title, body, state, base branch, or draft status. Draft toggling uses the GitHub GraphQL API since the REST update endpoint does not support it";
|
|
721
|
+
/** Not idempotent — each call applies a new revision. */
|
|
722
|
+
async function updatePullRequestCore({ token, owner, repo, pullNumber, title, body, state, base, draft }) {
|
|
723
|
+
const octokit = createOctokit(token);
|
|
724
|
+
const { data } = await octokit.rest.pulls.update({
|
|
725
|
+
owner,
|
|
726
|
+
repo,
|
|
727
|
+
pull_number: pullNumber,
|
|
728
|
+
title,
|
|
729
|
+
body,
|
|
730
|
+
state,
|
|
731
|
+
base
|
|
732
|
+
});
|
|
733
|
+
if (draft !== void 0 && draft !== data.draft) await octokit.graphql(draft ? CONVERT_TO_DRAFT_MUTATION : MARK_READY_FOR_REVIEW_MUTATION, { pullRequestId: data.node_id });
|
|
734
|
+
return {
|
|
735
|
+
number: data.number,
|
|
736
|
+
title: data.title,
|
|
737
|
+
state: data.state,
|
|
738
|
+
draft: draft ?? data.draft,
|
|
739
|
+
url: data.html_url,
|
|
740
|
+
base: data.base.ref,
|
|
741
|
+
updatedAt: data.updated_at
|
|
742
|
+
};
|
|
743
|
+
}
|
|
696
744
|
const mergePullRequestInputSchema = z.object({
|
|
697
745
|
owner: z.string().describe("Repository owner"),
|
|
698
746
|
repo: z.string().describe("Repository name"),
|
|
@@ -747,6 +795,46 @@ async function addPullRequestCommentCore({ token, owner, repo, pullNumber, body
|
|
|
747
795
|
createdAt: data.created_at
|
|
748
796
|
};
|
|
749
797
|
}
|
|
798
|
+
const updatePullRequestCommentInputSchema = z.object({
|
|
799
|
+
owner: z.string().describe("Repository owner"),
|
|
800
|
+
repo: z.string().describe("Repository name"),
|
|
801
|
+
commentId: z.number().describe("Comment ID (from the comment returned by addPullRequestComment)"),
|
|
802
|
+
body: z.string().describe("New comment text (supports Markdown)")
|
|
803
|
+
});
|
|
804
|
+
const updatePullRequestCommentDescription = "Update the body of a comment on a pull request";
|
|
805
|
+
/** Not idempotent — each call applies a new revision. */
|
|
806
|
+
async function updatePullRequestCommentCore({ token, owner, repo, commentId, body }) {
|
|
807
|
+
const { data } = await createOctokit(token).rest.issues.updateComment({
|
|
808
|
+
owner,
|
|
809
|
+
repo,
|
|
810
|
+
comment_id: commentId,
|
|
811
|
+
body
|
|
812
|
+
});
|
|
813
|
+
return {
|
|
814
|
+
id: data.id,
|
|
815
|
+
url: data.html_url,
|
|
816
|
+
body: data.body,
|
|
817
|
+
updatedAt: data.updated_at
|
|
818
|
+
};
|
|
819
|
+
}
|
|
820
|
+
const deletePullRequestCommentInputSchema = z.object({
|
|
821
|
+
owner: z.string().describe("Repository owner"),
|
|
822
|
+
repo: z.string().describe("Repository name"),
|
|
823
|
+
commentId: z.number().describe("Comment ID to delete")
|
|
824
|
+
});
|
|
825
|
+
const deletePullRequestCommentDescription = "Delete a comment from a pull request permanently";
|
|
826
|
+
/** Not idempotent — deleting an already-deleted comment returns 404 from GitHub. */
|
|
827
|
+
async function deletePullRequestCommentCore({ token, owner, repo, commentId }) {
|
|
828
|
+
await createOctokit(token).rest.issues.deleteComment({
|
|
829
|
+
owner,
|
|
830
|
+
repo,
|
|
831
|
+
comment_id: commentId
|
|
832
|
+
});
|
|
833
|
+
return {
|
|
834
|
+
deleted: true,
|
|
835
|
+
commentId
|
|
836
|
+
};
|
|
837
|
+
}
|
|
750
838
|
const listPullRequestFilesInputSchema = z.object({
|
|
751
839
|
owner: z.string().describe("Repository owner"),
|
|
752
840
|
repo: z.string().describe("Repository name"),
|
|
@@ -1039,6 +1127,89 @@ async function closeIssueCore({ token, owner, repo, issueNumber, stateReason })
|
|
|
1039
1127
|
closedAt: data.closed_at
|
|
1040
1128
|
};
|
|
1041
1129
|
}
|
|
1130
|
+
const updateIssueInputSchema = z.object({
|
|
1131
|
+
owner: z.string().describe("Repository owner"),
|
|
1132
|
+
repo: z.string().describe("Repository name"),
|
|
1133
|
+
issueNumber: z.number().describe("Issue number"),
|
|
1134
|
+
title: z.string().optional().describe("New issue title"),
|
|
1135
|
+
body: z.string().optional().describe("New issue description (supports Markdown)"),
|
|
1136
|
+
state: z.enum(["open", "closed"]).optional().describe("Open or close the issue — set open to reopen a closed issue, closed to close it"),
|
|
1137
|
+
stateReason: z.enum([
|
|
1138
|
+
"completed",
|
|
1139
|
+
"not_planned",
|
|
1140
|
+
"reopened"
|
|
1141
|
+
]).optional().describe("Reason for the state change (ignored unless state changes)"),
|
|
1142
|
+
labels: z.array(z.string()).optional().describe("Labels to set on the issue — replaces the existing set"),
|
|
1143
|
+
milestone: z.number().nullable().optional().describe("Milestone number to associate, or null to remove the milestone"),
|
|
1144
|
+
assignees: z.array(z.string()).optional().describe("GitHub usernames to set as assignees — replaces the existing set")
|
|
1145
|
+
});
|
|
1146
|
+
const updateIssueDescription = "Update a GitHub issue — title, body, labels, milestone, or assignees. Set state open to reopen a closed issue, or closed to close it";
|
|
1147
|
+
/** Not idempotent — each call applies a new revision. */
|
|
1148
|
+
async function updateIssueCore({ token, owner, repo, issueNumber, title, body, state, stateReason, labels, milestone, assignees }) {
|
|
1149
|
+
const { data } = await createOctokit(token).rest.issues.update({
|
|
1150
|
+
owner,
|
|
1151
|
+
repo,
|
|
1152
|
+
issue_number: issueNumber,
|
|
1153
|
+
title,
|
|
1154
|
+
body,
|
|
1155
|
+
state,
|
|
1156
|
+
state_reason: stateReason,
|
|
1157
|
+
labels,
|
|
1158
|
+
milestone,
|
|
1159
|
+
assignees
|
|
1160
|
+
});
|
|
1161
|
+
return {
|
|
1162
|
+
number: data.number,
|
|
1163
|
+
title: data.title,
|
|
1164
|
+
state: data.state,
|
|
1165
|
+
url: data.html_url,
|
|
1166
|
+
labels: data.labels.map((l) => typeof l === "string" ? l : l.name),
|
|
1167
|
+
assignees: data.assignees?.map((a) => a.login),
|
|
1168
|
+
milestone: data.milestone?.number ?? null,
|
|
1169
|
+
closedAt: data.closed_at,
|
|
1170
|
+
updatedAt: data.updated_at
|
|
1171
|
+
};
|
|
1172
|
+
}
|
|
1173
|
+
const updateIssueCommentInputSchema = z.object({
|
|
1174
|
+
owner: z.string().describe("Repository owner"),
|
|
1175
|
+
repo: z.string().describe("Repository name"),
|
|
1176
|
+
commentId: z.number().describe("Comment ID (from listIssueComments)"),
|
|
1177
|
+
body: z.string().describe("New comment text (supports Markdown)")
|
|
1178
|
+
});
|
|
1179
|
+
const updateIssueCommentDescription = "Update the body of a comment on a GitHub issue";
|
|
1180
|
+
/** Not idempotent — each call applies a new revision. */
|
|
1181
|
+
async function updateIssueCommentCore({ token, owner, repo, commentId, body }) {
|
|
1182
|
+
const { data } = await createOctokit(token).rest.issues.updateComment({
|
|
1183
|
+
owner,
|
|
1184
|
+
repo,
|
|
1185
|
+
comment_id: commentId,
|
|
1186
|
+
body
|
|
1187
|
+
});
|
|
1188
|
+
return {
|
|
1189
|
+
id: data.id,
|
|
1190
|
+
url: data.html_url,
|
|
1191
|
+
body: data.body,
|
|
1192
|
+
updatedAt: data.updated_at
|
|
1193
|
+
};
|
|
1194
|
+
}
|
|
1195
|
+
const deleteIssueCommentInputSchema = z.object({
|
|
1196
|
+
owner: z.string().describe("Repository owner"),
|
|
1197
|
+
repo: z.string().describe("Repository name"),
|
|
1198
|
+
commentId: z.number().describe("Comment ID to delete")
|
|
1199
|
+
});
|
|
1200
|
+
const deleteIssueCommentDescription = "Delete a comment from a GitHub issue permanently";
|
|
1201
|
+
/** Not idempotent — deleting an already-deleted comment returns 404 from GitHub. */
|
|
1202
|
+
async function deleteIssueCommentCore({ token, owner, repo, commentId }) {
|
|
1203
|
+
await createOctokit(token).rest.issues.deleteComment({
|
|
1204
|
+
owner,
|
|
1205
|
+
repo,
|
|
1206
|
+
comment_id: commentId
|
|
1207
|
+
});
|
|
1208
|
+
return {
|
|
1209
|
+
deleted: true,
|
|
1210
|
+
commentId
|
|
1211
|
+
};
|
|
1212
|
+
}
|
|
1042
1213
|
const listLabelsInputSchema = z.object({
|
|
1043
1214
|
owner: z.string().describe("Repository owner"),
|
|
1044
1215
|
repo: z.string().describe("Repository name"),
|
|
@@ -1142,16 +1313,366 @@ async function removeAssigneesCore({ token, owner, repo, issueNumber, assignees
|
|
|
1142
1313
|
};
|
|
1143
1314
|
}
|
|
1144
1315
|
//#endregion
|
|
1316
|
+
//#region src/core/reactions.ts
|
|
1317
|
+
const reactionContentSchema = z.enum([
|
|
1318
|
+
"+1",
|
|
1319
|
+
"-1",
|
|
1320
|
+
"laugh",
|
|
1321
|
+
"confused",
|
|
1322
|
+
"heart",
|
|
1323
|
+
"hooray",
|
|
1324
|
+
"rocket",
|
|
1325
|
+
"eyes"
|
|
1326
|
+
]);
|
|
1327
|
+
function shapeReactions(reactions) {
|
|
1328
|
+
const counts = {};
|
|
1329
|
+
for (const reaction of reactions) counts[reaction.content] = (counts[reaction.content] ?? 0) + 1;
|
|
1330
|
+
return {
|
|
1331
|
+
total: reactions.length,
|
|
1332
|
+
counts,
|
|
1333
|
+
reactions: reactions.map((reaction) => ({
|
|
1334
|
+
content: reaction.content,
|
|
1335
|
+
user: reaction.user?.login
|
|
1336
|
+
}))
|
|
1337
|
+
};
|
|
1338
|
+
}
|
|
1339
|
+
const listIssueReactionsInputSchema = z.object({
|
|
1340
|
+
owner: z.string().describe("Repository owner"),
|
|
1341
|
+
repo: z.string().describe("Repository name"),
|
|
1342
|
+
issueNumber: z.number().describe("Issue or pull request number — pull request conversations share the issue numbering"),
|
|
1343
|
+
content: reactionContentSchema.optional().describe("Only return reactions of this type"),
|
|
1344
|
+
perPage: z.number().optional().default(30).describe("Number of reactions to return (max 100)"),
|
|
1345
|
+
page: z.number().optional().default(1).describe("Page number for pagination")
|
|
1346
|
+
});
|
|
1347
|
+
const listIssueReactionsDescription = "List reactions on an issue or pull request conversation, with per-emoji counts for the returned page";
|
|
1348
|
+
async function listIssueReactionsCore({ token, owner, repo, issueNumber, content, perPage, page }) {
|
|
1349
|
+
const { data } = await createOctokit(token).rest.reactions.listForIssue({
|
|
1350
|
+
owner,
|
|
1351
|
+
repo,
|
|
1352
|
+
issue_number: issueNumber,
|
|
1353
|
+
content,
|
|
1354
|
+
per_page: perPage,
|
|
1355
|
+
page
|
|
1356
|
+
});
|
|
1357
|
+
return shapeReactions(data);
|
|
1358
|
+
}
|
|
1359
|
+
const addIssueReactionInputSchema = z.object({
|
|
1360
|
+
owner: z.string().describe("Repository owner"),
|
|
1361
|
+
repo: z.string().describe("Repository name"),
|
|
1362
|
+
issueNumber: z.number().describe("Issue or pull request number — pull request conversations share the issue numbering"),
|
|
1363
|
+
content: reactionContentSchema.describe("Reaction to add")
|
|
1364
|
+
});
|
|
1365
|
+
const addIssueReactionDescription = "React to an issue or pull request with an emoji. Prefer this over posting a comment to acknowledge a report without adding noise to the thread";
|
|
1366
|
+
/** Idempotent — GitHub returns the existing reaction when the user already reacted with the same content. */
|
|
1367
|
+
async function addIssueReactionCore({ token, owner, repo, issueNumber, content }) {
|
|
1368
|
+
const { data } = await createOctokit(token).rest.reactions.createForIssue({
|
|
1369
|
+
owner,
|
|
1370
|
+
repo,
|
|
1371
|
+
issue_number: issueNumber,
|
|
1372
|
+
content
|
|
1373
|
+
});
|
|
1374
|
+
return {
|
|
1375
|
+
id: data.id,
|
|
1376
|
+
content: data.content,
|
|
1377
|
+
user: data.user?.login,
|
|
1378
|
+
issueNumber
|
|
1379
|
+
};
|
|
1380
|
+
}
|
|
1381
|
+
const listCommentReactionsInputSchema = z.object({
|
|
1382
|
+
owner: z.string().describe("Repository owner"),
|
|
1383
|
+
repo: z.string().describe("Repository name"),
|
|
1384
|
+
commentId: z.number().describe("Issue or pull request comment ID (from getIssueContext or addIssueComment)"),
|
|
1385
|
+
content: reactionContentSchema.optional().describe("Only return reactions of this type"),
|
|
1386
|
+
perPage: z.number().optional().default(30).describe("Number of reactions to return (max 100)"),
|
|
1387
|
+
page: z.number().optional().default(1).describe("Page number for pagination")
|
|
1388
|
+
});
|
|
1389
|
+
const listCommentReactionsDescription = "List reactions on an issue or pull request comment, with per-emoji counts for the returned page";
|
|
1390
|
+
async function listCommentReactionsCore({ token, owner, repo, commentId, content, perPage, page }) {
|
|
1391
|
+
const { data } = await createOctokit(token).rest.reactions.listForIssueComment({
|
|
1392
|
+
owner,
|
|
1393
|
+
repo,
|
|
1394
|
+
comment_id: commentId,
|
|
1395
|
+
content,
|
|
1396
|
+
per_page: perPage,
|
|
1397
|
+
page
|
|
1398
|
+
});
|
|
1399
|
+
return shapeReactions(data);
|
|
1400
|
+
}
|
|
1401
|
+
const addCommentReactionInputSchema = z.object({
|
|
1402
|
+
owner: z.string().describe("Repository owner"),
|
|
1403
|
+
repo: z.string().describe("Repository name"),
|
|
1404
|
+
commentId: z.number().describe("Issue or pull request comment ID to react to"),
|
|
1405
|
+
content: reactionContentSchema.describe("Reaction to add")
|
|
1406
|
+
});
|
|
1407
|
+
const addCommentReactionDescription = "React to an issue or pull request comment with an emoji. Prefer this over a reply when acknowledging a comment";
|
|
1408
|
+
/** Idempotent — GitHub returns the existing reaction when the user already reacted with the same content. */
|
|
1409
|
+
async function addCommentReactionCore({ token, owner, repo, commentId, content }) {
|
|
1410
|
+
const { data } = await createOctokit(token).rest.reactions.createForIssueComment({
|
|
1411
|
+
owner,
|
|
1412
|
+
repo,
|
|
1413
|
+
comment_id: commentId,
|
|
1414
|
+
content
|
|
1415
|
+
});
|
|
1416
|
+
return {
|
|
1417
|
+
id: data.id,
|
|
1418
|
+
content: data.content,
|
|
1419
|
+
user: data.user?.login,
|
|
1420
|
+
commentId
|
|
1421
|
+
};
|
|
1422
|
+
}
|
|
1423
|
+
//#endregion
|
|
1424
|
+
//#region src/core/discussions.ts
|
|
1425
|
+
const DISCUSSION_CATEGORIES_QUERY = `
|
|
1426
|
+
query ($owner: String!, $name: String!) {
|
|
1427
|
+
repository(owner: $owner, name: $name) {
|
|
1428
|
+
discussionCategories(first: 100) {
|
|
1429
|
+
nodes {
|
|
1430
|
+
id
|
|
1431
|
+
name
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
`;
|
|
1437
|
+
const LIST_DISCUSSIONS_QUERY = `
|
|
1438
|
+
query ($owner: String!, $name: String!, $first: Int!, $after: String, $categoryId: ID) {
|
|
1439
|
+
repository(owner: $owner, name: $name) {
|
|
1440
|
+
discussions(first: $first, after: $after, categoryId: $categoryId, orderBy: { field: UPDATED_AT, direction: DESC }) {
|
|
1441
|
+
pageInfo {
|
|
1442
|
+
hasNextPage
|
|
1443
|
+
endCursor
|
|
1444
|
+
}
|
|
1445
|
+
nodes {
|
|
1446
|
+
id
|
|
1447
|
+
number
|
|
1448
|
+
title
|
|
1449
|
+
url
|
|
1450
|
+
createdAt
|
|
1451
|
+
updatedAt
|
|
1452
|
+
isAnswered
|
|
1453
|
+
author {
|
|
1454
|
+
login
|
|
1455
|
+
}
|
|
1456
|
+
category {
|
|
1457
|
+
name
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
`;
|
|
1464
|
+
const GET_DISCUSSION_QUERY = `
|
|
1465
|
+
query ($owner: String!, $name: String!, $number: Int!) {
|
|
1466
|
+
repository(owner: $owner, name: $name) {
|
|
1467
|
+
discussion(number: $number) {
|
|
1468
|
+
id
|
|
1469
|
+
number
|
|
1470
|
+
title
|
|
1471
|
+
body
|
|
1472
|
+
url
|
|
1473
|
+
createdAt
|
|
1474
|
+
updatedAt
|
|
1475
|
+
isAnswered
|
|
1476
|
+
author {
|
|
1477
|
+
login
|
|
1478
|
+
}
|
|
1479
|
+
category {
|
|
1480
|
+
name
|
|
1481
|
+
}
|
|
1482
|
+
comments {
|
|
1483
|
+
totalCount
|
|
1484
|
+
}
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
`;
|
|
1489
|
+
const DISCUSSION_ID_QUERY = `
|
|
1490
|
+
query ($owner: String!, $name: String!, $number: Int!) {
|
|
1491
|
+
repository(owner: $owner, name: $name) {
|
|
1492
|
+
discussion(number: $number) {
|
|
1493
|
+
id
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
`;
|
|
1498
|
+
const ADD_DISCUSSION_COMMENT_MUTATION = `
|
|
1499
|
+
mutation ($discussionId: ID!, $body: String!) {
|
|
1500
|
+
addDiscussionComment(input: { discussionId: $discussionId, body: $body }) {
|
|
1501
|
+
comment {
|
|
1502
|
+
id
|
|
1503
|
+
url
|
|
1504
|
+
body
|
|
1505
|
+
createdAt
|
|
1506
|
+
author {
|
|
1507
|
+
login
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
}
|
|
1512
|
+
`;
|
|
1513
|
+
async function resolveCategoryId(octokit, owner, repo, category) {
|
|
1514
|
+
const nodes = (await octokit.graphql(DISCUSSION_CATEGORIES_QUERY, {
|
|
1515
|
+
owner,
|
|
1516
|
+
name: repo
|
|
1517
|
+
})).repository?.discussionCategories.nodes ?? [];
|
|
1518
|
+
return {
|
|
1519
|
+
id: nodes.find((node) => node.name.toLowerCase() === category.toLowerCase())?.id,
|
|
1520
|
+
available: nodes.map((node) => node.name)
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1523
|
+
const listDiscussionsInputSchema = z.object({
|
|
1524
|
+
owner: z.string().describe("Repository owner"),
|
|
1525
|
+
repo: z.string().describe("Repository name"),
|
|
1526
|
+
category: z.string().optional().describe("Discussion category name (for example \"Q&A\" or \"Ideas\") — omit for all categories"),
|
|
1527
|
+
perPage: z.number().optional().default(20).describe("Number of discussions to return (max 100)"),
|
|
1528
|
+
after: z.string().optional().describe("Cursor from a previous call (endCursor) to fetch the next page")
|
|
1529
|
+
});
|
|
1530
|
+
const listDiscussionsDescription = "List discussions in a GitHub repository, most recently updated first, optionally filtered by category (GitHub GraphQL API)";
|
|
1531
|
+
async function listDiscussionsCore({ token, owner, repo, category, perPage, after }) {
|
|
1532
|
+
const octokit = createOctokit(token);
|
|
1533
|
+
let categoryId;
|
|
1534
|
+
if (category) {
|
|
1535
|
+
const { id, available } = await resolveCategoryId(octokit, owner, repo, category);
|
|
1536
|
+
if (!id) return { error: `Unknown discussion category "${category}". Available categories: ${available.join(", ")}` };
|
|
1537
|
+
categoryId = id;
|
|
1538
|
+
}
|
|
1539
|
+
const data = await octokit.graphql(LIST_DISCUSSIONS_QUERY, {
|
|
1540
|
+
owner,
|
|
1541
|
+
name: repo,
|
|
1542
|
+
first: perPage,
|
|
1543
|
+
after,
|
|
1544
|
+
categoryId
|
|
1545
|
+
});
|
|
1546
|
+
if (!data.repository) return { error: `Repository not found, or discussions are disabled on ${owner}/${repo}` };
|
|
1547
|
+
const { pageInfo, nodes } = data.repository.discussions;
|
|
1548
|
+
return {
|
|
1549
|
+
hasNextPage: pageInfo.hasNextPage,
|
|
1550
|
+
endCursor: pageInfo.endCursor,
|
|
1551
|
+
discussions: nodes.map((node) => ({
|
|
1552
|
+
id: node.id,
|
|
1553
|
+
number: node.number,
|
|
1554
|
+
title: node.title,
|
|
1555
|
+
url: node.url,
|
|
1556
|
+
author: node.author?.login ?? null,
|
|
1557
|
+
category: node.category?.name ?? null,
|
|
1558
|
+
answerChosen: node.isAnswered,
|
|
1559
|
+
createdAt: node.createdAt,
|
|
1560
|
+
updatedAt: node.updatedAt
|
|
1561
|
+
}))
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
const getDiscussionInputSchema = z.object({
|
|
1565
|
+
owner: z.string().describe("Repository owner"),
|
|
1566
|
+
repo: z.string().describe("Repository name"),
|
|
1567
|
+
discussionNumber: z.number().describe("Discussion number"),
|
|
1568
|
+
detail: detailSchema
|
|
1569
|
+
});
|
|
1570
|
+
const getDiscussionDescription = "Get a GitHub discussion by number. Body is truncated by default (detail: summary) — set detail full for the complete text (GitHub GraphQL API)";
|
|
1571
|
+
async function getDiscussionCore({ token, owner, repo, discussionNumber, detail = "summary" }) {
|
|
1572
|
+
const discussion = (await createOctokit(token).graphql(GET_DISCUSSION_QUERY, {
|
|
1573
|
+
owner,
|
|
1574
|
+
name: repo,
|
|
1575
|
+
number: discussionNumber
|
|
1576
|
+
})).repository?.discussion;
|
|
1577
|
+
if (!discussion) return { error: `Discussion #${discussionNumber} not found on ${owner}/${repo}` };
|
|
1578
|
+
return {
|
|
1579
|
+
id: discussion.id,
|
|
1580
|
+
number: discussion.number,
|
|
1581
|
+
title: discussion.title,
|
|
1582
|
+
body: applyDetailBody(discussion.body, detail),
|
|
1583
|
+
url: discussion.url,
|
|
1584
|
+
author: discussion.author?.login ?? null,
|
|
1585
|
+
category: discussion.category?.name ?? null,
|
|
1586
|
+
answerChosen: discussion.isAnswered,
|
|
1587
|
+
commentsCount: discussion.comments.totalCount,
|
|
1588
|
+
createdAt: discussion.createdAt,
|
|
1589
|
+
updatedAt: discussion.updatedAt
|
|
1590
|
+
};
|
|
1591
|
+
}
|
|
1592
|
+
const addDiscussionCommentInputSchema = z.object({
|
|
1593
|
+
owner: z.string().describe("Repository owner"),
|
|
1594
|
+
repo: z.string().describe("Repository name"),
|
|
1595
|
+
discussionNumber: z.number().describe("Discussion number"),
|
|
1596
|
+
body: z.string().describe("Comment text (supports Markdown)")
|
|
1597
|
+
});
|
|
1598
|
+
const addDiscussionCommentDescription = "Add a comment to a GitHub discussion (GitHub GraphQL API)";
|
|
1599
|
+
/** Not idempotent — each call adds another comment. */
|
|
1600
|
+
async function addDiscussionCommentCore({ token, owner, repo, discussionNumber, body }) {
|
|
1601
|
+
const octokit = createOctokit(token);
|
|
1602
|
+
const discussionId = (await octokit.graphql(DISCUSSION_ID_QUERY, {
|
|
1603
|
+
owner,
|
|
1604
|
+
name: repo,
|
|
1605
|
+
number: discussionNumber
|
|
1606
|
+
})).repository?.discussion?.id;
|
|
1607
|
+
if (!discussionId) return { error: `Discussion #${discussionNumber} not found on ${owner}/${repo}` };
|
|
1608
|
+
const comment = (await octokit.graphql(ADD_DISCUSSION_COMMENT_MUTATION, {
|
|
1609
|
+
discussionId,
|
|
1610
|
+
body
|
|
1611
|
+
})).addDiscussionComment.comment;
|
|
1612
|
+
return {
|
|
1613
|
+
id: comment.id,
|
|
1614
|
+
url: comment.url,
|
|
1615
|
+
body: comment.body,
|
|
1616
|
+
author: comment.author?.login ?? null,
|
|
1617
|
+
createdAt: comment.createdAt
|
|
1618
|
+
};
|
|
1619
|
+
}
|
|
1620
|
+
//#endregion
|
|
1621
|
+
//#region src/core/notifications.ts
|
|
1622
|
+
const listNotificationsInputSchema = z.object({
|
|
1623
|
+
all: z.boolean().optional().default(false).describe("Include notifications already marked as read"),
|
|
1624
|
+
participating: z.boolean().optional().default(false).describe("Only notifications where the authenticated user is directly participating or mentioned"),
|
|
1625
|
+
perPage: z.number().optional().default(20).describe("Number of notifications to return (max 50)"),
|
|
1626
|
+
page: z.number().optional().default(1).describe("Page number for pagination")
|
|
1627
|
+
});
|
|
1628
|
+
const listNotificationsDescription = "List notification threads for the authenticated user. Unread only by default — set all true to include read threads. Requires a token with notifications access";
|
|
1629
|
+
async function listNotificationsCore({ token, all, participating, perPage, page }) {
|
|
1630
|
+
const { data } = await createOctokit(token).rest.activity.listNotificationsForAuthenticatedUser({
|
|
1631
|
+
all,
|
|
1632
|
+
participating,
|
|
1633
|
+
per_page: perPage,
|
|
1634
|
+
page
|
|
1635
|
+
});
|
|
1636
|
+
return data.map((thread) => ({
|
|
1637
|
+
threadId: thread.id,
|
|
1638
|
+
repository: thread.repository.full_name,
|
|
1639
|
+
subject: {
|
|
1640
|
+
title: thread.subject.title,
|
|
1641
|
+
type: thread.subject.type,
|
|
1642
|
+
url: thread.subject.url
|
|
1643
|
+
},
|
|
1644
|
+
reason: thread.reason,
|
|
1645
|
+
unread: thread.unread,
|
|
1646
|
+
updatedAt: thread.updated_at
|
|
1647
|
+
}));
|
|
1648
|
+
}
|
|
1649
|
+
const markNotificationReadInputSchema = z.object({ threadId: z.string().describe("Notification thread ID (from listNotifications)") });
|
|
1650
|
+
const markNotificationReadDescription = "Mark a single notification thread as read";
|
|
1651
|
+
/** Idempotent — marking an already-read thread is a no-op on GitHub. */
|
|
1652
|
+
async function markNotificationReadCore({ token, threadId }) {
|
|
1653
|
+
await createOctokit(token).rest.activity.markThreadAsRead({ thread_id: Number(threadId) });
|
|
1654
|
+
return {
|
|
1655
|
+
marked: true,
|
|
1656
|
+
threadId
|
|
1657
|
+
};
|
|
1658
|
+
}
|
|
1659
|
+
//#endregion
|
|
1145
1660
|
//#region src/core/search.ts
|
|
1661
|
+
const MAX_FRAGMENT_LENGTH = 300;
|
|
1662
|
+
function truncateFragment(fragment) {
|
|
1663
|
+
if (fragment.length <= MAX_FRAGMENT_LENGTH) return fragment;
|
|
1664
|
+
return `${fragment.slice(0, MAX_FRAGMENT_LENGTH)}…`;
|
|
1665
|
+
}
|
|
1146
1666
|
const searchCodeInputSchema = z.object({
|
|
1147
1667
|
query: z.string().describe("Search query. Supports GitHub search qualifiers, e.g. \"useState repo:facebook/react\""),
|
|
1148
1668
|
perPage: z.number().optional().default(10).describe("Number of results to return (max 30)")
|
|
1149
1669
|
});
|
|
1150
|
-
const searchCodeDescription = "Search for code in GitHub repositories. Use qualifiers like \"repo:owner/name\" to scope the search.";
|
|
1670
|
+
const searchCodeDescription = "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.";
|
|
1151
1671
|
async function searchCodeCore({ token, query, perPage }) {
|
|
1152
1672
|
const { data } = await createOctokit(token).rest.search.code({
|
|
1153
1673
|
q: query,
|
|
1154
|
-
per_page: perPage
|
|
1674
|
+
per_page: perPage,
|
|
1675
|
+
mediaType: { format: "text-match" }
|
|
1155
1676
|
});
|
|
1156
1677
|
return {
|
|
1157
1678
|
totalCount: data.total_count,
|
|
@@ -1160,7 +1681,8 @@ async function searchCodeCore({ token, query, perPage }) {
|
|
|
1160
1681
|
path: item.path,
|
|
1161
1682
|
url: item.html_url,
|
|
1162
1683
|
repository: item.repository.full_name,
|
|
1163
|
-
sha: item.sha
|
|
1684
|
+
sha: item.sha,
|
|
1685
|
+
textMatches: item.text_matches?.map((match) => ({ fragment: truncateFragment(match.fragment ?? "") }))
|
|
1164
1686
|
}))
|
|
1165
1687
|
};
|
|
1166
1688
|
}
|
|
@@ -1197,6 +1719,43 @@ async function searchRepositoriesCore({ token, query, perPage, sort, order }) {
|
|
|
1197
1719
|
}))
|
|
1198
1720
|
};
|
|
1199
1721
|
}
|
|
1722
|
+
const searchIssuesInputSchema = z.object({
|
|
1723
|
+
query: z.string().describe("Search query. Supports GitHub search qualifiers, e.g. \"repo:owner/name is:open label:bug\". Returns both issues and pull requests by default — use type:pr or is:pr to scope to pull requests, or type:issue / is:issue to exclude them"),
|
|
1724
|
+
perPage: z.number().optional().default(10).describe("Number of results to return (max 30)"),
|
|
1725
|
+
sort: z.enum([
|
|
1726
|
+
"comments",
|
|
1727
|
+
"reactions",
|
|
1728
|
+
"created",
|
|
1729
|
+
"updated",
|
|
1730
|
+
"interactions"
|
|
1731
|
+
]).optional().describe("Sort field"),
|
|
1732
|
+
order: z.enum(["asc", "desc"]).optional().default("desc").describe("Sort order")
|
|
1733
|
+
});
|
|
1734
|
+
const searchIssuesDescription = "Search for issues and pull requests across GitHub using search qualifiers like \"repo:owner/name is:open\"";
|
|
1735
|
+
async function searchIssuesCore({ token, query, perPage, sort, order }) {
|
|
1736
|
+
const { data } = await createOctokit(token).rest.search.issuesAndPullRequests({
|
|
1737
|
+
q: query,
|
|
1738
|
+
per_page: perPage,
|
|
1739
|
+
sort,
|
|
1740
|
+
order
|
|
1741
|
+
});
|
|
1742
|
+
return {
|
|
1743
|
+
totalCount: data.total_count,
|
|
1744
|
+
items: data.items.map((item) => ({
|
|
1745
|
+
number: item.number,
|
|
1746
|
+
title: item.title,
|
|
1747
|
+
state: item.state,
|
|
1748
|
+
url: item.html_url,
|
|
1749
|
+
repository: item.repository_url.split("/repos/").at(-1),
|
|
1750
|
+
author: item.user?.login,
|
|
1751
|
+
labels: item.labels.map((l) => typeof l === "string" ? l : l.name),
|
|
1752
|
+
comments: item.comments,
|
|
1753
|
+
createdAt: item.created_at,
|
|
1754
|
+
updatedAt: item.updated_at,
|
|
1755
|
+
isPullRequest: Boolean(item.pull_request)
|
|
1756
|
+
}))
|
|
1757
|
+
};
|
|
1758
|
+
}
|
|
1200
1759
|
//#endregion
|
|
1201
1760
|
//#region src/core/commits.ts
|
|
1202
1761
|
const BLAME_QUERY = `
|
|
@@ -1966,6 +2525,60 @@ async function createReleaseCore({ token, owner, repo, tagName, target, name, bo
|
|
|
1966
2525
|
createdAt: data.created_at
|
|
1967
2526
|
};
|
|
1968
2527
|
}
|
|
2528
|
+
const updateReleaseInputSchema = z.object({
|
|
2529
|
+
owner: z.string().describe("Repository owner"),
|
|
2530
|
+
repo: z.string().describe("Repository name"),
|
|
2531
|
+
releaseId: z.number().describe("Release ID (from listReleases or getLatestRelease)"),
|
|
2532
|
+
tagName: z.string().optional().describe("New tag name for the release"),
|
|
2533
|
+
target: z.string().optional().describe("Branch name or commit SHA to tag"),
|
|
2534
|
+
name: z.string().optional().describe("New release title"),
|
|
2535
|
+
body: z.string().optional().describe("New release notes (supports Markdown)"),
|
|
2536
|
+
draft: z.boolean().optional().describe("Mark as a draft release"),
|
|
2537
|
+
prerelease: z.boolean().optional().describe("Mark as a prerelease")
|
|
2538
|
+
});
|
|
2539
|
+
const updateReleaseDescription = "Update an existing release — tag, target, title, notes, draft, or prerelease status";
|
|
2540
|
+
/** Not idempotent — each call applies a new revision. */
|
|
2541
|
+
async function updateReleaseCore({ token, owner, repo, releaseId, tagName, target, name, body, draft, prerelease }) {
|
|
2542
|
+
const { data } = await createOctokit(token).rest.repos.updateRelease({
|
|
2543
|
+
owner,
|
|
2544
|
+
repo,
|
|
2545
|
+
release_id: releaseId,
|
|
2546
|
+
tag_name: tagName,
|
|
2547
|
+
target_commitish: target,
|
|
2548
|
+
name,
|
|
2549
|
+
body,
|
|
2550
|
+
draft,
|
|
2551
|
+
prerelease
|
|
2552
|
+
});
|
|
2553
|
+
return {
|
|
2554
|
+
id: data.id,
|
|
2555
|
+
tagName: data.tag_name,
|
|
2556
|
+
name: data.name,
|
|
2557
|
+
body: data.body,
|
|
2558
|
+
url: data.html_url,
|
|
2559
|
+
draft: data.draft,
|
|
2560
|
+
prerelease: data.prerelease,
|
|
2561
|
+
publishedAt: data.published_at
|
|
2562
|
+
};
|
|
2563
|
+
}
|
|
2564
|
+
const deleteReleaseInputSchema = z.object({
|
|
2565
|
+
owner: z.string().describe("Repository owner"),
|
|
2566
|
+
repo: z.string().describe("Repository name"),
|
|
2567
|
+
releaseId: z.number().describe("Release ID to delete")
|
|
2568
|
+
});
|
|
2569
|
+
const deleteReleaseDescription = "Delete a release permanently (does not delete the underlying git tag)";
|
|
2570
|
+
/** Not idempotent — deleting an already-deleted release returns 404 from GitHub. */
|
|
2571
|
+
async function deleteReleaseCore({ token, owner, repo, releaseId }) {
|
|
2572
|
+
await createOctokit(token).rest.repos.deleteRelease({
|
|
2573
|
+
owner,
|
|
2574
|
+
repo,
|
|
2575
|
+
release_id: releaseId
|
|
2576
|
+
});
|
|
2577
|
+
return {
|
|
2578
|
+
deleted: true,
|
|
2579
|
+
releaseId
|
|
2580
|
+
};
|
|
2581
|
+
}
|
|
1969
2582
|
//#endregion
|
|
1970
2583
|
//#region src/core/bundles.ts
|
|
1971
2584
|
const getPullRequestContextInputSchema = z.object({
|
|
@@ -2034,13 +2647,13 @@ const getIssueContextInputSchema = z.object({
|
|
|
2034
2647
|
owner: z.string().describe("Repository owner"),
|
|
2035
2648
|
repo: z.string().describe("Repository name"),
|
|
2036
2649
|
issueNumber: z.number().describe("Issue number"),
|
|
2037
|
-
includeLabels: z.boolean().optional().default(true).describe("Include available repository
|
|
2650
|
+
includeLabels: z.boolean().optional().default(true).describe("Include available repository label names for triage (names only — use listLabels for descriptions)"),
|
|
2038
2651
|
includeComments: z.boolean().optional().default(true).describe("Include recent issue comments"),
|
|
2039
|
-
maxComments: z.number().optional().default(
|
|
2040
|
-
detail:
|
|
2652
|
+
maxComments: z.number().optional().default(5).describe("Max recent comments to include (keep small — fetch more only when needed)"),
|
|
2653
|
+
detail: z.enum(["summary", "full"]).optional().default("full").describe("full returns the complete body (default for this one-shot tool); summary truncates to ~500 chars")
|
|
2041
2654
|
});
|
|
2042
|
-
const getIssueContextDescription = "Fetch an issue plus available
|
|
2043
|
-
async function getIssueContextCore({ token, owner, repo, issueNumber, includeLabels, includeComments, maxComments, detail = "
|
|
2655
|
+
const getIssueContextDescription = "Fetch an issue plus available label names and recent comments in one call — prefer this over separate getIssue / listLabels / comment calls when triaging. Call once; do not re-fetch the same issue.";
|
|
2656
|
+
async function getIssueContextCore({ token, owner, repo, issueNumber, includeLabels, includeComments, maxComments, detail = "full" }) {
|
|
2044
2657
|
const [issue, labels, comments] = await Promise.all([
|
|
2045
2658
|
getIssueCore({
|
|
2046
2659
|
token,
|
|
@@ -2068,7 +2681,7 @@ async function getIssueContextCore({ token, owner, repo, issueNumber, includeLab
|
|
|
2068
2681
|
]);
|
|
2069
2682
|
return {
|
|
2070
2683
|
issue,
|
|
2071
|
-
...labels !== void 0 ? { labels } : {},
|
|
2684
|
+
...labels !== void 0 ? { labelNames: labels.map((label) => label.name) } : {},
|
|
2072
2685
|
...comments !== void 0 ? { comments } : {}
|
|
2073
2686
|
};
|
|
2074
2687
|
}
|
|
@@ -2291,7 +2904,8 @@ const PRESET_TOOLS = {
|
|
|
2291
2904
|
*
|
|
2292
2905
|
* Tools: `getPullRequest`, `listPullRequests`, `listPullRequestFiles`, `listPullRequestReviews`, `getPullRequestContext`,
|
|
2293
2906
|
* `getFileContent`, `listCommits`, `getCommit`, `getBlame`, `compareCommits`, `getRepository`, `listBranches`,
|
|
2294
|
-
* `searchCode`, `listCheckRuns`, `getCombinedStatus`, `
|
|
2907
|
+
* `searchCode`, `listCheckRuns`, `getCombinedStatus`, `updatePullRequest`, `addPullRequestComment`, `updatePullRequestComment`,
|
|
2908
|
+
* `deletePullRequestComment`, `createPullRequestReview`, `requestReviewers`.
|
|
2295
2909
|
*
|
|
2296
2910
|
* Agent prompt: optimized for thorough PR review with inline feedback.
|
|
2297
2911
|
*/
|
|
@@ -2311,33 +2925,47 @@ const PRESET_TOOLS = {
|
|
|
2311
2925
|
"searchCode",
|
|
2312
2926
|
"listCheckRuns",
|
|
2313
2927
|
"getCombinedStatus",
|
|
2928
|
+
"updatePullRequest",
|
|
2314
2929
|
"addPullRequestComment",
|
|
2930
|
+
"updatePullRequestComment",
|
|
2931
|
+
"deletePullRequestComment",
|
|
2315
2932
|
"createPullRequestReview",
|
|
2316
2933
|
"requestReviewers"
|
|
2317
2934
|
],
|
|
2318
2935
|
/**
|
|
2319
2936
|
* **Issue triage** — manage and organize GitHub issues.
|
|
2320
2937
|
*
|
|
2321
|
-
* Tools: `listIssues`, `
|
|
2322
|
-
* `
|
|
2938
|
+
* Tools: `listIssues`, `getIssueContext`, `createIssue`, `addIssueComment`, `updateIssueComment`, `deleteIssueComment`,
|
|
2939
|
+
* `closeIssue`, `updateIssue`, `addLabels`, `removeLabel`, `addAssignees`, `removeAssignees`,
|
|
2940
|
+
* `listIssueReactions`, `addIssueReaction`, `listCommentReactions`, `addCommentReaction`, `getRepository`,
|
|
2941
|
+
* `searchRepositories`, `searchCode`, `searchIssues`.
|
|
2323
2942
|
*
|
|
2943
|
+
* Prefer `getIssueContext` (issue + `labelNames` + recent comments) over separate get/list calls.
|
|
2944
|
+
* Reopen a closed issue with `updateIssue` (`state: 'open'`) — there is no separate reopen tool.
|
|
2945
|
+
* Acknowledge a report with `addIssueReaction` / `addCommentReaction` instead of a comment when no reply is needed.
|
|
2324
2946
|
* Agent prompt: optimized for categorizing, labeling, and responding to issues.
|
|
2325
2947
|
*/
|
|
2326
2948
|
"issue-triage": [
|
|
2327
2949
|
"listIssues",
|
|
2328
|
-
"getIssue",
|
|
2329
2950
|
"getIssueContext",
|
|
2330
2951
|
"createIssue",
|
|
2331
2952
|
"addIssueComment",
|
|
2953
|
+
"updateIssueComment",
|
|
2954
|
+
"deleteIssueComment",
|
|
2332
2955
|
"closeIssue",
|
|
2333
|
-
"
|
|
2956
|
+
"updateIssue",
|
|
2334
2957
|
"addLabels",
|
|
2335
2958
|
"removeLabel",
|
|
2336
2959
|
"addAssignees",
|
|
2337
2960
|
"removeAssignees",
|
|
2961
|
+
"listIssueReactions",
|
|
2962
|
+
"addIssueReaction",
|
|
2963
|
+
"listCommentReactions",
|
|
2964
|
+
"addCommentReaction",
|
|
2338
2965
|
"getRepository",
|
|
2339
2966
|
"searchRepositories",
|
|
2340
|
-
"searchCode"
|
|
2967
|
+
"searchCode",
|
|
2968
|
+
"searchIssues"
|
|
2341
2969
|
],
|
|
2342
2970
|
/**
|
|
2343
2971
|
* **CI operations** — monitor and manage GitHub Actions workflows.
|
|
@@ -2367,7 +2995,7 @@ const PRESET_TOOLS = {
|
|
|
2367
2995
|
/**
|
|
2368
2996
|
* **Repository explorer** — read-only access to browse codebases.
|
|
2369
2997
|
*
|
|
2370
|
-
* Tools: all read-only tools including repos, branches, PRs, issues, commits, blame, comparisons,
|
|
2998
|
+
* Tools: all read-only tools including repos, branches, PRs, issues, discussions, commits, blame, comparisons,
|
|
2371
2999
|
* search, gists, workflows, checks, and releases. No write operations.
|
|
2372
3000
|
*
|
|
2373
3001
|
* Agent prompt: optimized for answering questions about code structure and history.
|
|
@@ -2385,6 +3013,8 @@ const PRESET_TOOLS = {
|
|
|
2385
3013
|
"listIssues",
|
|
2386
3014
|
"getIssue",
|
|
2387
3015
|
"getIssueContext",
|
|
3016
|
+
"listDiscussions",
|
|
3017
|
+
"getDiscussion",
|
|
2388
3018
|
"listLabels",
|
|
2389
3019
|
"listCommits",
|
|
2390
3020
|
"getCommit",
|
|
@@ -2392,6 +3022,7 @@ const PRESET_TOOLS = {
|
|
|
2392
3022
|
"compareCommits",
|
|
2393
3023
|
"searchCode",
|
|
2394
3024
|
"searchRepositories",
|
|
3025
|
+
"searchIssues",
|
|
2395
3026
|
"listGists",
|
|
2396
3027
|
"getGist",
|
|
2397
3028
|
"listGistComments",
|
|
@@ -2410,7 +3041,7 @@ const PRESET_TOOLS = {
|
|
|
2410
3041
|
/**
|
|
2411
3042
|
* **Security audit** — review repositories for security risks and report findings.
|
|
2412
3043
|
*
|
|
2413
|
-
* Tools: read-only exploration (`getFileContent`, `getRepositoryTree`, `searchCode`, `listCommits`, `getCommit`,
|
|
3044
|
+
* Tools: read-only exploration (`getFileContent`, `getRepositoryTree`, `searchCode`, `searchIssues`, `listCommits`, `getCommit`,
|
|
2414
3045
|
* `getBlame`, `compareCommits`), PR and CI visibility (`listPullRequests`, `getPullRequest`, `listPullRequestFiles`,
|
|
2415
3046
|
* `getPullRequestContext`, `listCheckRuns`, `getCombinedStatus`, `getCiFailureContext`, `listWorkflows`, `listWorkflowRuns`,
|
|
2416
3047
|
* `getWorkflowRun`, `listWorkflowJobs`), plus `createIssue`, `addIssueComment`, and `addLabels` to report findings.
|
|
@@ -2429,6 +3060,7 @@ const PRESET_TOOLS = {
|
|
|
2429
3060
|
"compareCommits",
|
|
2430
3061
|
"searchCode",
|
|
2431
3062
|
"searchRepositories",
|
|
3063
|
+
"searchIssues",
|
|
2432
3064
|
"listPullRequests",
|
|
2433
3065
|
"getPullRequest",
|
|
2434
3066
|
"listPullRequestFiles",
|
|
@@ -2451,7 +3083,7 @@ const PRESET_TOOLS = {
|
|
|
2451
3083
|
* **Release manager** — prepare and publish GitHub releases.
|
|
2452
3084
|
*
|
|
2453
3085
|
* Tools: `getRepository`, `listBranches`, `listCommits`, `getCommit`, `compareCommits`,
|
|
2454
|
-
* `listReleases`, `getLatestRelease`, `getRelease`, `getReleaseContext`, `createRelease`,
|
|
3086
|
+
* `listReleases`, `getLatestRelease`, `getRelease`, `getReleaseContext`, `createRelease`, `updateRelease`, `deleteRelease`,
|
|
2455
3087
|
* `listWorkflows`, `listWorkflowRuns`, `getWorkflowRun`, `listWorkflowJobs`, `triggerWorkflow`,
|
|
2456
3088
|
* `listPullRequests`, `getPullRequest`.
|
|
2457
3089
|
*
|
|
@@ -2468,6 +3100,8 @@ const PRESET_TOOLS = {
|
|
|
2468
3100
|
"getRelease",
|
|
2469
3101
|
"getReleaseContext",
|
|
2470
3102
|
"createRelease",
|
|
3103
|
+
"updateRelease",
|
|
3104
|
+
"deleteRelease",
|
|
2471
3105
|
"listWorkflows",
|
|
2472
3106
|
"listWorkflowRuns",
|
|
2473
3107
|
"getWorkflowRun",
|
|
@@ -2477,6 +3111,61 @@ const PRESET_TOOLS = {
|
|
|
2477
3111
|
"getPullRequest"
|
|
2478
3112
|
],
|
|
2479
3113
|
/**
|
|
3114
|
+
* **Discussion moderator** — answer and moderate repository Discussions.
|
|
3115
|
+
*
|
|
3116
|
+
* Tools: `listDiscussions`, `getDiscussion`, `addDiscussionComment`,
|
|
3117
|
+
* `getRepository`, `searchIssues`, `getIssueContext`, `addIssueComment`.
|
|
3118
|
+
*
|
|
3119
|
+
* Prefer discussions for Q&A; link related issues with `getIssueContext` / `addIssueComment` when needed.
|
|
3120
|
+
* Agent prompt: optimized for clear, on-topic discussion replies.
|
|
3121
|
+
*/
|
|
3122
|
+
"discussion-moderator": [
|
|
3123
|
+
"listDiscussions",
|
|
3124
|
+
"getDiscussion",
|
|
3125
|
+
"addDiscussionComment",
|
|
3126
|
+
"getRepository",
|
|
3127
|
+
"searchIssues",
|
|
3128
|
+
"getIssueContext",
|
|
3129
|
+
"addIssueComment"
|
|
3130
|
+
],
|
|
3131
|
+
/**
|
|
3132
|
+
* **Notification inbox** — triage authenticated-user notification threads.
|
|
3133
|
+
*
|
|
3134
|
+
* Tools: `listNotifications`, `markNotificationRead`, `getIssue`, `getPullRequest`, `getRepository`.
|
|
3135
|
+
*
|
|
3136
|
+
* Requires a user PAT with the Notifications account permission — not available on Connect installation tokens.
|
|
3137
|
+
* Agent prompt: optimized for clearing inbox noise and following up on actionable threads.
|
|
3138
|
+
*/
|
|
3139
|
+
"notification-inbox": [
|
|
3140
|
+
"listNotifications",
|
|
3141
|
+
"markNotificationRead",
|
|
3142
|
+
"getIssue",
|
|
3143
|
+
"getPullRequest",
|
|
3144
|
+
"getRepository"
|
|
3145
|
+
],
|
|
3146
|
+
/**
|
|
3147
|
+
* **PR author** — open pull requests without the full write surface.
|
|
3148
|
+
*
|
|
3149
|
+
* Tools: `getRepository`, `listBranches`, `getFileContent`, `createBranch`, `createOrUpdateFile`,
|
|
3150
|
+
* `createPullRequest`, `updatePullRequest`, `getPullRequest`, `listPullRequestFiles`,
|
|
3151
|
+
* `compareCommits`, `getCommit`.
|
|
3152
|
+
*
|
|
3153
|
+
* Agent prompt: optimized for branching, editing files, and opening focused PRs.
|
|
3154
|
+
*/
|
|
3155
|
+
"pr-author": [
|
|
3156
|
+
"getRepository",
|
|
3157
|
+
"listBranches",
|
|
3158
|
+
"getFileContent",
|
|
3159
|
+
"createBranch",
|
|
3160
|
+
"createOrUpdateFile",
|
|
3161
|
+
"createPullRequest",
|
|
3162
|
+
"updatePullRequest",
|
|
3163
|
+
"getPullRequest",
|
|
3164
|
+
"listPullRequestFiles",
|
|
3165
|
+
"compareCommits",
|
|
3166
|
+
"getCommit"
|
|
3167
|
+
],
|
|
3168
|
+
/**
|
|
2480
3169
|
* **Maintainer** — full repository maintenance with all read and write tools.
|
|
2481
3170
|
*
|
|
2482
3171
|
* Tools: all tools (same as omitting `preset`).
|
|
@@ -2499,7 +3188,10 @@ const PRESET_TOOLS = {
|
|
|
2499
3188
|
"getPullRequestContext",
|
|
2500
3189
|
"createPullRequest",
|
|
2501
3190
|
"mergePullRequest",
|
|
3191
|
+
"updatePullRequest",
|
|
2502
3192
|
"addPullRequestComment",
|
|
3193
|
+
"updatePullRequestComment",
|
|
3194
|
+
"deletePullRequestComment",
|
|
2503
3195
|
"createPullRequestReview",
|
|
2504
3196
|
"requestReviewers",
|
|
2505
3197
|
"listIssues",
|
|
@@ -2507,18 +3199,31 @@ const PRESET_TOOLS = {
|
|
|
2507
3199
|
"getIssueContext",
|
|
2508
3200
|
"createIssue",
|
|
2509
3201
|
"addIssueComment",
|
|
3202
|
+
"updateIssueComment",
|
|
3203
|
+
"deleteIssueComment",
|
|
2510
3204
|
"closeIssue",
|
|
3205
|
+
"updateIssue",
|
|
2511
3206
|
"listLabels",
|
|
2512
3207
|
"addLabels",
|
|
2513
3208
|
"removeLabel",
|
|
2514
3209
|
"addAssignees",
|
|
2515
3210
|
"removeAssignees",
|
|
3211
|
+
"listIssueReactions",
|
|
3212
|
+
"addIssueReaction",
|
|
3213
|
+
"listCommentReactions",
|
|
3214
|
+
"addCommentReaction",
|
|
3215
|
+
"listDiscussions",
|
|
3216
|
+
"getDiscussion",
|
|
3217
|
+
"addDiscussionComment",
|
|
3218
|
+
"listNotifications",
|
|
3219
|
+
"markNotificationRead",
|
|
2516
3220
|
"listCommits",
|
|
2517
3221
|
"getCommit",
|
|
2518
3222
|
"getBlame",
|
|
2519
3223
|
"compareCommits",
|
|
2520
3224
|
"searchCode",
|
|
2521
3225
|
"searchRepositories",
|
|
3226
|
+
"searchIssues",
|
|
2522
3227
|
"listGists",
|
|
2523
3228
|
"getGist",
|
|
2524
3229
|
"listGistComments",
|
|
@@ -2540,7 +3245,9 @@ const PRESET_TOOLS = {
|
|
|
2540
3245
|
"getLatestRelease",
|
|
2541
3246
|
"getRelease",
|
|
2542
3247
|
"getReleaseContext",
|
|
2543
|
-
"createRelease"
|
|
3248
|
+
"createRelease",
|
|
3249
|
+
"updateRelease",
|
|
3250
|
+
"deleteRelease"
|
|
2544
3251
|
]
|
|
2545
3252
|
};
|
|
2546
3253
|
/**
|
|
@@ -2587,8 +3294,14 @@ const GITHUB_TOOL_NAMES = {
|
|
|
2587
3294
|
createPullRequest: "createPullRequest",
|
|
2588
3295
|
/** Merge a pull request. Requires approval by default. */
|
|
2589
3296
|
mergePullRequest: "mergePullRequest",
|
|
3297
|
+
/** Update a pull request — title, body, state, base branch, or draft status. Requires approval by default. */
|
|
3298
|
+
updatePullRequest: "updatePullRequest",
|
|
2590
3299
|
/** Add a comment to a pull request. Requires approval by default. */
|
|
2591
3300
|
addPullRequestComment: "addPullRequestComment",
|
|
3301
|
+
/** Update the body of a comment on a pull request. Requires approval by default. */
|
|
3302
|
+
updatePullRequestComment: "updatePullRequestComment",
|
|
3303
|
+
/** Delete a comment from a pull request permanently. Requires approval by default. */
|
|
3304
|
+
deletePullRequestComment: "deletePullRequestComment",
|
|
2592
3305
|
/** List files changed in a pull request with status and stats. Patches omitted by default — set includePatch true for diffs. */
|
|
2593
3306
|
listPullRequestFiles: "listPullRequestFiles",
|
|
2594
3307
|
/** List reviews on a pull request (approvals, change requests, and comments). */
|
|
@@ -2603,14 +3316,20 @@ const GITHUB_TOOL_NAMES = {
|
|
|
2603
3316
|
listIssues: "listIssues",
|
|
2604
3317
|
/** Get detailed information about a specific issue. Body truncated by default (detail: summary). */
|
|
2605
3318
|
getIssue: "getIssue",
|
|
2606
|
-
/** Fetch an issue plus available
|
|
3319
|
+
/** Fetch an issue plus available label names and recent comments in one call. */
|
|
2607
3320
|
getIssueContext: "getIssueContext",
|
|
2608
3321
|
/** Create a new issue in a GitHub repository. Requires approval by default. */
|
|
2609
3322
|
createIssue: "createIssue",
|
|
2610
3323
|
/** Add a comment to a GitHub issue. Requires approval by default. */
|
|
2611
3324
|
addIssueComment: "addIssueComment",
|
|
3325
|
+
/** Update the body of a comment on a GitHub issue. Requires approval by default. */
|
|
3326
|
+
updateIssueComment: "updateIssueComment",
|
|
3327
|
+
/** Delete a comment from a GitHub issue permanently. Requires approval by default. */
|
|
3328
|
+
deleteIssueComment: "deleteIssueComment",
|
|
2612
3329
|
/** Close an open GitHub issue. Requires approval by default. */
|
|
2613
3330
|
closeIssue: "closeIssue",
|
|
3331
|
+
/** Update a GitHub issue — title, body, state, labels, milestone, or assignees. Requires approval by default. */
|
|
3332
|
+
updateIssue: "updateIssue",
|
|
2614
3333
|
/** List labels available in a GitHub repository. */
|
|
2615
3334
|
listLabels: "listLabels",
|
|
2616
3335
|
/** Add labels to an issue or pull request. Requires approval by default. */
|
|
@@ -2621,10 +3340,12 @@ const GITHUB_TOOL_NAMES = {
|
|
|
2621
3340
|
addAssignees: "addAssignees",
|
|
2622
3341
|
/** Remove assignees from an issue or pull request. Requires approval by default. */
|
|
2623
3342
|
removeAssignees: "removeAssignees",
|
|
2624
|
-
/** Search for code in GitHub repositories. Use qualifiers like "repo:owner/name" to scope the search. */
|
|
3343
|
+
/** 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. */
|
|
2625
3344
|
searchCode: "searchCode",
|
|
2626
3345
|
/** Search for GitHub repositories by keyword, topic, language, or other qualifiers. */
|
|
2627
3346
|
searchRepositories: "searchRepositories",
|
|
3347
|
+
/** Search for issues and pull requests across GitHub using search qualifiers like "repo:owner/name is:open". */
|
|
3348
|
+
searchIssues: "searchIssues",
|
|
2628
3349
|
/** List commits for a GitHub repository. Filter by file path to see commits that touched a file. For line-by-line attribution at a given ref, use getBlame instead. */
|
|
2629
3350
|
listCommits: "listCommits",
|
|
2630
3351
|
/** Get detailed information about a specific commit, including the list of files changed. Patches omitted by default. */
|
|
@@ -2667,6 +3388,24 @@ const GITHUB_TOOL_NAMES = {
|
|
|
2667
3388
|
getCombinedStatus: "getCombinedStatus",
|
|
2668
3389
|
/** Diagnose CI failures for a ref — combined status, failing checks, and failed workflow jobs in one call. */
|
|
2669
3390
|
getCiFailureContext: "getCiFailureContext",
|
|
3391
|
+
/** List discussions in a GitHub repository, most recently updated first, optionally filtered by category. */
|
|
3392
|
+
listDiscussions: "listDiscussions",
|
|
3393
|
+
/** Get a GitHub discussion by number. Body truncated by default (detail: summary). */
|
|
3394
|
+
getDiscussion: "getDiscussion",
|
|
3395
|
+
/** Add a comment to a GitHub discussion. Requires approval by default. */
|
|
3396
|
+
addDiscussionComment: "addDiscussionComment",
|
|
3397
|
+
/** List notification threads for the authenticated user. Requires a token with notifications access. */
|
|
3398
|
+
listNotifications: "listNotifications",
|
|
3399
|
+
/** Mark a single notification thread as read. Requires approval by default. */
|
|
3400
|
+
markNotificationRead: "markNotificationRead",
|
|
3401
|
+
/** List reactions on an issue or pull request conversation, with per-emoji counts. */
|
|
3402
|
+
listIssueReactions: "listIssueReactions",
|
|
3403
|
+
/** React to an issue or pull request with an emoji. Requires approval by default. */
|
|
3404
|
+
addIssueReaction: "addIssueReaction",
|
|
3405
|
+
/** List reactions on an issue or pull request comment, with per-emoji counts. */
|
|
3406
|
+
listCommentReactions: "listCommentReactions",
|
|
3407
|
+
/** React to an issue or pull request comment with an emoji. Requires approval by default. */
|
|
3408
|
+
addCommentReaction: "addCommentReaction",
|
|
2670
3409
|
/** List releases for a GitHub repository, newest first (includes drafts and prereleases). */
|
|
2671
3410
|
listReleases: "listReleases",
|
|
2672
3411
|
/** Get the latest published release for a GitHub repository (excludes drafts and prereleases). Body truncated by default. */
|
|
@@ -2676,7 +3415,11 @@ const GITHUB_TOOL_NAMES = {
|
|
|
2676
3415
|
/** Fetch a release plus the previous release and tag comparison in one call. */
|
|
2677
3416
|
getReleaseContext: "getReleaseContext",
|
|
2678
3417
|
/** Create a new release (and its tag if needed) in a GitHub repository. Requires approval by default. */
|
|
2679
|
-
createRelease: "createRelease"
|
|
3418
|
+
createRelease: "createRelease",
|
|
3419
|
+
/** Update an existing release — tag, target, title, notes, draft, or prerelease status. Requires approval by default. */
|
|
3420
|
+
updateRelease: "updateRelease",
|
|
3421
|
+
/** Delete a release permanently. Requires approval by default. */
|
|
3422
|
+
deleteRelease: "deleteRelease"
|
|
2680
3423
|
};
|
|
2681
3424
|
const ALL_GITHUB_TOOL_NAMES = Object.values(GITHUB_TOOL_NAMES);
|
|
2682
3425
|
//#endregion
|
|
@@ -2698,8 +3441,14 @@ const GITHUB_WRITE_TOOLS = {
|
|
|
2698
3441
|
createPullRequest: "createPullRequest",
|
|
2699
3442
|
/** Merge a pull request. Requires approval by default. */
|
|
2700
3443
|
mergePullRequest: "mergePullRequest",
|
|
3444
|
+
/** Update a pull request. Requires approval by default. */
|
|
3445
|
+
updatePullRequest: "updatePullRequest",
|
|
2701
3446
|
/** Add a comment to a pull request. Requires approval by default. */
|
|
2702
3447
|
addPullRequestComment: "addPullRequestComment",
|
|
3448
|
+
/** Update a pull request comment. Requires approval by default. */
|
|
3449
|
+
updatePullRequestComment: "updatePullRequestComment",
|
|
3450
|
+
/** Delete a pull request comment. Requires approval by default. */
|
|
3451
|
+
deletePullRequestComment: "deletePullRequestComment",
|
|
2703
3452
|
/** Submit a pull request review with optional inline comments. Requires approval by default. */
|
|
2704
3453
|
createPullRequestReview: "createPullRequestReview",
|
|
2705
3454
|
/** Request reviews from users or teams on a pull request. Requires approval by default. */
|
|
@@ -2708,8 +3457,14 @@ const GITHUB_WRITE_TOOLS = {
|
|
|
2708
3457
|
createIssue: "createIssue",
|
|
2709
3458
|
/** Add a comment to a GitHub issue. Requires approval by default. */
|
|
2710
3459
|
addIssueComment: "addIssueComment",
|
|
3460
|
+
/** Update a GitHub issue comment. Requires approval by default. */
|
|
3461
|
+
updateIssueComment: "updateIssueComment",
|
|
3462
|
+
/** Delete a GitHub issue comment. Requires approval by default. */
|
|
3463
|
+
deleteIssueComment: "deleteIssueComment",
|
|
2711
3464
|
/** Close an open GitHub issue. Requires approval by default. */
|
|
2712
3465
|
closeIssue: "closeIssue",
|
|
3466
|
+
/** Update a GitHub issue. Requires approval by default. */
|
|
3467
|
+
updateIssue: "updateIssue",
|
|
2713
3468
|
/** Add labels to an issue or pull request. Requires approval by default. */
|
|
2714
3469
|
addLabels: "addLabels",
|
|
2715
3470
|
/** Remove a label from an issue or pull request. Requires approval by default. */
|
|
@@ -2726,6 +3481,14 @@ const GITHUB_WRITE_TOOLS = {
|
|
|
2726
3481
|
deleteGist: "deleteGist",
|
|
2727
3482
|
/** Add a comment to a gist. Requires approval by default. */
|
|
2728
3483
|
createGistComment: "createGistComment",
|
|
3484
|
+
/** Add a comment to a GitHub discussion. Requires approval by default. */
|
|
3485
|
+
addDiscussionComment: "addDiscussionComment",
|
|
3486
|
+
/** Mark a single notification thread as read. Requires approval by default. */
|
|
3487
|
+
markNotificationRead: "markNotificationRead",
|
|
3488
|
+
/** React to an issue or pull request with an emoji. Requires approval by default. */
|
|
3489
|
+
addIssueReaction: "addIssueReaction",
|
|
3490
|
+
/** React to an issue or pull request comment with an emoji. Requires approval by default. */
|
|
3491
|
+
addCommentReaction: "addCommentReaction",
|
|
2729
3492
|
/** Trigger a workflow via workflow_dispatch event. Requires approval by default. */
|
|
2730
3493
|
triggerWorkflow: "triggerWorkflow",
|
|
2731
3494
|
/** Cancel an in-progress workflow run. Requires approval by default. */
|
|
@@ -2733,10 +3496,14 @@ const GITHUB_WRITE_TOOLS = {
|
|
|
2733
3496
|
/** Re-run a workflow run, optionally only the failed jobs. Requires approval by default. */
|
|
2734
3497
|
rerunWorkflowRun: "rerunWorkflowRun",
|
|
2735
3498
|
/** Create a new release (and its tag if needed) in a GitHub repository. Requires approval by default. */
|
|
2736
|
-
createRelease: "createRelease"
|
|
3499
|
+
createRelease: "createRelease",
|
|
3500
|
+
/** Update an existing release. Requires approval by default. */
|
|
3501
|
+
updateRelease: "updateRelease",
|
|
3502
|
+
/** Delete a release permanently. Requires approval by default. */
|
|
3503
|
+
deleteRelease: "deleteRelease"
|
|
2737
3504
|
};
|
|
2738
3505
|
Object.values(GITHUB_WRITE_TOOLS);
|
|
2739
3506
|
//#endregion
|
|
2740
|
-
export {
|
|
3507
|
+
export { listWorkflowJobsDescription as $, listLabelsDescription as $n, getFileContentToModelOutput as $r, searchRepositoriesDescription as $t, getLatestReleaseInputSchema as A, addAssigneesInputSchema as An, listPullRequestFilesInputSchema as Ar, listGistsInputSchema as At, getCombinedStatusCore as B, createIssueCore as Bn, requestReviewersCore as Br, getCommitCore as Bt, createReleaseDescription as C, listBranchesCore as Ci, listCommentReactionsDescription as Cn, deletePullRequestCommentDescription as Cr, getGistDescription as Ct, deleteReleaseInputSchema as D, listIssueReactionsInputSchema as Dn, getPullRequestInputSchema as Dr, listGistCommentsInputSchema as Dt, deleteReleaseDescription as E, createOctokit as Ei, listIssueReactionsDescription as En, getPullRequestDescription as Er, listGistCommentsDescription as Et, listReleasesDescription as F, addLabelsDescription as Fn, listPullRequestsDescription as Fr, compareCommitsDescription as Ft, listCheckRunsInputSchema as G, deleteIssueCommentInputSchema as Gn, updatePullRequestCommentInputSchema as Gr, listCommitsInputSchema as Gt, getCombinedStatusInputSchema as H, createIssueInputSchema as Hn, requestReviewersInputSchema as Hr, getCommitInputSchema as Ht, listReleasesInputSchema as I, addLabelsInputSchema as In, listPullRequestsInputSchema as Ir, compareCommitsInputSchema as It, cancelWorkflowRunInputSchema as J, getIssueInputSchema as Jn, updatePullRequestInputSchema as Jr, searchCodeInputSchema as Jt, cancelWorkflowRunCore as K, getIssueCore as Kn, updatePullRequestCore as Kr, searchCodeCore as Kt, updateReleaseCore as L, closeIssueCore as Ln, mergePullRequestCore as Lr, getBlameCore as Lt, getReleaseDescription as M, addIssueCommentDescription as Mn, listPullRequestReviewsDescription as Mr, updateGistDescription as Mt, getReleaseInputSchema as N, addIssueCommentInputSchema as Nn, listPullRequestReviewsInputSchema as Nr, updateGistInputSchema as Nt, getLatestReleaseCore as O, addAssigneesCore as On, listPullRequestFilesCore as Or, listGistsCore as Ot, listReleasesCore as P, addLabelsCore as Pn, listPullRequestsCore as Pr, compareCommitsCore as Pt, listWorkflowJobsCore as Q, listLabelsCore as Qn, getCommitToModelOutput as Qr, searchRepositoriesCore as Qt, updateReleaseDescription as R, closeIssueDescription as Rn, mergePullRequestDescription as Rr, getBlameDescription as Rt, createReleaseCore as S, getRepositoryTreeInputSchema as Si, listCommentReactionsCore as Sn, deletePullRequestCommentCore as Sr, getGistCore as St, deleteReleaseCore as T, listBranchesInputSchema as Ti, listIssueReactionsCore as Tn, getPullRequestCore as Tr, listGistCommentsCore as Tt, listCheckRunsCore as U, deleteIssueCommentCore as Un, updatePullRequestCommentCore as Ur, listCommitsCore as Ut, getCombinedStatusDescription as V, createIssueDescription as Vn, requestReviewersDescription as Vr, getCommitDescription as Vt, listCheckRunsDescription as W, deleteIssueCommentDescription as Wn, updatePullRequestCommentDescription as Wr, listCommitsDescription as Wt, getWorkflowRunDescription as X, listIssuesDescription as Xn, resolveGithubToken as Xr, searchIssuesDescription as Xt, getWorkflowRunCore as Y, listIssuesCore as Yn, createGithubTokenResolver as Yr, searchIssuesCore as Yt, getWorkflowRunInputSchema as Z, listIssuesInputSchema as Zn, compareCommitsToModelOutput as Zr, searchIssuesInputSchema as Zt, getPullRequestContextDescription as _, getRepositoryCore as _i, addCommentReactionDescription as _n, createPullRequestDescription as _r, createGistDescription as _t, resolvePresetTools as a, createOrUpdateFileCore as ai, markNotificationReadDescription as an, removeLabelDescription as ar, listWorkflowsDescription as at, getReleaseContextDescription as b, getRepositoryTreeCore as bi, addIssueReactionDescription as bn, createPullRequestReviewDescription as br, deleteGistDescription as bt, mergeContextArgs as c, createRepositoryCore as ci, addDiscussionCommentDescription as cn, updateIssueCommentDescription as cr, rerunWorkflowRunDescription as ct, getCiFailureContextDescription as d, forkRepositoryCore as di, getDiscussionDescription as dn, updateIssueDescription as dr, triggerWorkflowDescription as dt, getPullRequestContextToModelOutput as ei, searchRepositoriesInputSchema as en, listLabelsInputSchema as er, listWorkflowJobsInputSchema as et, getCiFailureContextInputSchema as f, forkRepositoryDescription as fi, getDiscussionInputSchema as fn, updateIssueInputSchema as fr, triggerWorkflowInputSchema as ft, getPullRequestContextCore as g, getFileContentInputSchema as gi, addCommentReactionCore as gn, createPullRequestCore as gr, createGistCore as gt, getIssueContextInputSchema as h, getFileContentDescription as hi, listDiscussionsInputSchema as hn, addPullRequestCommentInputSchema as hr, createGistCommentInputSchema as ht, PRESET_TOOLS as i, createBranchInputSchema as ii, markNotificationReadCore as in, removeLabelCore as ir, listWorkflowsCore as it, getReleaseCore as j, addIssueCommentCore as jn, listPullRequestReviewsCore as jr, updateGistCore as jt, getLatestReleaseDescription as k, addAssigneesDescription as kn, listPullRequestFilesDescription as kr, listGistsDescription as kt, softenContextSchema as l, createRepositoryDescription as li, addDiscussionCommentInputSchema as ln, updateIssueCommentInputSchema as lr, rerunWorkflowRunInputSchema as lt, getIssueContextDescription as m, getFileContentCore as mi, listDiscussionsDescription as mn, addPullRequestCommentDescription as mr, createGistCommentDescription as mt, ALL_GITHUB_TOOL_NAMES as n, createBranchCore as ni, listNotificationsDescription as nn, removeAssigneesDescription as nr, listWorkflowRunsDescription as nt, bindToolsContext as o, createOrUpdateFileDescription as oi, markNotificationReadInputSchema as on, removeLabelInputSchema as or, listWorkflowsInputSchema as ot, getIssueContextCore as p, forkRepositoryInputSchema as pi, listDiscussionsCore as pn, addPullRequestCommentCore as pr, createGistCommentCore as pt, cancelWorkflowRunDescription as q, getIssueDescription as qn, updatePullRequestDescription as qr, searchCodeDescription as qt, GITHUB_TOOL_NAMES as r, createBranchDescription as ri, listNotificationsInputSchema as rn, removeAssigneesInputSchema as rr, listWorkflowRunsInputSchema as rt, formatContextInstructions as s, createOrUpdateFileInputSchema as si, addDiscussionCommentCore as sn, updateIssueCommentCore as sr, rerunWorkflowRunCore as st, GITHUB_WRITE_TOOLS as t, listPullRequestFilesToModelOutput as ti, listNotificationsCore as tn, removeAssigneesCore as tr, listWorkflowRunsCore as tt, getCiFailureContextCore as u, createRepositoryInputSchema as ui, getDiscussionCore as un, updateIssueCore as ur, triggerWorkflowCore as ut, getPullRequestContextInputSchema as v, getRepositoryDescription as vi, addCommentReactionInputSchema as vn, createPullRequestInputSchema as vr, createGistInputSchema as vt, createReleaseInputSchema as w, listBranchesDescription as wi, listCommentReactionsInputSchema as wn, deletePullRequestCommentInputSchema as wr, getGistInputSchema as wt, getReleaseContextInputSchema as x, getRepositoryTreeDescription as xi, addIssueReactionInputSchema as xn, createPullRequestReviewInputSchema as xr, deleteGistInputSchema as xt, getReleaseContextCore as y, getRepositoryInputSchema as yi, addIssueReactionCore as yn, createPullRequestReviewCore as yr, deleteGistCore as yt, updateReleaseInputSchema as z, closeIssueInputSchema as zn, mergePullRequestInputSchema as zr, getBlameInputSchema as zt };
|
|
2741
3508
|
|
|
2742
|
-
//# sourceMappingURL=write-tools-
|
|
3509
|
+
//# sourceMappingURL=write-tools-uIVfURVp.mjs.map
|