@github-tools/sdk 1.19.0 → 1.21.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.
Files changed (64) hide show
  1. package/README.md +97 -30
  2. package/dist/approval-policy-CEMMPq92.mjs +17 -0
  3. package/dist/approval-policy-CEMMPq92.mjs.map +1 -0
  4. package/dist/connect/eve.d.mts +2 -2
  5. package/dist/connect/eve.d.mts.map +1 -1
  6. package/dist/connect/eve.mjs +1 -1
  7. package/dist/connect.d.mts +15 -24
  8. package/dist/connect.d.mts.map +1 -1
  9. package/dist/connect.mjs +2 -2
  10. package/dist/{cores-BeLZwcde.mjs → cores-meFAMt2D.mjs} +41 -2
  11. package/dist/cores-meFAMt2D.mjs.map +1 -0
  12. package/dist/{tool-types-CrC80SIL.d.mts → dry-run-DXckOam2.d.mts} +437 -54
  13. package/dist/dry-run-DXckOam2.d.mts.map +1 -0
  14. package/dist/evaluation-DJHINyAu.mjs +311 -0
  15. package/dist/evaluation-DJHINyAu.mjs.map +1 -0
  16. package/dist/{eve-runtime-DRh2QJI7.d.mts → eve-runtime-B_CJE9JV.d.mts} +21 -7
  17. package/dist/eve-runtime-B_CJE9JV.d.mts.map +1 -0
  18. package/dist/{eve-runtime-YTxfrWP-.mjs → eve-runtime-DPzMPCLt.mjs} +49 -15
  19. package/dist/eve-runtime-DPzMPCLt.mjs.map +1 -0
  20. package/dist/eve-runtime.d.mts +5 -5
  21. package/dist/eve-runtime.mjs +4 -4
  22. package/dist/eve.d.mts +95 -4
  23. package/dist/eve.d.mts.map +1 -1
  24. package/dist/eve.mjs +94 -3
  25. package/dist/eve.mjs.map +1 -1
  26. package/dist/{index-DkZvveZP.d.mts → index-CzzrtCVj.d.mts} +119 -348
  27. package/dist/index-CzzrtCVj.d.mts.map +1 -0
  28. package/dist/index.d.mts +3 -3
  29. package/dist/index.mjs +4 -3
  30. package/dist/{interrupts-C_lUXMdd.d.mts → interrupts-BSDPwdJ2.d.mts} +2 -2
  31. package/dist/interrupts-BSDPwdJ2.d.mts.map +1 -0
  32. package/dist/{src-Bx5p1Unc.mjs → src-BlhrSieS.mjs} +491 -23
  33. package/dist/src-BlhrSieS.mjs.map +1 -0
  34. package/dist/tanstack/interrupts.d.mts +1 -1
  35. package/dist/tanstack.d.mts +1705 -204
  36. package/dist/tanstack.d.mts.map +1 -1
  37. package/dist/tanstack.mjs +53 -19
  38. package/dist/tanstack.mjs.map +1 -1
  39. package/dist/{token-Bh8nPj66.mjs → token-BLps09gm.mjs} +36 -116
  40. package/dist/token-BLps09gm.mjs.map +1 -0
  41. package/dist/{types-BmwOpI5-.d.mts → types-Bln8U42J.d.mts} +3 -3
  42. package/dist/{types-BmwOpI5-.d.mts.map → types-Bln8U42J.d.mts.map} +1 -1
  43. package/dist/{types-CPAsEMzx.d.mts → types-C7O2lwwz.d.mts} +14 -2
  44. package/dist/{types-CPAsEMzx.d.mts.map → types-C7O2lwwz.d.mts.map} +1 -1
  45. package/dist/workflow.d.mts +41 -40
  46. package/dist/workflow.d.mts.map +1 -1
  47. package/dist/workflow.mjs +20 -47
  48. package/dist/workflow.mjs.map +1 -1
  49. package/dist/{write-tools-BaoTUCg7.mjs → write-tools-w-8tjnDQ.mjs} +1360 -124
  50. package/dist/write-tools-w-8tjnDQ.mjs.map +1 -0
  51. package/package.json +4 -6
  52. package/dist/cores-BeLZwcde.mjs.map +0 -1
  53. package/dist/evaluation-f-2QwBid.mjs +0 -210
  54. package/dist/evaluation-f-2QwBid.mjs.map +0 -1
  55. package/dist/eve-runtime-DRh2QJI7.d.mts.map +0 -1
  56. package/dist/eve-runtime-YTxfrWP-.mjs.map +0 -1
  57. package/dist/index-DkZvveZP.d.mts.map +0 -1
  58. package/dist/instructions-BuypoY0x.mjs +0 -148
  59. package/dist/instructions-BuypoY0x.mjs.map +0 -1
  60. package/dist/interrupts-C_lUXMdd.d.mts.map +0 -1
  61. package/dist/src-Bx5p1Unc.mjs.map +0 -1
  62. package/dist/token-Bh8nPj66.mjs.map +0 -1
  63. package/dist/tool-types-CrC80SIL.d.mts.map +0 -1
  64. package/dist/write-tools-BaoTUCg7.mjs.map +0 -1
package/README.md CHANGED
@@ -34,7 +34,7 @@ They all reach the GitHub API, but none of them were built as an agent's tool la
34
34
  | Production agents that must survive restarts and timeouts | [Durable Agents](#durable-agents-vercel-workflow-sdk) |
35
35
  | A GitHub, Slack, or Discord bot | [Chat SDK docs](https://github-tools.com/frameworks/chat-sdk) |
36
36
 
37
- 84 tools cover repositories, branches, pull requests, issues, reactions, discussions, notifications, commits, releases, checks and statuses, search, gists, and workflows. See the full [Tools Catalog](https://github-tools.com/api/tools-catalog). Write operations support granular approval control out of the box.
37
+ 97 tools cover repositories, branches, pull requests, issues, reactions, discussions, notifications, commits, releases, checks and statuses, search, gists, and workflows. See the full [Tools Catalog](https://github-tools.com/api/tools-catalog). Write operations support granular approval control out of the box.
38
38
 
39
39
  ## Installation
40
40
 
@@ -103,20 +103,20 @@ createGithubTools({ token, preset: ['code-review', 'issue-triage'] })
103
103
 
104
104
  | Preset | Tools included |
105
105
  |---|---|
106
- | `code-review` | `getPullRequest`, `listPullRequests`, `listPullRequestFiles`, `listPullRequestReviews`, `listPullRequestReviewThreads`, `getPullRequestContext`, `getFileContent`, `listCommits`, `getCommit`, `getBlame`, `compareCommits`, `getRepository`, `listBranches`, `searchCode`, `listCheckRuns`, `getCombinedStatus`, `updatePullRequest`, `addPullRequestComment`, `updatePullRequestComment`, `deletePullRequestComment`, `createPullRequestReview`, `replyToReviewComment`, `resolveReviewThread`, `requestReviewers` |
107
- | `issue-triage` | `listIssues`, `getIssueContext`, `listIssueComments`, `createIssue`, `addIssueComment`, `updateIssueComment`, `deleteIssueComment`, `closeIssue`, `updateIssue`, `addLabels`, `removeLabel`, `createLabel`, `updateLabel`, `deleteLabel`, `addAssignees`, `removeAssignees`, `listIssueReactions`, `addIssueReaction`, `listCommentReactions`, `addCommentReaction`, `getRepository`, `searchRepositories`, `searchCode`, `searchIssues` |
106
+ | `code-review` | `getPullRequest`, `listPullRequests`, `listPullRequestFiles`, `listPullRequestReviews`, `listPullRequestReviewThreads`, `getPullRequestContext`, `getCommit`, `getBlame`, `compareCommits`, `getRepository`, `getFileContent`, `getRepositoryTree`, `searchCode`, `listCommits`, `listBranches`, `getBranchRules`, `getCollaboratorPermission`, `listCheckRuns`, `getCombinedStatus`, `updatePullRequest`, `addPullRequestComment`, `updatePullRequestComment`, `deletePullRequestComment`, `createPullRequestReview`, `replyToReviewComment`, `resolveReviewThread`, `requestReviewers`, `createCommitStatus` |
107
+ | `issue-triage` | `listIssues`, `getIssueContext`, `listIssueComments`, `createIssue`, `addIssueComment`, `updateIssueComment`, `deleteIssueComment`, `closeIssue`, `updateIssue`, `addLabels`, `removeLabel`, `createLabel`, `updateLabel`, `deleteLabel`, `addAssignees`, `removeAssignees`, `listMilestones`, `listSubIssues`, `addSubIssue`, `listIssueReactions`, `addIssueReaction`, `listCommentReactions`, `addCommentReaction`, `getRepository`, `getFileContent`, `getRepositoryTree`, `searchCode`, `listCommits`, `searchRepositories`, `searchIssues`, `getPullRequest`, `getCollaboratorPermission` |
108
108
  | `repo-explorer` | All read-only tools including discussions, gists, workflows, checks/statuses, and releases (no write operations) |
109
- | `ci-ops` | `listWorkflows`, `listWorkflowRuns`, `getWorkflowRun`, `listWorkflowJobs`, `getWorkflowJobLogs`, `listCheckRuns`, `getCombinedStatus`, `getCiFailureContext`, `triggerWorkflow`, `cancelWorkflowRun`, `rerunWorkflowRun`, `getRepository`, `listBranches`, `listCommits`, `getCommit` |
110
- | `security-audit` | Read-only exploration (`getFileContent`, `getRepositoryTree`, `searchCode`, `listCommits`, `getCommit`, `getBlame`, `compareCommits`), PR and CI visibility (including `getWorkflowJobLogs`), plus `createIssue`, `addIssueComment`, `addLabels` to report findings (no destructive writes) |
111
- | `release-manager` | `listReleases`, `getLatestRelease`, `getRelease`, `getReleaseContext`, `createRelease`, `updateRelease`, `deleteRelease`, `compareCommits`, `listCommits`, `getCommit`, `listWorkflowRuns`, `getWorkflowRun`, `listPullRequests`, `getPullRequest`, `getRepository`, `listBranches` |
112
- | `discussion-moderator` | `listDiscussions`, `getDiscussion`, `addDiscussionComment`, `getRepository`, `searchIssues`, `getIssueContext`, `addIssueComment` |
113
- | `notification-inbox` | `listNotifications`, `markNotificationRead`, `getIssue`, `getPullRequest`, `getRepository` (requires a Notifications PAT) |
114
- | `pr-author` | `getRepository`, `listBranches`, `getFileContent`, `createBranch`, `deleteBranch`, `createOrUpdateFile`, `createPullRequest`, `updatePullRequest`, `getPullRequest`, `listPullRequestFiles`, `listPullRequestReviewThreads`, `replyToReviewComment`, `resolveReviewThread`, `compareCommits`, `getCommit` |
115
- | `maintainer` | All 84 tools |
109
+ | `ci-ops` | `getRepository`, `getFileContent`, `getRepositoryTree`, `searchCode`, `listCommits`, `listBranches`, `getBranchRules`, `getCommit`, `getPullRequest`, `listWorkflows`, `listWorkflowRuns`, `getWorkflowRun`, `listWorkflowJobs`, `getWorkflowJobLogs`, `listCheckRuns`, `getCombinedStatus`, `getCiFailureContext`, `triggerWorkflow`, `cancelWorkflowRun`, `rerunWorkflowRun`, `createCommitStatus` |
110
+ | `security-audit` | Read-only exploration (`getFileContent`, `getRepositoryTree`, `searchCode`, `listCommits`, `getCommit`, `getBlame`, `compareCommits`), PR and CI visibility (including `getWorkflowJobLogs`), the repository's code scanning, Dependabot and secret scanning alerts, plus `createIssue`, `addIssueComment`, `addLabels` to report findings (no destructive writes) |
111
+ | `release-manager` | `getRepository`, `getFileContent`, `getRepositoryTree`, `searchCode`, `listCommits`, `listBranches`, `getCommit`, `compareCommits`, `listReleases`, `getLatestRelease`, `getRelease`, `getReleaseContext`, `createRelease`, `updateRelease`, `deleteRelease`, `listWorkflows`, `listWorkflowRuns`, `getWorkflowRun`, `listWorkflowJobs`, `triggerWorkflow`, `getCombinedStatus`, `getCiFailureContext`, `listPullRequests`, `getPullRequest` |
112
+ | `discussion-moderator` | `listDiscussions`, `getDiscussion`, `addDiscussionComment`, `getRepository`, `getFileContent`, `getRepositoryTree`, `searchCode`, `listCommits`, `searchIssues`, `getIssueContext`, `addIssueComment` |
113
+ | `notification-inbox` | `listNotifications`, `markNotificationRead`, `getRepository`, `getFileContent`, `getRepositoryTree`, `searchCode`, `listCommits`, `getIssue`, `getIssueContext`, `getPullRequest`, `getDiscussion` (requires a Notifications PAT) |
114
+ | `pr-author` | `getRepository`, `getFileContent`, `getRepositoryTree`, `searchCode`, `listCommits`, `listBranches`, `getBranchRules`, `getCollaboratorPermission`, `createBranch`, `deleteBranch`, `createOrUpdateFile`, `editFiles`, `createPullRequest`, `updatePullRequest`, `updatePullRequestBranch`, `listPullRequests`, `getPullRequest`, `listPullRequestFiles`, `listPullRequestReviewThreads`, `replyToReviewComment`, `resolveReviewThread`, `compareCommits`, `getCommit` |
115
+ | `maintainer` | All 97 tools |
116
116
 
117
117
  Start with the smallest preset that fits. Use `maintainer` or omit `preset` when you need the full catalog. Full breakdown: [Tools Catalog](https://github-tools.com/api/tools-catalog).
118
118
 
119
- For an agent that handles open-ended requests, `createGithubAgent({ model, preset: 'auto' })` picks presets per call from the latest user message. It narrows the tools the model sees to at most two presets and uses the matching system prompt. When no preset clearly matches, it uses the most likely one, and read-only `repo-explorer` when nothing stands out, so the full catalog is never exposed. This needs `ai` 7.0.105 or later.
119
+ For an agent that handles open-ended requests, `createGithubAgent({ model, preset: 'auto' })` asks a fast evaluation model which tools the conversation's first request needs. It lists those and the core read tools for the whole conversation, and adds a `callGithubTool` tool the model can use to call any other GitHub tool without changing the tool list, so the provider's prompt cache holds. `evaluation: { selection: 'presets' }` routes each request to at most two presets instead and uses their system prompts. This needs `ai` 7.0.105 or later.
120
120
 
121
121
  ### Cherry-Picking Tools
122
122
 
@@ -137,7 +137,7 @@ Each tool factory accepts a `token` string. Tools use named module-level step fu
137
137
 
138
138
  ## Approval Control
139
139
 
140
- Write operations (creating issues, merging PRs, pushing files, …) require user approval by default. This is designed for human-in-the-loop agent workflows.
140
+ Write operations (creating issues, merging PRs, pushing files, …) require user approval by default. This is designed for human-in-the-loop agent workflows. When the client sends the conversation back on each request, as with `useChat`, also pass `experimental_toolApprovalSecret` so a client can't forge an approval: see [Sign approvals](https://github-tools.com/guide/approval-control#sign-approvals).
141
141
 
142
142
  ```ts
143
143
  // All writes need approval (default)
@@ -164,12 +164,36 @@ createGithubTools({
164
164
  })
165
165
  ```
166
166
 
167
- Write tools: `createBranch`, `deleteBranch`, `forkRepository`, `createRepository`, `createOrUpdateFile`, `createPullRequest`, `mergePullRequest`, `updatePullRequest`, `addPullRequestComment`, `updatePullRequestComment`, `deletePullRequestComment`, `createPullRequestReview`, `replyToReviewComment`, `resolveReviewThread`, `requestReviewers`, `createIssue`, `addIssueComment`, `updateIssueComment`, `deleteIssueComment`, `closeIssue`, `updateIssue`, `addLabels`, `removeLabel`, `createLabel`, `updateLabel`, `deleteLabel`, `addAssignees`, `removeAssignees`, `addIssueReaction`, `addCommentReaction`, `addDiscussionComment`, `markNotificationRead`, `createGist`, `updateGist`, `deleteGist`, `createGistComment`, `triggerWorkflow`, `cancelWorkflowRun`, `rerunWorkflowRun`, `createRelease`, `updateRelease`, `deleteRelease`.
167
+ Write tools: `createBranch`, `deleteBranch`, `forkRepository`, `createRepository`, `createOrUpdateFile`, `editFiles`, `createPullRequest`, `mergePullRequest`, `enablePullRequestAutoMerge`, `disablePullRequestAutoMerge`, `updatePullRequest`, `updatePullRequestBranch`, `addPullRequestComment`, `updatePullRequestComment`, `deletePullRequestComment`, `createPullRequestReview`, `replyToReviewComment`, `resolveReviewThread`, `requestReviewers`, `createIssue`, `addIssueComment`, `updateIssueComment`, `deleteIssueComment`, `closeIssue`, `updateIssue`, `addLabels`, `removeLabel`, `createLabel`, `updateLabel`, `deleteLabel`, `addAssignees`, `removeAssignees`, `addSubIssue`, `addIssueReaction`, `addCommentReaction`, `addDiscussionComment`, `markNotificationRead`, `createGist`, `updateGist`, `deleteGist`, `createGistComment`, `triggerWorkflow`, `cancelWorkflowRun`, `rerunWorkflowRun`, `createCommitStatus`, `createRelease`, `updateRelease`, `deleteRelease`.
168
168
 
169
169
  All other tools are read-only and never require approval.
170
170
 
171
171
  With `'auto'`, a fast evaluation model checks each call to a low-risk write tool (`AUTO_APPROVAL_TOOLS`). It scores how costly the call would be if wrong, and whether the latest user message asked for it. The call runs without a prompt only when both checks pass. Other write tools keep requiring approval. Any tool can opt in per tool (`{ updateIssue: 'auto' }`). `'auto'` needs `ai` 7.0.105 or later and is not available on the durable agent. Tune it with `evaluation: { maxRisk, minIntent, model }`. The default model is TypeSafe's Jev.
172
172
 
173
+ ### Guardrails
174
+
175
+ Approval decides whether a call runs. `guardrails` decide where any call may act, whoever approves it:
176
+
177
+ ```ts
178
+ createGithubTools({
179
+ token,
180
+ guardrails: {
181
+ repositories: ['vercel-labs/*'], // 'owner/repo' or 'owner/*'; a call to any other repository fails
182
+ branches: ['agent/*'], // commits, branch creation and deletion, merges, and pull request branch updates must target a matching branch
183
+ },
184
+ })
185
+ ```
186
+
187
+ The checks run before any request reaches GitHub, and a blocked call fails with `github_tools.GUARDRAIL_BLOCKED` and a reason the model can act on. Even without `guardrails`, a call whose input contains what looks like a credential (a GitHub, npm, Slack, Stripe, Anthropic, OpenAI, Google or AWS key, or a private key) fails; set `guardrails: { secrets: 'allow' }` to turn that off. `createGithubAgent` denies a blocked write instead of asking for approval. Tools without a repository target (search, gists, notifications) aren't restricted. For tools built from individual factories, wrap the token with `withGithubGuardrails(token, guardrails)`. See [Guardrails](https://github-tools.com/guide/approval-control#guardrails).
188
+
189
+ ### Shadow mode
190
+
191
+ `dryRun: true` runs reads as usual, but no write reaches GitHub and nobody is asked to approve one. Each write goes through `guardrails`, then returns `{ dryRun: true, tool, input, approval, message }`, where `approval` says whether a person would have been asked. Use it to roll out a bot that runs on its own, test against real data, or compare models, before letting it write. It fits writes that stand on their own (labels, comments, reviews), not chains where a later step needs an earlier write's result. See [Shadow mode](https://github-tools.com/guide/approval-control#shadow-mode).
192
+
193
+ ### Text from GitHub
194
+
195
+ Tool results drop HTML comments and invisible Unicode characters from issue, pull request, comment, review, release and discussion bodies, since a rendered page hides them but a model reads them. The default agent prompts tell the model to treat GitHub text as data and act only on what the user asked. See [Text from GitHub](https://github-tools.com/guide/approval-control#text-from-github).
196
+
173
197
  ### Tool overrides
174
198
 
175
199
  The `overrides` option lets you customize any AI SDK [`tool()`](https://ai-sdk.dev/docs/ai-sdk-core/tools-and-tool-calling) property on a per-tool basis, keyed by tool name.
@@ -216,7 +240,7 @@ In the eve extension, a failing tool returns `{ error: { code, message, why, fix
216
240
 
217
241
  ## Commit Attribution
218
242
 
219
- Control how commits are attributed when using `createOrUpdateFile` or `mergePullRequest`:
243
+ Control how commits are attributed when using `createOrUpdateFile`, `editFiles` or `mergePullRequest`:
220
244
 
221
245
  ```ts
222
246
  import { createGithubTools } from '@github-tools/sdk'
@@ -483,6 +507,7 @@ eve replays completed steps but re-runs steps interrupted mid-execution. Write t
483
507
  | Tool | Idempotency |
484
508
  |---|---|
485
509
  | `createOrUpdateFile` | Natural when content + `sha` unchanged (skips no-op updates) |
510
+ | `editFiles` | Not idempotent: a re-run whose `find` text was already replaced fails with "not found" instead of committing twice |
486
511
  | `closeIssue` | Natural when already closed |
487
512
  | `createBranch` | Natural when branch exists at same SHA |
488
513
  | `removeAssignees` | Natural: removing an assignee that isn't assigned is a no-op on GitHub |
@@ -523,6 +548,8 @@ List tools return `{ items, hasMore, page, perPage, nextPage? }` (or add those f
523
548
  |---|---|
524
549
  | `getRepository` | Get repository metadata (stars, language, default branch, …) |
525
550
  | `listBranches` | List branches (`hasMore` / `nextPage` when there are more) |
551
+ | `getBranchRules` | List a branch's required checks, required reviews and other protection rules |
552
+ | `getCollaboratorPermission` | Get a user's permission and role on a repository, to check whether they may trigger the bot or approve an action |
526
553
  | `getFileContent` | Read a file or directory listing (prefer `startLine`/`endLine` or `maxLines` for large files) |
527
554
  | `getRepositoryTree` | List the file and directory structure at a given ref (prefer a `path` prefix over `recursive: true`) |
528
555
  | `createBranch` | Create a new branch from an existing branch or commit SHA |
@@ -530,6 +557,7 @@ List tools return `{ items, hasMore, page, perPage, nextPage? }` (or add those f
530
557
  | `forkRepository` | Fork a repository to a user or organization |
531
558
  | `createRepository` | Create a new repository for a user or organization |
532
559
  | `createOrUpdateFile` | Create or update a file and commit it |
560
+ | `editFiles` | Edit files in one commit by exact text replacement or whole contents, create the branch if needed, and optionally open a pull request |
533
561
 
534
562
  ### Pull Requests
535
563
 
@@ -540,14 +568,17 @@ List tools return `{ items, hasMore, page, perPage, nextPage? }` (or add those f
540
568
  | `listPullRequestFiles` | List files changed in a PR (patches omitted by default; set `includePatch` / `filenames` for diffs) |
541
569
  | `listPullRequestReviews` | List reviews on a PR (approvals, change requests, comments) |
542
570
  | `listPullRequestReviewThreads` | List review threads with comments, resolution state, and reply/resolve IDs (unresolved only by default) |
543
- | `getPullRequestContext` | Fetch PR details plus files, reviews, and optional CI checks in one call |
571
+ | `getPullRequestContext` | Fetch PR details plus files, reviews, optional CI checks, and optionally the issues it closes, in one call |
544
572
  | `createPullRequest` | Open a new PR |
545
573
  | `mergePullRequest` | Merge a PR (merge, squash, or rebase) |
574
+ | `enablePullRequestAutoMerge` | Merge a PR automatically once its required checks and reviews pass |
575
+ | `disablePullRequestAutoMerge` | Cancel a pending auto-merge |
546
576
  | `updatePullRequest` | Update a PR's title, body, state, base branch, or draft status |
577
+ | `updatePullRequestBranch` | Bring a PR branch up to date by merging its base branch into it |
547
578
  | `addPullRequestComment` | Post a comment on a PR |
548
579
  | `updatePullRequestComment` | Edit the body of a PR comment |
549
580
  | `deletePullRequestComment` | Permanently delete a PR comment |
550
- | `createPullRequestReview` | Submit a formal review (approve, request changes, or comment) with inline comments |
581
+ | `createPullRequestReview` | Submit a formal review (approve, request changes, or comment) with inline comments on a line or a range of lines, including suggested changes |
551
582
  | `replyToReviewComment` | Reply to a review comment in its thread |
552
583
  | `resolveReviewThread` | Mark a review thread as resolved |
553
584
  | `requestReviewers` | Request reviews from users or teams on a PR |
@@ -560,7 +591,7 @@ List tools return `{ items, hasMore, page, perPage, nextPage? }` (or add those f
560
591
  | `getIssue` | Get an issue's details (body truncated by default; set `detail: full` for complete text) |
561
592
  | `getIssueContext` | Fetch an issue plus label names and recent comments in one call |
562
593
  | `listIssueComments` | List comments on an issue (paginated; prefer `getIssueContext` for the first page) |
563
- | `createIssue` | Open a new issue |
594
+ | `createIssue` | Open a new issue, optionally in a milestone |
564
595
  | `addIssueComment` | Post a comment on an issue |
565
596
  | `updateIssueComment` | Edit the body of an issue comment |
566
597
  | `deleteIssueComment` | Permanently delete an issue comment |
@@ -574,6 +605,9 @@ List tools return `{ items, hasMore, page, perPage, nextPage? }` (or add those f
574
605
  | `deleteLabel` | Delete a label from a repository permanently |
575
606
  | `addAssignees` | Assign users to an issue or pull request |
576
607
  | `removeAssignees` | Remove assignees from an issue or pull request |
608
+ | `listMilestones` | List milestones with their due dates and open and closed issue counts |
609
+ | `listSubIssues` | List the sub-issues of an issue |
610
+ | `addSubIssue` | Add an existing issue as a sub-issue, from the same repository or another one with the same owner |
577
611
 
578
612
  ### Reactions
579
613
 
@@ -632,7 +666,8 @@ Pull request conversations share the issue numbering, so the issue-level tools w
632
666
  |---|---|
633
667
  | `listCheckRuns` | List check runs (Checks API: GitHub Actions and other CI providers) for a commit, branch, or tag |
634
668
  | `getCombinedStatus` | Get the combined commit status (Statuses API: legacy CI integrations) for a commit, branch, or tag |
635
- | `getCiFailureContext` | Diagnose CI failures for a ref — combined status, failing checks, and failed workflow jobs in one call |
669
+ | `createCommitStatus` | Report a result on a commit as a commit status; works with a PAT or a GitHub App, unlike check runs |
670
+ | `getCiFailureContext` | Diagnose CI failures for a ref or one workflow run: failing checks, failed jobs and steps, and the end of each failed job's log, in one call |
636
671
 
637
672
  ### Releases
638
673
 
@@ -640,8 +675,8 @@ Pull request conversations share the issue numbering, so the issue-level tools w
640
675
  |---|---|
641
676
  | `listReleases` | List releases, newest first (includes drafts and prereleases) |
642
677
  | `getLatestRelease` | Get the latest published release (body truncated by default; set `detail: full` for complete notes) |
643
- | `getRelease` | Get a specific release by ID, including its assets |
644
- | `getReleaseContext` | Fetch a release plus the previous release and tag comparison in one call |
678
+ | `getRelease` | Get a specific release by ID or tag, including its assets |
679
+ | `getReleaseContext` | Fetch a release (latest, by ID, or by tag) plus the release before it and their tag comparison in one call |
645
680
  | `createRelease` | Create a new release (and its tag if needed) |
646
681
  | `updateRelease` | Update a release's tag, target, title, notes, draft, or prerelease status |
647
682
  | `deleteRelease` | Permanently delete a release (does not delete the underlying git tag) |
@@ -663,6 +698,14 @@ Pull request conversations share the issue numbering, so the issue-level tools w
663
698
  | `searchRepositories` | Search repositories by keyword, topic, language, stars, … |
664
699
  | `searchIssues` | Search issues and pull requests using qualifiers like `is:open`, `type:pr`, or `label:bug` |
665
700
 
701
+ ### Security alerts
702
+
703
+ | Tool | Description |
704
+ |---|---|
705
+ | `listCodeScanningAlerts` | List code scanning alerts with the rule, severity and location |
706
+ | `listDependabotAlerts` | List Dependabot alerts with the advisory and first patched version (cursor pages: pass `nextCursor` as `after`) |
707
+ | `listSecretScanningAlerts` | List secret scanning alerts; the secret itself is never returned |
708
+
666
709
  ## GitHub Token
667
710
 
668
711
  All tools authenticate with a GitHub personal access token (PAT).
@@ -673,14 +716,14 @@ Create one at **GitHub → Settings → Developer settings → Personal access t
673
716
 
674
717
  | Permission | Level | Required for |
675
718
  |---|---|---|
676
- | **Metadata** | Read-only | Always required (auto-included) |
677
- | **Contents** | Read-only | `getRepository`, `listBranches`, `getFileContent`, `getRepositoryTree`, `listCommits`, `getCommit`, `getBlame`, `compareCommits`, `listReleases`, `getLatestRelease`, `getRelease`, `getReleaseContext` |
678
- | **Contents** | Read and write | `createBranch`, `deleteBranch`, `createOrUpdateFile`, `createRelease`, `updateRelease`, `deleteRelease` |
719
+ | **Metadata** | Read-only | Always required (auto-included); the only permission `getCollaboratorPermission` needs |
720
+ | **Contents** | Read-only | `getRepository`, `listBranches`, `getBranchRules`, `getFileContent`, `getRepositoryTree`, `listCommits`, `getCommit`, `getBlame`, `compareCommits`, `listReleases`, `getLatestRelease`, `getRelease`, `getReleaseContext` |
721
+ | **Contents** | Read and write | `createBranch`, `deleteBranch`, `createOrUpdateFile`, `editFiles`, `createRelease`, `updateRelease`, `deleteRelease` |
679
722
  | **Administration** | Read and write | `forkRepository`, `createRepository` |
680
723
  | **Pull requests** | Read-only | `listPullRequests`, `getPullRequest`, `listPullRequestFiles`, `listPullRequestReviews`, `listPullRequestReviewThreads`, `getPullRequestContext` |
681
- | **Pull requests** | Read and write | `createPullRequest`, `mergePullRequest`, `updatePullRequest`, `addPullRequestComment`, `updatePullRequestComment`, `deletePullRequestComment`, `createPullRequestReview`, `replyToReviewComment`, `resolveReviewThread`, `requestReviewers` |
682
- | **Issues** | Read-only | `listIssues`, `getIssue`, `getIssueContext`, `listIssueComments`, `listLabels`, `listIssueReactions`, `listCommentReactions` |
683
- | **Issues** | Read and write | `createIssue`, `addIssueComment`, `updateIssueComment`, `deleteIssueComment`, `closeIssue`, `updateIssue`, `addLabels`, `removeLabel`, `createLabel`, `updateLabel`, `deleteLabel`, `addAssignees`, `removeAssignees`, `addIssueReaction`, `addCommentReaction` |
724
+ | **Pull requests** | Read and write | `createPullRequest`, `editFiles` (with `pullRequest`), `mergePullRequest`, `enablePullRequestAutoMerge`, `disablePullRequestAutoMerge`, `updatePullRequest`, `updatePullRequestBranch`, `addPullRequestComment`, `updatePullRequestComment`, `deletePullRequestComment`, `createPullRequestReview`, `replyToReviewComment`, `resolveReviewThread`, `requestReviewers` |
725
+ | **Issues** | Read-only | `listIssues`, `getIssue`, `getIssueContext`, `listIssueComments`, `listLabels`, `listMilestones`, `listSubIssues`, `listIssueReactions`, `listCommentReactions` |
726
+ | **Issues** | Read and write | `createIssue`, `addIssueComment`, `updateIssueComment`, `deleteIssueComment`, `closeIssue`, `updateIssue`, `addLabels`, `removeLabel`, `createLabel`, `updateLabel`, `deleteLabel`, `addAssignees`, `removeAssignees`, `addSubIssue`, `addIssueReaction`, `addCommentReaction` |
684
727
  | **Discussions** | Read-only | `listDiscussions`, `getDiscussion` |
685
728
  | **Discussions** | Read and write | `addDiscussionComment` |
686
729
  | **Gists** | Read-only | `listGists`, `getGist`, `listGistComments` |
@@ -690,6 +733,10 @@ Create one at **GitHub → Settings → Developer settings → Personal access t
690
733
  | **Actions** | Read and write | `triggerWorkflow`, `cancelWorkflowRun`, `rerunWorkflowRun` |
691
734
  | **Checks** | Read-only | `listCheckRuns`, `getCiFailureContext` |
692
735
  | **Commit statuses** | Read-only | `getCombinedStatus`, `getCiFailureContext` |
736
+ | **Commit statuses** | Read and write | `createCommitStatus` |
737
+ | **Code scanning alerts** | Read-only | `listCodeScanningAlerts` |
738
+ | **Dependabot alerts** | Read-only | `listDependabotAlerts` |
739
+ | **Secret scanning alerts** | Read-only | `listSecretScanningAlerts` |
693
740
 
694
741
  Search tools (`searchCode`, `searchRepositories`, `searchIssues`) work with any token.
695
742
 
@@ -698,7 +745,8 @@ Search tools (`searchCode`, `searchRepositories`, `searchIssues`) work with any
698
745
  | Scope | Required for |
699
746
  |---|---|
700
747
  | `public_repo` | All tools on public repositories |
701
- | `repo` | All tools on public and private repositories |
748
+ | `repo` | All tools on public and private repositories, except the security alert tools |
749
+ | `security_events` | `listCodeScanningAlerts`, `listDependabotAlerts`, `listSecretScanningAlerts` |
702
750
 
703
751
  ## API
704
752
 
@@ -712,6 +760,8 @@ type GithubToolsOptions = {
712
760
  requireApproval?: boolean | Partial<Record<GithubWriteToolName, boolean>>
713
761
  preset?: GithubToolPreset | GithubToolPreset[]
714
762
  context?: GithubToolsContext // default owner / repo / PR / issue / ref
763
+ guardrails?: { repositories?: string[], branches?: string[] } // where any call may act
764
+ dryRun?: boolean // shadow mode: reads run, writes don't reach GitHub or ask anyone
715
765
  }
716
766
 
717
767
  type GithubTokenInput = string | (() => Promise<string>)
@@ -758,7 +808,7 @@ const custom = createGithubAgent({
758
808
 
759
809
  // Use the agent
760
810
  const result = await reviewer.generate({ prompt: 'Review this PR' })
761
- const stream = reviewer.stream({ prompt: 'Review this PR' })
811
+ const stream = await reviewer.stream({ prompt: 'Review this PR' })
762
812
  ```
763
813
 
764
814
  | Option | Description |
@@ -805,7 +855,24 @@ async function chatWorkflow(messages: ModelMessage[], token: string) {
805
855
  }
806
856
  ```
807
857
 
808
- #### Non-streaming (bot / background job, needs `"use step"`)
858
+ #### Non-streaming (bot / background job)
859
+
860
+ Call `.generate()` from the workflow function. Each model call and tool call is its own durable step. It needs `@ai-sdk/workflow` 2.0.59 or later. Return plain fields, since the result itself isn't serializable:
861
+
862
+ ```ts
863
+ // review.workflow.ts
864
+ import { createDurableGithubAgent } from '@github-tools/sdk/workflow'
865
+ import type { ModelMessage } from 'ai'
866
+
867
+ async function reviewWorkflow(messages: ModelMessage[], token: string) {
868
+ "use workflow"
869
+ const agent = createDurableGithubAgent({ model: 'anthropic/claude-opus-5.5', token, preset: 'code-review' })
870
+ const result = await agent.generate({ messages })
871
+ return { text: result.text, responseMessages: result.responseMessages }
872
+ }
873
+ ```
874
+
875
+ To run the whole loop as one step instead, call `createGithubAgent` inside a `"use step"` function:
809
876
 
810
877
  ```ts
811
878
  // agent-turn.step.ts
@@ -825,7 +892,7 @@ async function agentTurn(prompt: string) {
825
892
 
826
893
  > See [`examples/pr-review-agent`](../../examples/pr-review-agent) for a complete PR review agent built with Chat SDK and Vercel Workflow.
827
894
 
828
- All presets (`code-review`, `issue-triage`, `ci-ops`, `repo-explorer`, `security-audit`, `release-manager`, `discussion-moderator`, `notification-inbox`, `pr-author`, `maintainer`) work with `createDurableGithubAgent`. Options mirror `createGithubAgent` with additional pass-through for `WorkflowAgentOptions` fields like `experimental_telemetry`, `onStepEnd`, `onEnd`, and `prepareStep`. Write tools honor `requireApproval` via `needsApproval`.
895
+ All presets (`code-review`, `issue-triage`, `ci-ops`, `repo-explorer`, `security-audit`, `release-manager`, `discussion-moderator`, `notification-inbox`, `pr-author`, `maintainer`) work with `createDurableGithubAgent`. Options mirror `createGithubAgent` with additional pass-through for `WorkflowAgentOptions` fields like `telemetry`, `onStepEnd`, `onEnd`, and `prepareStep`. Write tools honor `requireApproval` via `needsApproval`.
829
896
 
830
897
  ### `resolveGithubToken(token?)`
831
898
 
@@ -0,0 +1,17 @@
1
+ import { c as AUTO_APPROVAL_TOOLS } from "./write-tools-w-8tjnDQ.mjs";
2
+ //#region src/core/approval-policy.ts
3
+ const autoApprovalTools = new Set(AUTO_APPROVAL_TOOLS);
4
+ /**
5
+ * Resolve a write tool's approval mode from global or per-tool config.
6
+ *
7
+ * @returns `'auto'` only for tools that opt into evaluation; defaults to `true` for unspecified tools in object mode.
8
+ */
9
+ function resolveApprovalMode(toolName, config) {
10
+ if (config === "auto") return autoApprovalTools.has(toolName) ? "auto" : true;
11
+ if (typeof config === "boolean") return config;
12
+ return config[toolName] ?? true;
13
+ }
14
+ //#endregion
15
+ export { resolveApprovalMode as t };
16
+
17
+ //# sourceMappingURL=approval-policy-CEMMPq92.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"approval-policy-CEMMPq92.mjs","names":[],"sources":["../src/core/approval-policy.ts"],"sourcesContent":["import { AUTO_APPROVAL_TOOLS } from './evaluation-policy'\nimport type { GithubWriteToolName } from './write-tools'\n\n/**\n * Approval for a single write tool.\n *\n * - `true` — always ask the user\n * - `false` — never ask\n * - `'auto'` — ask only when an evaluation model (Jev by default) rates the call risky\n * or not asked for by the latest user message. AI SDK evaluation needs `ai` 7.0.105 or later.\n */\nexport type ToolApprovalMode = boolean | 'auto'\n\n/**\n * Whether write operations require user approval.\n *\n * - `true` — all write tools need approval (default)\n * - `false` — no approval needed for any write tool\n * - `'auto'` — low-risk write tools ({@link AUTO_APPROVAL_TOOLS}) are evaluated per call;\n * every other write tool needs approval\n * - object — per-tool {@link ToolApprovalMode} via {@link GithubWriteToolName}; unspecified write tools default to `true`\n *\n * @example Global disable\n * ```ts\n * createGithubTools({ token, requireApproval: false })\n * ```\n *\n * @example Auto approval for low-risk writes\n * ```ts\n * createGithubTools({ token, requireApproval: 'auto' })\n * ```\n *\n * @example Granular per write tool\n * ```ts\n * createGithubTools({\n * token,\n * requireApproval: {\n * mergePullRequest: true,\n * createOrUpdateFile: true,\n * addPullRequestComment: 'auto',\n * },\n * })\n * ```\n */\nexport type ApprovalConfig = ToolApprovalMode | Partial<Record<GithubWriteToolName, ToolApprovalMode>>\n\n/** {@link ApprovalConfig} without `'auto'`, for runtimes that cannot run the evaluation model. */\nexport type StaticApprovalConfig = boolean | Partial<Record<GithubWriteToolName, boolean>>\n\nconst autoApprovalTools: ReadonlySet<string> = new Set(AUTO_APPROVAL_TOOLS)\n\n/**\n * Resolve a write tool's approval mode from global or per-tool config.\n *\n * @returns `'auto'` only for tools that opt into evaluation; defaults to `true` for unspecified tools in object mode.\n */\nexport function resolveApprovalMode(toolName: GithubWriteToolName, config: ApprovalConfig): ToolApprovalMode {\n if (config === 'auto') return autoApprovalTools.has(toolName) ? 'auto' : true\n if (typeof config === 'boolean') return config\n return config[toolName] ?? true\n}\n"],"mappings":";;AAiDA,MAAM,oBAAyC,IAAI,IAAI,mBAAmB;;;;;;AAO1E,SAAgB,oBAAoB,UAA+B,QAA0C;CAC3G,IAAI,WAAW,QAAQ,OAAO,kBAAkB,IAAI,QAAQ,IAAI,SAAS;CACzE,IAAI,OAAO,WAAW,WAAW,OAAO;CACxC,OAAO,OAAO,aAAa;AAC7B"}
@@ -1,4 +1,4 @@
1
- import { s as GithubConnectorInput, t as ConnectGithubEveToolsOptions } from "../types-BmwOpI5-.mjs";
1
+ import { s as GithubConnectorInput, t as ConnectGithubEveToolsOptions } from "../types-Bln8U42J.mjs";
2
2
  //#region src/connect/eve.d.ts
3
3
  /**
4
4
  * Register eve GitHub tools backed by a Vercel Connect connector.
@@ -23,6 +23,6 @@ import { s as GithubConnectorInput, t as ConnectGithubEveToolsOptions } from "..
23
23
  * `build.externalDependencies: ['@vercel/connect']` in `agent.ts`. Prefer the
24
24
  * eve extension (pre-built) so that workaround is unnecessary.
25
25
  */
26
- export declare function connectGithubTools(connector: GithubConnectorInput, options?: ConnectGithubEveToolsOptions): import("eve").DynamicSentinel<import("eve/tools").DynamicToolResult, import("eve").DynamicContext>;
26
+ export declare function connectGithubTools(connector: GithubConnectorInput, options?: ConnectGithubEveToolsOptions): import("eve/tools").DynamicSentinel<import("eve/tools").DynamicToolResult, import("eve/tools").DynamicContext>;
27
27
  //#endregion
28
28
  //# sourceMappingURL=eve.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eve.d.mts","names":[],"sources":["../../src/connect/eve.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;wBA4BgB,mBACd,WAAW,sBACX,UAAS,6CAAiC,oCAAA,iCAAA"}
1
+ {"version":3,"file":"eve.d.mts","names":[],"sources":["../../src/connect/eve.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;wBA4BgB,mBACd,WAAW,sBACX,UAAS,mDAAiC,oCAAA,uCAAA"}
@@ -1,5 +1,5 @@
1
1
  import { createGithubTools } from "../eve.mjs";
2
- import { t as connectGithubToken } from "../token-Bh8nPj66.mjs";
2
+ import { t as connectGithubToken } from "../token-BLps09gm.mjs";
3
3
  //#region src/connect/eve.ts
4
4
  /**
5
5
  * Register eve GitHub tools backed by a Vercel Connect connector.
@@ -1,13 +1,21 @@
1
- import "./index-DkZvveZP.mjs";
2
- import { a as GithubConnectParamsInput, c as resolveGithubConnector, i as GithubConnectParams, n as ConnectGithubTokenOptions, o as GithubConnectParamsResolver, r as ConnectGithubToolsOptions, s as GithubConnectorInput, t as ConnectGithubEveToolsOptions } from "./types-BmwOpI5-.mjs";
3
- import { C as GithubTokenInput, E as GithubToolPreset, S as GithubTokenCall, j as GithubToolName, t as AllGithubTools } from "./tool-types-CrC80SIL.mjs";
1
+ import { a as GithubConnectParamsInput, c as resolveGithubConnector, i as GithubConnectParams, n as ConnectGithubTokenOptions, o as GithubConnectParamsResolver, r as ConnectGithubToolsOptions, s as GithubConnectorInput, t as ConnectGithubEveToolsOptions } from "./types-Bln8U42J.mjs";
2
+ import { M as GithubTokenCall, N as GithubTokenInput, W as GithubToolName, r as AllGithubTools, z as GithubToolPreset } from "./dry-run-DXckOam2.mjs";
3
+ import "./eve-runtime-B_CJE9JV.mjs";
4
4
  import { ConnectTokenSubject } from "@vercel/connect";
5
5
  //#region src/connect/scopes.d.ts
6
6
  /**
7
- * Vercel Connect scope strings mapped to each {@link GithubToolPreset}.
7
+ * Per-tool Connect scopes, derived from `GITHUB_TOOL_CATALOG`. Empty arrays are
8
+ * intentional for gist and notification tools (installation tokens cannot
9
+ * satisfy those APIs).
10
+ */
11
+ export declare const TOOL_CONNECT_SCOPES: Record<"getRepository" | "listBranches" | "getFileContent" | "getRepositoryTree" | "createBranch" | "deleteBranch" | "forkRepository" | "createRepository" | "createOrUpdateFile" | "getBranchRules" | "getCollaboratorPermission" | "editFiles" | "listPullRequests" | "getPullRequest" | "createPullRequest" | "mergePullRequest" | "enablePullRequestAutoMerge" | "disablePullRequestAutoMerge" | "updatePullRequest" | "updatePullRequestBranch" | "addPullRequestComment" | "updatePullRequestComment" | "deletePullRequestComment" | "listPullRequestFiles" | "listPullRequestReviews" | "createPullRequestReview" | "listPullRequestReviewThreads" | "replyToReviewComment" | "resolveReviewThread" | "requestReviewers" | "getPullRequestContext" | "getIssueContext" | "listIssues" | "getIssue" | "listIssueComments" | "createIssue" | "addIssueComment" | "updateIssueComment" | "deleteIssueComment" | "closeIssue" | "updateIssue" | "listLabels" | "addLabels" | "removeLabel" | "createLabel" | "updateLabel" | "deleteLabel" | "addAssignees" | "removeAssignees" | "listMilestones" | "listSubIssues" | "addSubIssue" | "listIssueReactions" | "addIssueReaction" | "listCommentReactions" | "addCommentReaction" | "listDiscussions" | "getDiscussion" | "addDiscussionComment" | "listNotifications" | "markNotificationRead" | "searchCode" | "searchRepositories" | "searchIssues" | "listCommits" | "getCommit" | "getBlame" | "compareCommits" | "listGists" | "getGist" | "listGistComments" | "createGist" | "updateGist" | "deleteGist" | "createGistComment" | "listWorkflows" | "listWorkflowRuns" | "getWorkflowRun" | "listWorkflowJobs" | "getWorkflowJobLogs" | "triggerWorkflow" | "cancelWorkflowRun" | "rerunWorkflowRun" | "listCheckRuns" | "getCombinedStatus" | "createCommitStatus" | "getCiFailureContext" | "listReleases" | "getLatestRelease" | "getRelease" | "getReleaseContext" | "createRelease" | "updateRelease" | "deleteRelease" | "listCodeScanningAlerts" | "listDependabotAlerts" | "listSecretScanningAlerts", readonly string[]>;
12
+ /**
13
+ * Vercel Connect scope strings mapped to each {@link GithubToolPreset}, derived
14
+ * from the preset's tools so a tool added to a preset brings its scopes along.
8
15
  *
9
16
  * Scopes mirror GitHub App permissions (`contents`, `pull_requests`, `issues`,
10
- * `discussions`, `actions`, `checks`, `statuses`, `administration`, `metadata`)
17
+ * `discussions`, `actions`, `checks`, `statuses`, `administration`, `metadata`,
18
+ * and `security_events`, `vulnerability_alerts`, `secret_scanning_alerts` for the alert tools)
11
19
  * and must cover every read/write family a preset's tools touch, not just its
12
20
  * primary domain. Release tools fall under the `contents` permission on GitHub
13
21
  * Apps, and reaction tools under `issues`, so neither needs a scope of its own.
@@ -24,24 +32,7 @@ import { ConnectTokenSubject } from "@vercel/connect";
24
32
  * that only applies to user access tokens, so `listNotifications` /
25
33
  * `markNotificationRead` need a PAT with the "Notifications" account permission.
26
34
  */
27
- export declare const PRESET_CONNECT_SCOPES: {
28
- readonly 'repo-explorer': readonly ["contents:read", "metadata:read", "pull_requests:read", "issues:read", "discussions:read", "actions:read", "checks:read", "statuses:read"];
29
- readonly 'code-review': readonly ["contents:read", "metadata:read", "pull_requests:read", "pull_requests:write", "checks:read", "statuses:read"];
30
- readonly 'issue-triage': readonly ["contents:read", "metadata:read", "issues:read", "issues:write"];
31
- readonly 'ci-ops': readonly ["contents:read", "metadata:read", "actions:read", "actions:write", "checks:read", "statuses:read"];
32
- readonly 'security-audit': readonly ["contents:read", "metadata:read", "pull_requests:read", "issues:read", "issues:write", "actions:read", "checks:read", "statuses:read"];
33
- readonly 'release-manager': readonly ["contents:read", "contents:write", "metadata:read", "pull_requests:read", "actions:read", "actions:write"];
34
- readonly 'discussion-moderator': readonly ["contents:read", "metadata:read", "issues:read", "issues:write", "discussions:read", "discussions:write"];
35
- readonly 'notification-inbox': readonly ["contents:read", "metadata:read", "pull_requests:read", "issues:read"];
36
- readonly 'pr-author': readonly ["contents:read", "contents:write", "metadata:read", "pull_requests:read", "pull_requests:write"];
37
- readonly maintainer: readonly ["contents:read", "contents:write", "metadata:read", "pull_requests:read", "pull_requests:write", "issues:read", "issues:write", "discussions:read", "discussions:write", "actions:read", "actions:write", "checks:read", "statuses:read", "administration:read", "administration:write"];
38
- };
39
- /**
40
- * Per-tool Connect scopes, derived from `GITHUB_TOOL_CATALOG`. Empty arrays are
41
- * intentional for gist and notification tools (installation tokens cannot
42
- * satisfy those APIs).
43
- */
44
- export declare const TOOL_CONNECT_SCOPES: Record<"getPullRequest" | "listPullRequests" | "listPullRequestFiles" | "listPullRequestReviews" | "listPullRequestReviewThreads" | "getPullRequestContext" | "getFileContent" | "listCommits" | "getCommit" | "getBlame" | "compareCommits" | "getRepository" | "listBranches" | "searchCode" | "listCheckRuns" | "getCombinedStatus" | "updatePullRequest" | "addPullRequestComment" | "updatePullRequestComment" | "deletePullRequestComment" | "createPullRequestReview" | "replyToReviewComment" | "resolveReviewThread" | "requestReviewers" | "listIssues" | "getIssueContext" | "listIssueComments" | "createIssue" | "addIssueComment" | "updateIssueComment" | "deleteIssueComment" | "closeIssue" | "updateIssue" | "addLabels" | "removeLabel" | "createLabel" | "updateLabel" | "deleteLabel" | "addAssignees" | "removeAssignees" | "listIssueReactions" | "addIssueReaction" | "listCommentReactions" | "addCommentReaction" | "searchRepositories" | "searchIssues" | "listWorkflows" | "listWorkflowRuns" | "getWorkflowRun" | "listWorkflowJobs" | "getWorkflowJobLogs" | "getCiFailureContext" | "triggerWorkflow" | "cancelWorkflowRun" | "rerunWorkflowRun" | "getRepositoryTree" | "getIssue" | "listDiscussions" | "getDiscussion" | "listLabels" | "listGists" | "getGist" | "listGistComments" | "listReleases" | "getLatestRelease" | "getRelease" | "getReleaseContext" | "createRelease" | "updateRelease" | "deleteRelease" | "addDiscussionComment" | "listNotifications" | "markNotificationRead" | "createBranch" | "deleteBranch" | "createOrUpdateFile" | "createPullRequest" | "forkRepository" | "createRepository" | "mergePullRequest" | "createGist" | "updateGist" | "deleteGist" | "createGistComment", readonly string[]>;
35
+ export declare const PRESET_CONNECT_SCOPES: Record<"code-review" | "issue-triage" | "ci-ops" | "repo-explorer" | "security-audit" | "release-manager" | "discussion-moderator" | "notification-inbox" | "pr-author" | "maintainer", readonly string[]>;
45
36
  /**
46
37
  * Returns Vercel Connect scopes for a preset or combined presets.
47
38
  * Without a preset, returns the union of all preset scopes (full tool set).
@@ -95,7 +86,7 @@ export declare function connectGithubToken(connector: GithubConnectorInput, opti
95
86
  * `connector` may be a static name or a resolver function — e.g. to pick a
96
87
  * different connector per environment (production vs. preview) or tenant.
97
88
  */
98
- export declare function connectGithubTools(connector: GithubConnectorInput, options?: ConnectGithubToolsOptions): AllGithubTools | Pick<AllGithubTools, "getPullRequest" | "listPullRequests" | "listPullRequestFiles" | "listPullRequestReviews" | "listPullRequestReviewThreads" | "getPullRequestContext" | "getFileContent" | "listCommits" | "getCommit" | "getBlame" | "compareCommits" | "getRepository" | "listBranches" | "searchCode" | "listCheckRuns" | "getCombinedStatus" | "updatePullRequest" | "addPullRequestComment" | "updatePullRequestComment" | "deletePullRequestComment" | "createPullRequestReview" | "replyToReviewComment" | "resolveReviewThread" | "requestReviewers" | "listIssues" | "getIssueContext" | "listIssueComments" | "createIssue" | "addIssueComment" | "updateIssueComment" | "deleteIssueComment" | "closeIssue" | "updateIssue" | "addLabels" | "removeLabel" | "createLabel" | "updateLabel" | "deleteLabel" | "addAssignees" | "removeAssignees" | "listIssueReactions" | "addIssueReaction" | "listCommentReactions" | "addCommentReaction" | "searchRepositories" | "searchIssues" | "listWorkflows" | "listWorkflowRuns" | "getWorkflowRun" | "listWorkflowJobs" | "getWorkflowJobLogs" | "getCiFailureContext" | "triggerWorkflow" | "cancelWorkflowRun" | "rerunWorkflowRun" | "getRepositoryTree" | "getIssue" | "listDiscussions" | "getDiscussion" | "listLabels" | "listGists" | "getGist" | "listGistComments" | "listReleases" | "getLatestRelease" | "getRelease" | "getReleaseContext" | "createRelease" | "updateRelease" | "deleteRelease" | "addDiscussionComment" | "listNotifications" | "markNotificationRead" | "createBranch" | "deleteBranch" | "createOrUpdateFile" | "createPullRequest" | "forkRepository" | "createRepository" | "mergePullRequest" | "createGist" | "updateGist" | "deleteGist" | "createGistComment">;
89
+ export declare function connectGithubTools(connector: GithubConnectorInput, options?: ConnectGithubToolsOptions): AllGithubTools | Pick<AllGithubTools, "getRepository" | "listBranches" | "getFileContent" | "getRepositoryTree" | "createBranch" | "deleteBranch" | "forkRepository" | "createRepository" | "createOrUpdateFile" | "getBranchRules" | "getCollaboratorPermission" | "editFiles" | "listPullRequests" | "getPullRequest" | "createPullRequest" | "mergePullRequest" | "enablePullRequestAutoMerge" | "disablePullRequestAutoMerge" | "updatePullRequest" | "updatePullRequestBranch" | "addPullRequestComment" | "updatePullRequestComment" | "deletePullRequestComment" | "listPullRequestFiles" | "listPullRequestReviews" | "createPullRequestReview" | "listPullRequestReviewThreads" | "replyToReviewComment" | "resolveReviewThread" | "requestReviewers" | "getPullRequestContext" | "getIssueContext" | "listIssues" | "getIssue" | "listIssueComments" | "createIssue" | "addIssueComment" | "updateIssueComment" | "deleteIssueComment" | "closeIssue" | "updateIssue" | "listLabels" | "addLabels" | "removeLabel" | "createLabel" | "updateLabel" | "deleteLabel" | "addAssignees" | "removeAssignees" | "listMilestones" | "listSubIssues" | "addSubIssue" | "listIssueReactions" | "addIssueReaction" | "listCommentReactions" | "addCommentReaction" | "listDiscussions" | "getDiscussion" | "addDiscussionComment" | "listNotifications" | "markNotificationRead" | "searchCode" | "searchRepositories" | "searchIssues" | "listCommits" | "getCommit" | "getBlame" | "compareCommits" | "listGists" | "getGist" | "listGistComments" | "createGist" | "updateGist" | "deleteGist" | "createGistComment" | "listWorkflows" | "listWorkflowRuns" | "getWorkflowRun" | "listWorkflowJobs" | "getWorkflowJobLogs" | "triggerWorkflow" | "cancelWorkflowRun" | "rerunWorkflowRun" | "listCheckRuns" | "getCombinedStatus" | "createCommitStatus" | "getCiFailureContext" | "listReleases" | "getLatestRelease" | "getRelease" | "getReleaseContext" | "createRelease" | "updateRelease" | "deleteRelease" | "listCodeScanningAlerts" | "listDependabotAlerts" | "listSecretScanningAlerts">;
99
90
  //#endregion
100
91
  export { type ConnectGithubEveToolsOptions, type ConnectGithubTokenOptions, type ConnectGithubToolsOptions, type ConnectScopeSelection, type ConnectTokenSubject, type GithubConnectParams, type GithubConnectParamsInput, type GithubConnectParamsResolver, type GithubConnectorInput, type GithubTokenCall, resolveGithubConnector };
101
92
  //# sourceMappingURL=connect.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connect.d.mts","names":[],"sources":["../src/connect/scopes.ts","../src/connect/token.ts","../src/connect/tools.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;qBAyBa;;;;;;;;;;;;;;;;;qBAwHA,qBAAmB;;;;;wBAgBhB,6BACd,SAAS,mBAAmB;;;;;wBAcd,4BAA4B,gBAAgB;KAUhD;EACV,SAAS,mBAAmB;EAC5B,mBAAmB;EACnB,mBAAmB;;;;;;;;;;wBA6BL,gCAAgC,YAAW;;;;;;;;;;;;;;;;;;;;wBC3L3C,mBACd,WAAW,sBACX,UAAS,4BACR;;;;;;;;;;wBCtBa,mBACd,WAAW,sBACX,UAAS,4BAAA,iBAA8B,KAAA"}
1
+ {"version":3,"file":"connect.d.mts","names":[],"sources":["../src/connect/scopes.ts","../src/connect/token.ts","../src/connect/tools.ts"],"mappings":";;;;;;;;;;qBAgCa,qBAAmB;;;;;;;;;;;;;;;;;;;;;;;;qBAmCnB,uBAAqB;;;;;wBAelB,6BACd,SAAS,mBAAmB;;;;;wBAcd,4BAA4B,gBAAgB;KAUhD;EACV,SAAS,mBAAmB;EAC5B,mBAAmB;EACnB,mBAAmB;;;;;;;;;;wBA6BL,gCAAgC,YAAW;;;;;;;;;;;;;;;;;;;;wBC5G3C,mBACd,WAAW,sBACX,UAAS,4BACR;;;;;;;;;;wBCtBa,mBACd,WAAW,sBACX,UAAS,4BAAA,iBAA8B,KAAA"}
package/dist/connect.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { t as createGithubTools } from "./src-Bx5p1Unc.mjs";
2
- import { a as connectGithubScopesForSelection, i as connectGithubScopesForPreset, n as PRESET_CONNECT_SCOPES, o as connectGithubScopesForTools, r as TOOL_CONNECT_SCOPES, s as resolveGithubConnector, t as connectGithubToken } from "./token-Bh8nPj66.mjs";
1
+ import { t as createGithubTools } from "./src-BlhrSieS.mjs";
2
+ import { a as connectGithubScopesForSelection, i as connectGithubScopesForPreset, n as PRESET_CONNECT_SCOPES, o as connectGithubScopesForTools, r as TOOL_CONNECT_SCOPES, s as resolveGithubConnector, t as connectGithubToken } from "./token-BLps09gm.mjs";
3
3
  //#region src/connect/tools.ts
4
4
  /**
5
5
  * Create GitHub tools backed by a Vercel Connect connector.
@@ -1,4 +1,4 @@
1
- import { B as listIssueReactionsCore, Bi as deleteBranchCore, Bn as listPullRequestFilesCore, Br as getIssueCore, Bt as getWorkflowJobLogsCore, K as markNotificationReadCore, Ki as getFileContentCore, Kn as listPullRequestReviewsCore, Kr as listIssuesCore, Kt as listWorkflowJobsCore, L as listCommentReactionsCore, Li as createRepositoryCore, Ln as getPullRequestCore, Lr as deleteLabelCore, Lt as cancelWorkflowRunCore, O as searchRepositoriesCore, Oi as listCheckRunsCore, On as createPullRequestCore, Or as createIssueCore, Ot as getIssueContextCore, P as addIssueReactionCore, Pi as createOrUpdateFileCore, Pn as deletePullRequestCommentCore, Pr as deleteIssueCommentCore, Pt as getReleaseContextCore, Q as createGistCore, Qi as getRepositoryTreeCore, Qn as mergePullRequestCore, Qr as removeAssigneesCore, Qt as listWorkflowsCore, S as searchCodeCore, Si as listCommitsCore, Sn as updateReleaseCore, Sr as addLabelsCore, St as listDiscussionsCore, T as searchIssuesCore, Ti as getCombinedStatusCore, Tn as addPullRequestCommentCore, Tr as closeIssueCore, Tt as getCiFailureContextCore, U as listNotificationsCore, Ui as forkRepositoryCore, Un as listPullRequestReviewThreadsCore, Ur as listIssueCommentsCore, Ut as getWorkflowRunCore, Y as createGistCommentCore, Yi as getRepositoryCore, Yn as listPullRequestsCore, Yr as listLabelsCore, Yt as listWorkflowRunsCore, gi as getBlameCore, gn as getReleaseCore, gr as addAssigneesCore, gt as addDiscussionCommentCore, ii as updateIssueCommentCore, in as triggerWorkflowCore, ir as requestReviewersCore, it as getGistCore, j as addCommentReactionCore, ji as createBranchCore, jn as createPullRequestReviewCore, jr as createLabelCore, jt as getPullRequestContextCore, pi as compareCommitsCore, pn as getLatestReleaseCore, pr as updatePullRequestCore, pt as updateGistCore, si as updateIssueCore, sn as createReleaseCore, sr as resolveReviewThreadCore, st as listGistCommentsCore, ta as listBranchesCore, ti as removeLabelCore, tn as rerunWorkflowRunCore, tr as replyToReviewCommentCore, tt as deleteGistCore, ui as updateLabelCore, un as deleteReleaseCore, ur as updatePullRequestCommentCore, ut as listGistsCore, yi as getCommitCore, yn as listReleasesCore, yr as addIssueCommentCore, yt as getDiscussionCore } from "./write-tools-BaoTUCg7.mjs";
1
+ import { A as listDependabotAlertsCore, An as getReleaseCore, Ar as updatePullRequestBranchCore, At as addDiscussionCommentCore, Ba as getRepositoryCore, Bi as updateIssueCore, Br as addAssigneesCore, D as listCodeScanningAlertsCore, Dn as getLatestReleaseCore, Dr as resolveReviewThreadCore, Dt as updateGistCore, G as addCommentReactionCore, Gn as createPullRequestReviewCore, Gt as getPullRequestContextCore, H as searchRepositoriesCore, Hn as createPullRequestCore, Ht as getIssueContextCore, I as searchCodeCore, In as updateReleaseCore, Ir as updatePullRequestCore, It as listDiscussionsCore, J as addIssueReactionCore, Jn as deletePullRequestCommentCore, Jt as getReleaseContextCore, Ka as listBranchesCore, Ki as compareCommitsCore, Kr as addLabelsCore, La as getFileContentCore, Li as updateIssueCommentCore, N as listSecretScanningAlertsCore, Nn as listReleasesCore, Nr as updatePullRequestCommentCore, Nt as getDiscussionCore, Oa as forkRepositoryCore, Oi as listSubIssuesCore, Pa as getCollaboratorPermissionCore, Pi as removeLabelCore, Qi as getCommitCore, Qr as closeIssueCore, Sa as deleteBranchCore, Si as listLabelsCore, Ta as editFilesCore, Ti as listMilestonesCore, Ua as getRepositoryTreeCore, Ui as updateLabelCore, Ur as addIssueCommentCore, Yi as getBlameCore, Yr as addSubIssueCore, Z as listCommentReactionsCore, Zn as disablePullRequestAutoMergeCore, Zt as cancelWorkflowRunCore, en as getWorkflowJobLogsCore, er as enablePullRequestAutoMergeCore, et as listIssueReactionsCore, fn as listWorkflowsCore, fr as listPullRequestReviewsCore, ft as createGistCore, ga as createOrUpdateFileCore, gi as listIssueCommentsCore, hn as rerunWorkflowRunCore, hr as listPullRequestsCore, ht as deleteGistCore, ia as createCommitStatusCore, ii as createLabelCore, ja as getBranchRulesCore, ji as removeAssigneesCore, ln as listWorkflowRunsCore, lr as listPullRequestReviewThreadsCore, lt as createGistCommentCore, on as listWorkflowJobsCore, or as listPullRequestFilesCore, ot as markNotificationReadCore, pa as createBranchCore, pi as getIssueCore, rn as getWorkflowRunCore, rr as getPullRequestCore, rt as listNotificationsCore, sa as getCombinedStatusCore, si as deleteIssueCommentCore, ta as listCommitsCore, ti as createIssueCore, ua as listCheckRunsCore, ui as deleteLabelCore, vn as triggerWorkflowCore, vr as mergePullRequestCore, vt as getGistCore, wn as deleteReleaseCore, wr as requestReviewersCore, wt as listGistsCore, xn as createReleaseCore, xr as replyToReviewCommentCore, xt as listGistCommentsCore, ya as createRepositoryCore, yi as listIssuesCore, z as searchIssuesCore, zn as addPullRequestCommentCore, zt as getCiFailureContextCore } from "./write-tools-w-8tjnDQ.mjs";
2
2
  //#region src/core/cores.ts
3
3
  /**
4
4
  * The `*Core` implementation of every tool, keyed by tool name.
@@ -37,6 +37,15 @@ const GITHUB_TOOL_CORES = {
37
37
  get createOrUpdateFile() {
38
38
  return createOrUpdateFileCore;
39
39
  },
40
+ get editFiles() {
41
+ return editFilesCore;
42
+ },
43
+ get getBranchRules() {
44
+ return getBranchRulesCore;
45
+ },
46
+ get getCollaboratorPermission() {
47
+ return getCollaboratorPermissionCore;
48
+ },
40
49
  get listPullRequests() {
41
50
  return listPullRequestsCore;
42
51
  },
@@ -49,9 +58,18 @@ const GITHUB_TOOL_CORES = {
49
58
  get mergePullRequest() {
50
59
  return mergePullRequestCore;
51
60
  },
61
+ get enablePullRequestAutoMerge() {
62
+ return enablePullRequestAutoMergeCore;
63
+ },
64
+ get disablePullRequestAutoMerge() {
65
+ return disablePullRequestAutoMergeCore;
66
+ },
52
67
  get updatePullRequest() {
53
68
  return updatePullRequestCore;
54
69
  },
70
+ get updatePullRequestBranch() {
71
+ return updatePullRequestBranchCore;
72
+ },
55
73
  get addPullRequestComment() {
56
74
  return addPullRequestCommentCore;
57
75
  },
@@ -139,6 +157,15 @@ const GITHUB_TOOL_CORES = {
139
157
  get removeAssignees() {
140
158
  return removeAssigneesCore;
141
159
  },
160
+ get listMilestones() {
161
+ return listMilestonesCore;
162
+ },
163
+ get listSubIssues() {
164
+ return listSubIssuesCore;
165
+ },
166
+ get addSubIssue() {
167
+ return addSubIssueCore;
168
+ },
142
169
  get listIssueReactions() {
143
170
  return listIssueReactionsCore;
144
171
  },
@@ -238,6 +265,9 @@ const GITHUB_TOOL_CORES = {
238
265
  get getCombinedStatus() {
239
266
  return getCombinedStatusCore;
240
267
  },
268
+ get createCommitStatus() {
269
+ return createCommitStatusCore;
270
+ },
241
271
  get getCiFailureContext() {
242
272
  return getCiFailureContextCore;
243
273
  },
@@ -261,9 +291,18 @@ const GITHUB_TOOL_CORES = {
261
291
  },
262
292
  get deleteRelease() {
263
293
  return deleteReleaseCore;
294
+ },
295
+ get listCodeScanningAlerts() {
296
+ return listCodeScanningAlertsCore;
297
+ },
298
+ get listDependabotAlerts() {
299
+ return listDependabotAlertsCore;
300
+ },
301
+ get listSecretScanningAlerts() {
302
+ return listSecretScanningAlertsCore;
264
303
  }
265
304
  };
266
305
  //#endregion
267
306
  export { GITHUB_TOOL_CORES as t };
268
307
 
269
- //# sourceMappingURL=cores-BeLZwcde.mjs.map
308
+ //# sourceMappingURL=cores-meFAMt2D.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cores-meFAMt2D.mjs","names":["repository.getRepositoryCore","repository.listBranchesCore","repository.getFileContentCore","repository.getRepositoryTreeCore","repository.createBranchCore","repository.deleteBranchCore","repository.forkRepositoryCore","repository.createRepositoryCore","repository.createOrUpdateFileCore","repository.editFilesCore","repository.getBranchRulesCore","repository.getCollaboratorPermissionCore","pullRequests.listPullRequestsCore","pullRequests.getPullRequestCore","pullRequests.createPullRequestCore","pullRequests.mergePullRequestCore","pullRequests.enablePullRequestAutoMergeCore","pullRequests.disablePullRequestAutoMergeCore","pullRequests.updatePullRequestCore","pullRequests.updatePullRequestBranchCore","pullRequests.addPullRequestCommentCore","pullRequests.updatePullRequestCommentCore","pullRequests.deletePullRequestCommentCore","pullRequests.listPullRequestFilesCore","pullRequests.listPullRequestReviewsCore","pullRequests.createPullRequestReviewCore","pullRequests.listPullRequestReviewThreadsCore","pullRequests.replyToReviewCommentCore","pullRequests.resolveReviewThreadCore","pullRequests.requestReviewersCore","bundles.getPullRequestContextCore","bundles.getIssueContextCore","issues.listIssuesCore","issues.getIssueCore","issues.listIssueCommentsCore","issues.createIssueCore","issues.addIssueCommentCore","issues.updateIssueCommentCore","issues.deleteIssueCommentCore","issues.closeIssueCore","issues.updateIssueCore","issues.listLabelsCore","issues.addLabelsCore","issues.removeLabelCore","issues.createLabelCore","issues.updateLabelCore","issues.deleteLabelCore","issues.addAssigneesCore","issues.removeAssigneesCore","issues.listMilestonesCore","issues.listSubIssuesCore","issues.addSubIssueCore","reactions.listIssueReactionsCore","reactions.addIssueReactionCore","reactions.listCommentReactionsCore","reactions.addCommentReactionCore","discussions.listDiscussionsCore","discussions.getDiscussionCore","discussions.addDiscussionCommentCore","notifications.listNotificationsCore","notifications.markNotificationReadCore","search.searchCodeCore","search.searchRepositoriesCore","search.searchIssuesCore","commits.listCommitsCore","commits.getCommitCore","commits.getBlameCore","commits.compareCommitsCore","gists.listGistsCore","gists.getGistCore","gists.listGistCommentsCore","gists.createGistCore","gists.updateGistCore","gists.deleteGistCore","gists.createGistCommentCore","workflows.listWorkflowsCore","workflows.listWorkflowRunsCore","workflows.getWorkflowRunCore","workflows.listWorkflowJobsCore","workflows.getWorkflowJobLogsCore","workflows.triggerWorkflowCore","workflows.cancelWorkflowRunCore","workflows.rerunWorkflowRunCore","checks.listCheckRunsCore","checks.getCombinedStatusCore","checks.createCommitStatusCore","bundles.getCiFailureContextCore","releases.listReleasesCore","releases.getLatestReleaseCore","releases.getReleaseCore","bundles.getReleaseContextCore","releases.createReleaseCore","releases.updateReleaseCore","releases.deleteReleaseCore","security.listCodeScanningAlertsCore","security.listDependabotAlertsCore","security.listSecretScanningAlertsCore"],"sources":["../src/core/cores.ts"],"sourcesContent":["import * as bundles from './bundles'\nimport * as checks from './checks'\nimport * as commits from './commits'\nimport * as discussions from './discussions'\nimport * as gists from './gists'\nimport * as issues from './issues'\nimport * as notifications from './notifications'\nimport * as pullRequests from './pull-requests'\nimport * as reactions from './reactions'\nimport * as releases from './releases'\nimport * as security from './security'\nimport * as repository from './repository'\nimport * as search from './search'\nimport * as workflows from './workflows'\nimport type { GithubToolName } from './catalog'\n\n/**\n * The `*Core` implementation of every tool, keyed by tool name.\n *\n * Kept apart from `GITHUB_TOOL_CATALOG` so that importing tool metadata does\n * not pull Octokit into a Vercel Workflow flow bundle, which cannot load\n * Node.js built-ins. Argument types vary per tool, so callers cast at the\n * dispatch boundary. Entries are getters so the ESM binding stays live\n * (module spies in tests).\n */\nexport const GITHUB_TOOL_CORES = {\n get getRepository() { return repository.getRepositoryCore },\n get listBranches() { return repository.listBranchesCore },\n get getFileContent() { return repository.getFileContentCore },\n get getRepositoryTree() { return repository.getRepositoryTreeCore },\n get createBranch() { return repository.createBranchCore },\n get deleteBranch() { return repository.deleteBranchCore },\n get forkRepository() { return repository.forkRepositoryCore },\n get createRepository() { return repository.createRepositoryCore },\n get createOrUpdateFile() { return repository.createOrUpdateFileCore },\n get editFiles() { return repository.editFilesCore },\n get getBranchRules() { return repository.getBranchRulesCore },\n get getCollaboratorPermission() { return repository.getCollaboratorPermissionCore },\n get listPullRequests() { return pullRequests.listPullRequestsCore },\n get getPullRequest() { return pullRequests.getPullRequestCore },\n get createPullRequest() { return pullRequests.createPullRequestCore },\n get mergePullRequest() { return pullRequests.mergePullRequestCore },\n get enablePullRequestAutoMerge() { return pullRequests.enablePullRequestAutoMergeCore },\n get disablePullRequestAutoMerge() { return pullRequests.disablePullRequestAutoMergeCore },\n get updatePullRequest() { return pullRequests.updatePullRequestCore },\n get updatePullRequestBranch() { return pullRequests.updatePullRequestBranchCore },\n get addPullRequestComment() { return pullRequests.addPullRequestCommentCore },\n get updatePullRequestComment() { return pullRequests.updatePullRequestCommentCore },\n get deletePullRequestComment() { return pullRequests.deletePullRequestCommentCore },\n get listPullRequestFiles() { return pullRequests.listPullRequestFilesCore },\n get listPullRequestReviews() { return pullRequests.listPullRequestReviewsCore },\n get createPullRequestReview() { return pullRequests.createPullRequestReviewCore },\n get listPullRequestReviewThreads() { return pullRequests.listPullRequestReviewThreadsCore },\n get replyToReviewComment() { return pullRequests.replyToReviewCommentCore },\n get resolveReviewThread() { return pullRequests.resolveReviewThreadCore },\n get requestReviewers() { return pullRequests.requestReviewersCore },\n get getPullRequestContext() { return bundles.getPullRequestContextCore },\n get getIssueContext() { return bundles.getIssueContextCore },\n get listIssues() { return issues.listIssuesCore },\n get getIssue() { return issues.getIssueCore },\n get listIssueComments() { return issues.listIssueCommentsCore },\n get createIssue() { return issues.createIssueCore },\n get addIssueComment() { return issues.addIssueCommentCore },\n get updateIssueComment() { return issues.updateIssueCommentCore },\n get deleteIssueComment() { return issues.deleteIssueCommentCore },\n get closeIssue() { return issues.closeIssueCore },\n get updateIssue() { return issues.updateIssueCore },\n get listLabels() { return issues.listLabelsCore },\n get addLabels() { return issues.addLabelsCore },\n get removeLabel() { return issues.removeLabelCore },\n get createLabel() { return issues.createLabelCore },\n get updateLabel() { return issues.updateLabelCore },\n get deleteLabel() { return issues.deleteLabelCore },\n get addAssignees() { return issues.addAssigneesCore },\n get removeAssignees() { return issues.removeAssigneesCore },\n get listMilestones() { return issues.listMilestonesCore },\n get listSubIssues() { return issues.listSubIssuesCore },\n get addSubIssue() { return issues.addSubIssueCore },\n get listIssueReactions() { return reactions.listIssueReactionsCore },\n get addIssueReaction() { return reactions.addIssueReactionCore },\n get listCommentReactions() { return reactions.listCommentReactionsCore },\n get addCommentReaction() { return reactions.addCommentReactionCore },\n get listDiscussions() { return discussions.listDiscussionsCore },\n get getDiscussion() { return discussions.getDiscussionCore },\n get addDiscussionComment() { return discussions.addDiscussionCommentCore },\n get listNotifications() { return notifications.listNotificationsCore },\n get markNotificationRead() { return notifications.markNotificationReadCore },\n get searchCode() { return search.searchCodeCore },\n get searchRepositories() { return search.searchRepositoriesCore },\n get searchIssues() { return search.searchIssuesCore },\n get listCommits() { return commits.listCommitsCore },\n get getCommit() { return commits.getCommitCore },\n get getBlame() { return commits.getBlameCore },\n get compareCommits() { return commits.compareCommitsCore },\n get listGists() { return gists.listGistsCore },\n get getGist() { return gists.getGistCore },\n get listGistComments() { return gists.listGistCommentsCore },\n get createGist() { return gists.createGistCore },\n get updateGist() { return gists.updateGistCore },\n get deleteGist() { return gists.deleteGistCore },\n get createGistComment() { return gists.createGistCommentCore },\n get listWorkflows() { return workflows.listWorkflowsCore },\n get listWorkflowRuns() { return workflows.listWorkflowRunsCore },\n get getWorkflowRun() { return workflows.getWorkflowRunCore },\n get listWorkflowJobs() { return workflows.listWorkflowJobsCore },\n get getWorkflowJobLogs() { return workflows.getWorkflowJobLogsCore },\n get triggerWorkflow() { return workflows.triggerWorkflowCore },\n get cancelWorkflowRun() { return workflows.cancelWorkflowRunCore },\n get rerunWorkflowRun() { return workflows.rerunWorkflowRunCore },\n get listCheckRuns() { return checks.listCheckRunsCore },\n get getCombinedStatus() { return checks.getCombinedStatusCore },\n get createCommitStatus() { return checks.createCommitStatusCore },\n get getCiFailureContext() { return bundles.getCiFailureContextCore },\n get listReleases() { return releases.listReleasesCore },\n get getLatestRelease() { return releases.getLatestReleaseCore },\n get getRelease() { return releases.getReleaseCore },\n get getReleaseContext() { return bundles.getReleaseContextCore },\n get createRelease() { return releases.createReleaseCore },\n get updateRelease() { return releases.updateReleaseCore },\n get deleteRelease() { return releases.deleteReleaseCore },\n get listCodeScanningAlerts() { return security.listCodeScanningAlertsCore },\n get listDependabotAlerts() { return security.listDependabotAlertsCore },\n get listSecretScanningAlerts() { return security.listSecretScanningAlertsCore },\n} satisfies Record<GithubToolName, (args: never) => Promise<unknown>>\n"],"mappings":"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"}