@github-tools/sdk 1.11.0 → 1.12.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 (38) hide show
  1. package/README.md +15 -3
  2. package/dist/connect/eve.d.mts +2 -2
  3. package/dist/connect/eve.mjs +1 -1
  4. package/dist/connect.d.mts +3 -3
  5. package/dist/connect.d.mts.map +1 -1
  6. package/dist/connect.mjs +2 -2
  7. package/dist/{eve-runtime-DXZgfCMb.mjs → eve-runtime-3asyv7YM.mjs} +90 -20
  8. package/dist/eve-runtime-3asyv7YM.mjs.map +1 -0
  9. package/dist/{eve-runtime-BqfQZAP7.d.mts → eve-runtime-BmoVTbEU.d.mts} +30 -7
  10. package/dist/eve-runtime-BmoVTbEU.d.mts.map +1 -0
  11. package/dist/eve-runtime.d.mts +4 -4
  12. package/dist/eve-runtime.mjs +3 -3
  13. package/dist/eve.d.mts +4 -4
  14. package/dist/eve.d.mts.map +1 -1
  15. package/dist/eve.mjs +3 -3
  16. package/dist/eve.mjs.map +1 -1
  17. package/dist/{index-BNeMjmgp.d.mts → index-CGeFo38P.d.mts} +15 -2
  18. package/dist/index-CGeFo38P.d.mts.map +1 -0
  19. package/dist/index.d.mts +2 -2
  20. package/dist/index.mjs +2 -2
  21. package/dist/{src-jQWS2Txw.mjs → src-D45Onmsn.mjs} +20 -3
  22. package/dist/{src-jQWS2Txw.mjs.map → src-D45Onmsn.mjs.map} +1 -1
  23. package/dist/{token-OPdZa0t3.mjs → token-BIn80-XU.mjs} +17 -3
  24. package/dist/token-BIn80-XU.mjs.map +1 -0
  25. package/dist/{types-BD5YvGxm.d.mts → types-CiNZNOXa.d.mts} +3 -3
  26. package/dist/{types-BD5YvGxm.d.mts.map → types-CiNZNOXa.d.mts.map} +1 -1
  27. package/dist/{types-BDO-Mmn6.d.mts → types-CoTpsxxp.d.mts} +2 -2
  28. package/dist/{types-BDO-Mmn6.d.mts.map → types-CoTpsxxp.d.mts.map} +1 -1
  29. package/dist/workflow.d.mts +1 -1
  30. package/dist/workflow.mjs +2 -2
  31. package/dist/{write-tools-Dk32V9Hl.mjs → write-tools-CnJE0Vvu.mjs} +1568 -1327
  32. package/dist/write-tools-CnJE0Vvu.mjs.map +1 -0
  33. package/package.json +4 -4
  34. package/dist/eve-runtime-BqfQZAP7.d.mts.map +0 -1
  35. package/dist/eve-runtime-DXZgfCMb.mjs.map +0 -1
  36. package/dist/index-BNeMjmgp.d.mts.map +0 -1
  37. package/dist/token-OPdZa0t3.mjs.map +0 -1
  38. package/dist/write-tools-Dk32V9Hl.mjs.map +0 -1
package/README.md CHANGED
@@ -186,6 +186,18 @@ Supported override properties:
186
186
 
187
187
  Core properties (`execute`, `inputSchema`, `outputSchema`) cannot be overridden.
188
188
 
189
+ ## Rate-limit metadata
190
+
191
+ Object-shaped tool results include a `rateLimit` field from the last GitHub response. Array-shaped results are unchanged. The field is stripped before the model sees the output; hooks, channels, and UIs still receive it.
192
+
193
+ ```ts
194
+ import type { GithubRateLimit } from '@github-tools/sdk'
195
+
196
+ result.rateLimit?.remaining
197
+ ```
198
+
199
+ `resource` is `core`, `search`, or `graphql`. On HTTP 403/429 the thrown error message also includes remaining/reset.
200
+
189
201
  ## Commit Attribution
190
202
 
191
203
  Control how commits are attributed when using `createOrUpdateFile` or `mergePullRequest`:
@@ -368,7 +380,7 @@ export default githubExtension({
368
380
 
369
381
  No `build.externalDependencies` workaround is needed here. Unlike the deprecated direct import below, the extension is pre-built via `eve extension build` and loaded through eve's extension mechanism rather than inlined from a workspace-linked source import.
370
382
 
371
- See [`packages/github-tools-eve-extension`](../github-tools-eve-extension) and [`examples/eve-extension-agent`](../../examples/eve-extension-agent) for the full package README and a runnable agent.
383
+ See [`packages/github-tools-eve-extension`](../github-tools-eve-extension) and [`examples/eve`](../../examples/eve) for the full package README and a runnable agent.
372
384
 
373
385
  ### eve, direct import (deprecated)
374
386
 
@@ -402,7 +414,7 @@ Dynamic tools are named by their **bare map key**: the model sees `listPullReque
402
414
  | Value | Maps to | Behavior |
403
415
  |---|---|---|
404
416
  | `true` / `'always'` | `always()` | Require approval on every call |
405
- | `false` / `'never'` | `never()` | Skip approval |
417
+ | `false` / `'never'` | omit `approval` | Skip approval (eve default) |
406
418
  | `'once'` | `once()` | Approve once per session, then auto-allow |
407
419
  | predicate | custom `Approval` | Input-dependent gate; booleans map to `user-approval` / `not-applicable` |
408
420
  | `always()` / `once()` / `never()` | passthrough | Use eve helpers directly |
@@ -455,7 +467,7 @@ Add `build: { externalDependencies: ['@vercel/connect'] }` to `agent.ts`. See [V
455
467
 
456
468
  > `eve` is an optional peer dependency, install it only when using the `/eve` subpath.
457
469
 
458
- See [`examples/eve-agent`](../../examples/eve-agent) for a minimal agent.
470
+ New agents should use the [eve extension](#eve-extension) above; see [`examples/eve`](../../examples/eve).
459
471
 
460
472
  ## Available Tools
461
473
 
@@ -1,5 +1,5 @@
1
- import { $t as GithubToolName } from "../index-BNeMjmgp.mjs";
2
- import { a as GithubConnectorInput, t as ConnectGithubEveToolsOptions } from "../types-BD5YvGxm.mjs";
1
+ import { en as GithubToolName } from "../index-CGeFo38P.mjs";
2
+ import { a as GithubConnectorInput, t as ConnectGithubEveToolsOptions } from "../types-CiNZNOXa.mjs";
3
3
  //#region src/connect/eve.d.ts
4
4
  /**
5
5
  * Register eve GitHub tools backed by a Vercel Connect connector.
@@ -1,5 +1,5 @@
1
1
  import { createGithubTools } from "../eve.mjs";
2
- import { t as connectGithubToken } from "../token-OPdZa0t3.mjs";
2
+ import { t as connectGithubToken } from "../token-BIn80-XU.mjs";
3
3
  //#region src/connect/eve.ts
4
4
  /**
5
5
  * Register eve GitHub tools backed by a Vercel Connect connector.
@@ -1,6 +1,5 @@
1
- import { $t as GithubToolName, It as GithubTokenInput, Mt as AllGithubTools, Yt as GithubToolPreset } from "./index-BNeMjmgp.mjs";
2
- import { a as GithubConnectorInput, i as GithubConnectParams, n as ConnectGithubTokenOptions, o as resolveGithubConnector, r as ConnectGithubToolsOptions, t as ConnectGithubEveToolsOptions } from "./types-BD5YvGxm.mjs";
3
- import "./eve-runtime-BqfQZAP7.mjs";
1
+ import { Lt as GithubTokenInput, Nt as AllGithubTools, Xt as GithubToolPreset, en as GithubToolName } from "./index-CGeFo38P.mjs";
2
+ import { a as GithubConnectorInput, i as GithubConnectParams, n as ConnectGithubTokenOptions, o as resolveGithubConnector, r as ConnectGithubToolsOptions, t as ConnectGithubEveToolsOptions } from "./types-CiNZNOXa.mjs";
4
3
  import "@vercel/connect";
5
4
  //#region src/connect/scopes.d.ts
6
5
  /**
@@ -65,6 +64,7 @@ declare const TOOL_CONNECT_SCOPES: {
65
64
  readonly listIssues: readonly ["contents:read", "metadata:read", "issues:read"];
66
65
  readonly getIssue: readonly ["contents:read", "metadata:read", "issues:read"];
67
66
  readonly getIssueContext: readonly ["contents:read", "metadata:read", "issues:read"];
67
+ readonly listIssueComments: readonly ["contents:read", "metadata:read", "issues:read"];
68
68
  readonly createIssue: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"];
69
69
  readonly addIssueComment: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"];
70
70
  readonly updateIssueComment: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"];
@@ -1 +1 @@
1
- {"version":3,"file":"connect.d.mts","names":[],"sources":["../src/connect/scopes.ts","../src/connect/token.ts","../src/connect/tools.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;cAwBa;;;;;;;;;;;;;;;;cA0IA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoGG,6BACd,SAAS,mBAAmB;;;;;iBAcd,4BAA4B,gBAAgB;KAUhD;EACV,SAAS,mBAAmB;EAC5B,mBAAmB;EACnB,mBAAmB;;;;;;;;;;iBA6BL,gCAAgC,YAAW;;;;;;;;;;;;iBChT3C,mBACd,WAAW,sBACX,UAAS,4BACR;;;;;;;;;;iBCNa,mBACd,WAAW,sBACX,UAAS,4BAAA,iBAA8B,KAAA,gBAAA"}
1
+ {"version":3,"file":"connect.d.mts","names":[],"sources":["../src/connect/scopes.ts","../src/connect/token.ts","../src/connect/tools.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;cAwBa;;;;;;;;;;;;;;;;cA0IA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAqGG,6BACd,SAAS,mBAAmB;;;;;iBAcd,4BAA4B,gBAAgB;KAUhD;EACV,SAAS,mBAAmB;EAC5B,mBAAmB;EACnB,mBAAmB;;;;;;;;;;iBA6BL,gCAAgC,YAAW;;;;;;;;;;;;iBCjT3C,mBACd,WAAW,sBACX,UAAS,4BACR;;;;;;;;;;iBCNa,mBACd,WAAW,sBACX,UAAS,4BAAA,iBAA8B,KAAA,gBAAA"}
package/dist/connect.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { t as createGithubTools } from "./src-jQWS2Txw.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-OPdZa0t3.mjs";
1
+ import { t as createGithubTools } from "./src-D45Onmsn.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-BIn80-XU.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 { $ as listWorkflowJobsDescription, $n as getIssueDescription, $r as requestReviewersDescription, $t as searchRepositoriesDescription, A as getLatestReleaseInputSchema, Ai as getRepositoryDescription, An as addAssigneesInputSchema, Ar as createPullRequestInputSchema, At as listGistsInputSchema, B as getCombinedStatusCore, Bn as createIssueCore, Br as listPullRequestFilesCore, Bt as getCommitCore, C as createReleaseDescription, Ci as forkRepositoryCore, Cn as listCommentReactionsDescription, Cr as updateLabelDescription, Ct as getGistDescription, D as deleteReleaseInputSchema, Di as getFileContentDescription, Dn as listIssueReactionsInputSchema, Dr as addPullRequestCommentInputSchema, Dt as listGistCommentsInputSchema, E as deleteReleaseDescription, Ei as getFileContentCore, En as listIssueReactionsDescription, Er as addPullRequestCommentDescription, Et as listGistCommentsDescription, F as listReleasesDescription, Fi as listBranchesCore, Fn as addLabelsDescription, Fr as deletePullRequestCommentDescription, Ft as compareCommitsDescription, G as listCheckRunsInputSchema, Gn as createLabelInputSchema, Gr as listPullRequestReviewsInputSchema, Gt as listCommitsInputSchema, H as getCombinedStatusInputSchema, Hn as createIssueInputSchema, Hr as listPullRequestFilesInputSchema, Ht as getCommitInputSchema, I as listReleasesInputSchema, Ii as listBranchesDescription, In as addLabelsInputSchema, Ir as deletePullRequestCommentInputSchema, It as compareCommitsInputSchema, J as cancelWorkflowRunInputSchema, Jn as deleteIssueCommentInputSchema, Jr as listPullRequestsInputSchema, Jt as searchCodeInputSchema, K as cancelWorkflowRunCore, Kn as deleteIssueCommentCore, Kr as listPullRequestsCore, Kt as searchCodeCore, L as updateReleaseCore, Li as listBranchesInputSchema, Ln as closeIssueCore, Lr as getPullRequestCore, Lt as getBlameCore, M as getReleaseDescription, Mi as getRepositoryTreeCore, Mn as addIssueCommentDescription, Mr as createPullRequestReviewDescription, Mt as updateGistDescription, N as getReleaseInputSchema, Ni as getRepositoryTreeDescription, Nn as addIssueCommentInputSchema, Nr as createPullRequestReviewInputSchema, Nt as updateGistInputSchema, O as getLatestReleaseCore, Oi as getFileContentInputSchema, On as addAssigneesCore, Or as createPullRequestCore, Ot as listGistsCore, P as listReleasesCore, Pi as getRepositoryTreeInputSchema, Pn as addLabelsCore, Pr as deletePullRequestCommentCore, Pt as compareCommitsCore, Q as listWorkflowJobsCore, Qn as getIssueCore, Qr as requestReviewersCore, Qt as searchRepositoriesCore, R as updateReleaseDescription, Rn as closeIssueDescription, Rr as getPullRequestDescription, Rt as getBlameDescription, S as createReleaseCore, Si as createRepositoryInputSchema, Sn as listCommentReactionsCore, Sr as updateLabelCore, St as getGistCore, T as deleteReleaseCore, Ti as forkRepositoryInputSchema, Tn as listIssueReactionsCore, Tr as addPullRequestCommentCore, Tt as listGistCommentsCore, U as listCheckRunsCore, Un as createLabelCore, Ur as listPullRequestReviewsCore, Ut as listCommitsCore, V as getCombinedStatusDescription, Vn as createIssueDescription, Vr as listPullRequestFilesDescription, Vt as getCommitDescription, W as listCheckRunsDescription, Wn as createLabelDescription, Wr as listPullRequestReviewsDescription, Wt as listCommitsDescription, X as getWorkflowRunDescription, Xn as deleteLabelDescription, Xr as mergePullRequestDescription, Xt as searchIssuesDescription, Y as getWorkflowRunCore, Yn as deleteLabelCore, Yr as mergePullRequestCore, Yt as searchIssuesCore, Z as getWorkflowRunInputSchema, Zn as deleteLabelInputSchema, Zr as mergePullRequestInputSchema, Zt as searchIssuesInputSchema, _ as getPullRequestContextDescription, _i as createOrUpdateFileCore, _n as addCommentReactionDescription, _r as updateIssueCommentDescription, _t as createGistDescription, a as resolvePresetTools, ai as updatePullRequestDescription, an as markNotificationReadDescription, ar as listIssuesDescription, at as listWorkflowsDescription, b as getReleaseContextDescription, bi as createRepositoryCore, bn as addIssueReactionDescription, br as updateIssueDescription, bt as deleteGistDescription, c as mergeContextArgs, ci as resolveGithubToken, cn as addDiscussionCommentDescription, cr as listLabelsDescription, ct as rerunWorkflowRunDescription, d as getCiFailureContextDescription, di as getFileContentToModelOutput, dn as getDiscussionDescription, dr as removeAssigneesDescription, dt as triggerWorkflowDescription, ei as requestReviewersInputSchema, en as searchRepositoriesInputSchema, er as getIssueInputSchema, et as listWorkflowJobsInputSchema, f as getCiFailureContextInputSchema, fi as getPullRequestContextToModelOutput, fn as getDiscussionInputSchema, fr as removeAssigneesInputSchema, ft as triggerWorkflowInputSchema, g as getPullRequestContextCore, gi as createBranchInputSchema, gn as addCommentReactionCore, gr as updateIssueCommentCore, gt as createGistCore, h as getIssueContextInputSchema, hi as createBranchDescription, hn as listDiscussionsInputSchema, hr as removeLabelInputSchema, ht as createGistCommentInputSchema, ii as updatePullRequestCore, in as markNotificationReadCore, ir as listIssuesCore, it as listWorkflowsCore, j as getReleaseCore, ji as getRepositoryInputSchema, jn as addIssueCommentCore, jr as createPullRequestReviewCore, jt as updateGistCore, k as getLatestReleaseDescription, ki as getRepositoryCore, kn as addAssigneesDescription, kr as createPullRequestDescription, kt as listGistsDescription, l as softenContextSchema, li as compareCommitsToModelOutput, ln as addDiscussionCommentInputSchema, lr as listLabelsInputSchema, lt as rerunWorkflowRunInputSchema, m as getIssueContextDescription, mi as createBranchCore, mn as listDiscussionsDescription, mr as removeLabelDescription, mt as createGistCommentDescription, n as ALL_GITHUB_TOOL_NAMES, ni as updatePullRequestCommentDescription, nn as listNotificationsDescription, nr as listIssueCommentsDescription, nt as listWorkflowRunsDescription, oi as updatePullRequestInputSchema, on as markNotificationReadInputSchema, or as listIssuesInputSchema, ot as listWorkflowsInputSchema, p as getIssueContextCore, pi as listPullRequestFilesToModelOutput, pn as listDiscussionsCore, pr as removeLabelCore, pt as createGistCommentCore, q as cancelWorkflowRunDescription, qn as deleteIssueCommentDescription, qr as listPullRequestsDescription, qt as searchCodeDescription, ri as updatePullRequestCommentInputSchema, rn as listNotificationsInputSchema, rr as listIssueCommentsInputSchema, rt as listWorkflowRunsInputSchema, si as createGithubTokenResolver, sn as addDiscussionCommentCore, sr as listLabelsCore, st as rerunWorkflowRunCore, ti as updatePullRequestCommentCore, tn as listNotificationsCore, tr as listIssueCommentsCore, tt as listWorkflowRunsCore, u as getCiFailureContextCore, ui as getCommitToModelOutput, un as getDiscussionCore, ur as removeAssigneesCore, ut as triggerWorkflowCore, v as getPullRequestContextInputSchema, vi as createOrUpdateFileDescription, vn as addCommentReactionInputSchema, vr as updateIssueCommentInputSchema, vt as createGistInputSchema, w as createReleaseInputSchema, wi as forkRepositoryDescription, wn as listCommentReactionsInputSchema, wr as updateLabelInputSchema, wt as getGistInputSchema, x as getReleaseContextInputSchema, xi as createRepositoryDescription, xn as addIssueReactionInputSchema, xr as updateIssueInputSchema, xt as deleteGistInputSchema, y as getReleaseContextCore, yi as createOrUpdateFileInputSchema, yn as addIssueReactionCore, yr as updateIssueCore, yt as deleteGistCore, z as updateReleaseInputSchema, zn as closeIssueInputSchema, zr as getPullRequestInputSchema, zt as getBlameInputSchema } from "./write-tools-Dk32V9Hl.mjs";
1
+ import { $ as listWorkflowJobsDescription, $n as getIssueDescription, $r as requestReviewersDescription, $t as searchRepositoriesDescription, A as getLatestReleaseInputSchema, Ai as getRepositoryDescription, An as addAssigneesInputSchema, Ar as createPullRequestInputSchema, At as listGistsInputSchema, B as getCombinedStatusCore, Bn as createIssueCore, Br as listPullRequestFilesCore, Bt as getCommitCore, C as createReleaseDescription, Ci as forkRepositoryCore, Cn as listCommentReactionsDescription, Cr as updateLabelDescription, Ct as getGistDescription, D as deleteReleaseInputSchema, Di as getFileContentDescription, Dn as listIssueReactionsInputSchema, Dr as addPullRequestCommentInputSchema, Dt as listGistCommentsInputSchema, E as deleteReleaseDescription, Ei as getFileContentCore, En as listIssueReactionsDescription, Er as addPullRequestCommentDescription, Et as listGistCommentsDescription, F as listReleasesDescription, Fi as listBranchesCore, Fn as addLabelsDescription, Fr as deletePullRequestCommentDescription, Ft as compareCommitsDescription, G as listCheckRunsInputSchema, Gn as createLabelInputSchema, Gr as listPullRequestReviewsInputSchema, Gt as listCommitsInputSchema, H as getCombinedStatusInputSchema, Hn as createIssueInputSchema, Hr as listPullRequestFilesInputSchema, Ht as getCommitInputSchema, I as listReleasesInputSchema, Ii as listBranchesDescription, In as addLabelsInputSchema, Ir as deletePullRequestCommentInputSchema, It as compareCommitsInputSchema, J as cancelWorkflowRunInputSchema, Jn as deleteIssueCommentInputSchema, Jr as listPullRequestsInputSchema, Jt as searchCodeInputSchema, K as cancelWorkflowRunCore, Kn as deleteIssueCommentCore, Kr as listPullRequestsCore, Kt as searchCodeCore, L as updateReleaseCore, Li as listBranchesInputSchema, Ln as closeIssueCore, Lr as getPullRequestCore, Lt as getBlameCore, M as getReleaseDescription, Mi as getRepositoryTreeCore, Mn as addIssueCommentDescription, Mr as createPullRequestReviewDescription, Mt as updateGistDescription, N as getReleaseInputSchema, Ni as getRepositoryTreeDescription, Nn as addIssueCommentInputSchema, Nr as createPullRequestReviewInputSchema, Nt as updateGistInputSchema, O as getLatestReleaseCore, Oi as getFileContentInputSchema, On as addAssigneesCore, Or as createPullRequestCore, Ot as listGistsCore, P as listReleasesCore, Pi as getRepositoryTreeInputSchema, Pn as addLabelsCore, Pr as deletePullRequestCommentCore, Pt as compareCommitsCore, Q as listWorkflowJobsCore, Qn as getIssueCore, Qr as requestReviewersCore, Qt as searchRepositoriesCore, R as updateReleaseDescription, Rn as closeIssueDescription, Rr as getPullRequestDescription, Rt as getBlameDescription, S as createReleaseCore, Si as createRepositoryInputSchema, Sn as listCommentReactionsCore, Sr as updateLabelCore, St as getGistCore, T as deleteReleaseCore, Ti as forkRepositoryInputSchema, Tn as listIssueReactionsCore, Tr as addPullRequestCommentCore, Tt as listGistCommentsCore, U as listCheckRunsCore, Un as createLabelCore, Ur as listPullRequestReviewsCore, Ut as listCommitsCore, V as getCombinedStatusDescription, Vn as createIssueDescription, Vr as listPullRequestFilesDescription, Vt as getCommitDescription, W as listCheckRunsDescription, Wn as createLabelDescription, Wr as listPullRequestReviewsDescription, Wt as listCommitsDescription, X as getWorkflowRunDescription, Xn as deleteLabelDescription, Xr as mergePullRequestDescription, Xt as searchIssuesDescription, Y as getWorkflowRunCore, Yn as deleteLabelCore, Yr as mergePullRequestCore, Yt as searchIssuesCore, Z as getWorkflowRunInputSchema, Zn as deleteLabelInputSchema, Zr as mergePullRequestInputSchema, Zt as searchIssuesInputSchema, _ as getPullRequestContextDescription, _i as createOrUpdateFileCore, _n as addCommentReactionDescription, _r as updateIssueCommentDescription, _t as createGistDescription, a as resolvePresetTools, ai as updatePullRequestDescription, an as markNotificationReadDescription, ar as listIssuesDescription, at as listWorkflowsDescription, b as getReleaseContextDescription, bi as createRepositoryCore, bn as addIssueReactionDescription, br as updateIssueDescription, bt as deleteGistDescription, c as mergeContextArgs, ci as resolveGithubToken, cn as addDiscussionCommentDescription, cr as listLabelsDescription, ct as rerunWorkflowRunDescription, d as getCiFailureContextDescription, di as getFileContentToModelOutput, dn as getDiscussionDescription, dr as removeAssigneesDescription, dt as triggerWorkflowDescription, ei as requestReviewersInputSchema, en as searchRepositoriesInputSchema, er as getIssueInputSchema, et as listWorkflowJobsInputSchema, f as getCiFailureContextInputSchema, fi as getPullRequestContextToModelOutput, fn as getDiscussionInputSchema, fr as removeAssigneesInputSchema, ft as triggerWorkflowInputSchema, g as getPullRequestContextCore, gi as createBranchInputSchema, gn as addCommentReactionCore, gr as updateIssueCommentCore, gt as createGistCore, h as getIssueContextInputSchema, hi as createBranchDescription, hn as listDiscussionsInputSchema, hr as removeLabelInputSchema, ht as createGistCommentInputSchema, ii as updatePullRequestCore, in as markNotificationReadCore, ir as listIssuesCore, it as listWorkflowsCore, j as getReleaseCore, ji as getRepositoryInputSchema, jn as addIssueCommentCore, jr as createPullRequestReviewCore, jt as updateGistCore, k as getLatestReleaseDescription, ki as getRepositoryCore, kn as addAssigneesDescription, kr as createPullRequestDescription, kt as listGistsDescription, l as softenContextSchema, li as compareCommitsToModelOutput, ln as addDiscussionCommentInputSchema, lr as listLabelsInputSchema, lt as rerunWorkflowRunInputSchema, m as getIssueContextDescription, mi as createBranchCore, mn as listDiscussionsDescription, mr as removeLabelDescription, mt as createGistCommentDescription, n as ALL_GITHUB_TOOL_NAMES, ni as updatePullRequestCommentDescription, nn as listNotificationsDescription, nr as listIssueCommentsDescription, nt as listWorkflowRunsDescription, oi as updatePullRequestInputSchema, on as markNotificationReadInputSchema, or as listIssuesInputSchema, ot as listWorkflowsInputSchema, p as getIssueContextCore, pi as listPullRequestFilesToModelOutput, pn as listDiscussionsCore, pr as removeLabelCore, pt as createGistCommentCore, q as cancelWorkflowRunDescription, qn as deleteIssueCommentDescription, qr as listPullRequestsDescription, qt as searchCodeDescription, ri as updatePullRequestCommentInputSchema, rn as listNotificationsInputSchema, rr as listIssueCommentsInputSchema, rt as listWorkflowRunsInputSchema, si as createGithubTokenResolver, sn as addDiscussionCommentCore, sr as listLabelsCore, st as rerunWorkflowRunCore, ti as updatePullRequestCommentCore, tn as listNotificationsCore, tr as listIssueCommentsCore, tt as listWorkflowRunsCore, u as getCiFailureContextCore, ui as getCommitToModelOutput, un as getDiscussionCore, ur as removeAssigneesCore, ut as triggerWorkflowCore, v as getPullRequestContextInputSchema, vi as createOrUpdateFileDescription, vn as addCommentReactionInputSchema, vr as updateIssueCommentInputSchema, vt as createGistInputSchema, w as createReleaseInputSchema, wi as forkRepositoryDescription, wn as listCommentReactionsInputSchema, wr as updateLabelInputSchema, wt as getGistInputSchema, x as getReleaseContextInputSchema, xi as createRepositoryDescription, xn as addIssueReactionInputSchema, xr as updateIssueInputSchema, xt as deleteGistInputSchema, y as getReleaseContextCore, yi as createOrUpdateFileInputSchema, yn as addIssueReactionCore, yr as updateIssueCore, yt as deleteGistCore, z as updateReleaseInputSchema, zi as stripRateLimit, zn as closeIssueInputSchema, zr as getPullRequestInputSchema, zt as getBlameInputSchema } from "./write-tools-CnJE0Vvu.mjs";
2
2
  import * as eveTools from "eve/tools";
3
3
  import * as eveApproval from "eve/tools/approval";
4
4
  //#region src/eve/load-eve.ts
@@ -11,6 +11,14 @@ function getEveApprovalHelpers() {
11
11
  }
12
12
  //#endregion
13
13
  //#region src/eve/approval.ts
14
+ /**
15
+ * `false` / `'never'` should omit the tool `approval` field entirely.
16
+ * eve treats a missing `approval` like `never()`; attaching `never()` is
17
+ * redundant and has caused approval UI noise on some channels.
18
+ */
19
+ function isEveApprovalDisabled(value) {
20
+ return value === false || value === "never";
21
+ }
14
22
  function mapEveApprovalValue(value) {
15
23
  if (typeof value === "function") return value;
16
24
  const { always, never, once } = getEveApprovalHelpers();
@@ -27,6 +35,20 @@ function resolveEveApproval(toolName, config) {
27
35
  if (value === void 0) return getEveApprovalHelpers().always();
28
36
  return mapEveApprovalValue(value);
29
37
  }
38
+ /**
39
+ * Approval to attach on a write tool, or `undefined` to omit the field.
40
+ * Prefer this when building `defineTool` values so `false` / `'never'` do not
41
+ * attach a redundant `never()` handler.
42
+ */
43
+ function resolveEveToolApproval(toolName, config, override) {
44
+ if (override !== void 0) {
45
+ if (isEveApprovalDisabled(override)) return void 0;
46
+ return mapEveApprovalValue(override);
47
+ }
48
+ if (config === false) return void 0;
49
+ if (typeof config === "object" && config !== null && isEveApprovalDisabled(config[toolName])) return;
50
+ return resolveEveApproval(toolName, config);
51
+ }
30
52
  //#endregion
31
53
  //#region src/eve/registry.ts
32
54
  function withToken(core, ctx, extra) {
@@ -43,6 +65,39 @@ function modelOutputAdapter(fn) {
43
65
  output
44
66
  });
45
67
  }
68
+ const GITHUB_EVE_TOOL_MODEL_OUTPUT = {
69
+ getFileContent: modelOutputAdapter(getFileContentToModelOutput),
70
+ listPullRequestFiles: modelOutputAdapter(listPullRequestFilesToModelOutput),
71
+ getPullRequestContext: modelOutputAdapter(getPullRequestContextToModelOutput),
72
+ getCommit: modelOutputAdapter(getCommitToModelOutput),
73
+ compareCommits: modelOutputAdapter(compareCommitsToModelOutput)
74
+ };
75
+ /** Whether a GitHub tool has a built-in eve `toModelOutput` projection. */
76
+ function hasGithubEveToolModelOutput(name) {
77
+ return Object.hasOwn(GITHUB_EVE_TOOL_MODEL_OUTPUT, name);
78
+ }
79
+ /**
80
+ * Apply the built-in eve `toModelOutput` projection for a tool.
81
+ * Strips `rateLimit` so it never reaches the model. Tools without a dedicated
82
+ * formatter get `{ type: 'json', value }` of the remaining payload.
83
+ * Used by `@github-tools/eve-extension` so the callback only closes over a serializable tool name.
84
+ */
85
+ function formatGithubEveToolOutput(name, output) {
86
+ const stripped = stripRateLimit(output);
87
+ if (isErrorPayload(stripped)) return {
88
+ type: "json",
89
+ value: stripped
90
+ };
91
+ const format = GITHUB_EVE_TOOL_MODEL_OUTPUT[name];
92
+ if (!format) return {
93
+ type: "json",
94
+ value: stripped
95
+ };
96
+ return format(stripped);
97
+ }
98
+ function isErrorPayload(output) {
99
+ return output != null && typeof output === "object" && !Array.isArray(output) && typeof output.error === "string";
100
+ }
46
101
  function createToolRegistry(ctx) {
47
102
  const entries = [
48
103
  {
@@ -62,7 +117,7 @@ function createToolRegistry(ctx) {
62
117
  description: getFileContentDescription,
63
118
  inputSchema: getFileContentInputSchema,
64
119
  execute: withToken(getFileContentCore, ctx),
65
- toModelOutput: modelOutputAdapter(getFileContentToModelOutput)
120
+ toModelOutput: GITHUB_EVE_TOOL_MODEL_OUTPUT.getFileContent
66
121
  },
67
122
  {
68
123
  name: "getRepositoryTree",
@@ -161,7 +216,7 @@ function createToolRegistry(ctx) {
161
216
  description: listPullRequestFilesDescription,
162
217
  inputSchema: listPullRequestFilesInputSchema,
163
218
  execute: withToken(listPullRequestFilesCore, ctx),
164
- toModelOutput: modelOutputAdapter(listPullRequestFilesToModelOutput)
219
+ toModelOutput: GITHUB_EVE_TOOL_MODEL_OUTPUT.listPullRequestFiles
165
220
  },
166
221
  {
167
222
  name: "listPullRequestReviews",
@@ -188,7 +243,7 @@ function createToolRegistry(ctx) {
188
243
  description: getPullRequestContextDescription,
189
244
  inputSchema: getPullRequestContextInputSchema,
190
245
  execute: withToken(getPullRequestContextCore, ctx),
191
- toModelOutput: modelOutputAdapter(getPullRequestContextToModelOutput)
246
+ toModelOutput: GITHUB_EVE_TOOL_MODEL_OUTPUT.getPullRequestContext
192
247
  },
193
248
  {
194
249
  name: "getIssueContext",
@@ -398,7 +453,7 @@ function createToolRegistry(ctx) {
398
453
  description: getCommitDescription,
399
454
  inputSchema: getCommitInputSchema,
400
455
  execute: withToken(getCommitCore, ctx),
401
- toModelOutput: modelOutputAdapter(getCommitToModelOutput)
456
+ toModelOutput: GITHUB_EVE_TOOL_MODEL_OUTPUT.getCommit
402
457
  },
403
458
  {
404
459
  name: "getBlame",
@@ -411,7 +466,7 @@ function createToolRegistry(ctx) {
411
466
  description: compareCommitsDescription,
412
467
  inputSchema: compareCommitsInputSchema,
413
468
  execute: withToken(compareCommitsCore, ctx),
414
- toModelOutput: modelOutputAdapter(compareCommitsToModelOutput)
469
+ toModelOutput: GITHUB_EVE_TOOL_MODEL_OUTPUT.compareCommits
415
470
  },
416
471
  {
417
472
  name: "listGists",
@@ -583,11 +638,15 @@ async function executeGithubToolStep(name, input, ctx) {
583
638
  return entry.execute(input);
584
639
  }
585
640
  async function runGithubToolStep(name, input, ctx) {
586
- const token = await resolveGithubToken(ctx.token);
587
- return executeGithubToolStep(name, input, {
588
- ...ctx,
589
- token
590
- });
641
+ try {
642
+ const token = await resolveGithubToken(ctx.token);
643
+ return await executeGithubToolStep(name, input, {
644
+ ...ctx,
645
+ token
646
+ });
647
+ } catch (error) {
648
+ return { error: error instanceof Error ? error.message : String(error) };
649
+ }
591
650
  }
592
651
  //#endregion
593
652
  //#region src/eve/build.ts
@@ -601,13 +660,22 @@ function resolveAllowedToolNames(options) {
601
660
  function applyOverrides(tool, name, overrides) {
602
661
  const override = overrides?.[name];
603
662
  if (!override) return tool;
604
- return {
663
+ const next = {
605
664
  ...tool,
606
665
  ...override.description !== void 0 && { description: override.description },
607
- ...override.approval !== void 0 && { approval: mapEveApprovalValue(override.approval) },
608
666
  ...override.toModelOutput !== void 0 && { toModelOutput: override.toModelOutput },
609
667
  ...override.outputSchema !== void 0 && { outputSchema: override.outputSchema }
610
668
  };
669
+ if (override.approval === void 0) return next;
670
+ if (isEveApprovalDisabled(override.approval)) {
671
+ const rest = { ...next };
672
+ delete rest.approval;
673
+ return rest;
674
+ }
675
+ return {
676
+ ...next,
677
+ approval: mapEveApprovalValue(override.approval)
678
+ };
611
679
  }
612
680
  function buildEveToolDefinition(name, options = {}) {
613
681
  const { defineTool } = getEveTools();
@@ -620,11 +688,12 @@ function buildEveToolDefinition(name, options = {}) {
620
688
  };
621
689
  const entry = createToolRegistry(ctx).find((tool) => tool.name === name);
622
690
  if (!entry) throw new Error(`Unknown GitHub tool: ${name}`);
691
+ const approval = entry.writeTool ? resolveEveToolApproval(entry.writeTool, options.requireApproval) : void 0;
623
692
  return applyOverrides(defineTool({
624
693
  description: entry.description,
625
694
  inputSchema: entry.inputSchema,
626
- ...entry.writeTool && { approval: resolveEveApproval(entry.writeTool, options.requireApproval) },
627
- ...entry.toModelOutput && { toModelOutput: entry.toModelOutput },
695
+ ...approval && { approval },
696
+ toModelOutput: (output) => formatGithubEveToolOutput(name, output),
628
697
  execute: async (input) => runGithubToolStep(name, input, ctx)
629
698
  }), name, options.overrides);
630
699
  }
@@ -642,11 +711,12 @@ function buildEveToolMap(options = {}) {
642
711
  const tools = {};
643
712
  for (const entry of registry) {
644
713
  if (!isAllowed(entry.name)) continue;
714
+ const approval = entry.writeTool ? resolveEveToolApproval(entry.writeTool, options.requireApproval) : void 0;
645
715
  const tool = defineTool({
646
716
  description: entry.description,
647
717
  inputSchema: entry.inputSchema,
648
- ...entry.writeTool && { approval: resolveEveApproval(entry.writeTool, options.requireApproval) },
649
- ...entry.toModelOutput && { toModelOutput: entry.toModelOutput },
718
+ ...approval && { approval },
719
+ toModelOutput: (output) => formatGithubEveToolOutput(entry.name, output),
650
720
  execute: async (input) => runGithubToolStep(entry.name, input, ctx)
651
721
  });
652
722
  tools[entry.name] = applyOverrides(tool, entry.name, options.overrides);
@@ -655,7 +725,7 @@ function buildEveToolMap(options = {}) {
655
725
  }
656
726
  function createEveGithubToolsDynamic(options = {}) {
657
727
  const { defineDynamic } = getEveTools();
658
- return defineDynamic({ events: { "session.started": async () => buildEveToolMap(options) } });
728
+ return defineDynamic({ events: { "step.started": async () => buildEveToolMap(options) } });
659
729
  }
660
730
  function listResolvedEveToolNames(options = {}) {
661
731
  const isAllowed = resolveAllowedToolNames(options);
@@ -696,6 +766,6 @@ async function executeGithubEveTool(name, input, options = {}) {
696
766
  });
697
767
  }
698
768
  //#endregion
699
- export { listEveToolDescriptors as a, resolveEveApproval as c, executeGithubEveTool as i, MISSING_EVE_MESSAGE as l, buildEveToolMap as n, listResolvedEveToolNames as o, createEveGithubToolsDynamic as r, mapEveApprovalValue as s, buildEveToolDefinition as t };
769
+ export { listEveToolDescriptors as a, hasGithubEveToolModelOutput as c, resolveEveApproval as d, resolveEveToolApproval as f, executeGithubEveTool as i, isEveApprovalDisabled as l, buildEveToolMap as n, listResolvedEveToolNames as o, MISSING_EVE_MESSAGE as p, createEveGithubToolsDynamic as r, formatGithubEveToolOutput as s, buildEveToolDefinition as t, mapEveApprovalValue as u };
700
770
 
701
- //# sourceMappingURL=eve-runtime-DXZgfCMb.mjs.map
771
+ //# sourceMappingURL=eve-runtime-3asyv7YM.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eve-runtime-3asyv7YM.mjs","names":["repository.getRepositoryDescription","repository.getRepositoryInputSchema","repository.getRepositoryCore","repository.listBranchesDescription","repository.listBranchesInputSchema","repository.listBranchesCore","repository.getFileContentDescription","repository.getFileContentInputSchema","repository.getFileContentCore","repository.getRepositoryTreeDescription","repository.getRepositoryTreeInputSchema","repository.getRepositoryTreeCore","repository.createBranchDescription","repository.createBranchInputSchema","repository.createBranchCore","repository.forkRepositoryDescription","repository.forkRepositoryInputSchema","repository.forkRepositoryCore","repository.createRepositoryDescription","repository.createRepositoryInputSchema","repository.createRepositoryCore","repository.createOrUpdateFileDescription","repository.createOrUpdateFileInputSchema","repository.createOrUpdateFileCore","pullRequests.listPullRequestsDescription","pullRequests.listPullRequestsInputSchema","pullRequests.listPullRequestsCore","pullRequests.getPullRequestDescription","pullRequests.getPullRequestInputSchema","pullRequests.getPullRequestCore","pullRequests.createPullRequestDescription","pullRequests.createPullRequestInputSchema","pullRequests.createPullRequestCore","pullRequests.mergePullRequestDescription","pullRequests.mergePullRequestInputSchema","pullRequests.mergePullRequestCore","pullRequests.updatePullRequestDescription","pullRequests.updatePullRequestInputSchema","pullRequests.updatePullRequestCore","pullRequests.addPullRequestCommentDescription","pullRequests.addPullRequestCommentInputSchema","pullRequests.addPullRequestCommentCore","pullRequests.updatePullRequestCommentDescription","pullRequests.updatePullRequestCommentInputSchema","pullRequests.updatePullRequestCommentCore","pullRequests.deletePullRequestCommentDescription","pullRequests.deletePullRequestCommentInputSchema","pullRequests.deletePullRequestCommentCore","pullRequests.listPullRequestFilesDescription","pullRequests.listPullRequestFilesInputSchema","pullRequests.listPullRequestFilesCore","pullRequests.listPullRequestReviewsDescription","pullRequests.listPullRequestReviewsInputSchema","pullRequests.listPullRequestReviewsCore","pullRequests.createPullRequestReviewDescription","pullRequests.createPullRequestReviewInputSchema","pullRequests.createPullRequestReviewCore","pullRequests.requestReviewersDescription","pullRequests.requestReviewersInputSchema","pullRequests.requestReviewersCore","bundles.getPullRequestContextDescription","bundles.getPullRequestContextInputSchema","bundles.getPullRequestContextCore","bundles.getIssueContextDescription","bundles.getIssueContextInputSchema","bundles.getIssueContextCore","issues.listIssuesDescription","issues.listIssuesInputSchema","issues.listIssuesCore","issues.getIssueDescription","issues.getIssueInputSchema","issues.getIssueCore","issues.listIssueCommentsDescription","issues.listIssueCommentsInputSchema","issues.listIssueCommentsCore","issues.createIssueDescription","issues.createIssueInputSchema","issues.createIssueCore","issues.addIssueCommentDescription","issues.addIssueCommentInputSchema","issues.addIssueCommentCore","issues.updateIssueCommentDescription","issues.updateIssueCommentInputSchema","issues.updateIssueCommentCore","issues.deleteIssueCommentDescription","issues.deleteIssueCommentInputSchema","issues.deleteIssueCommentCore","issues.closeIssueDescription","issues.closeIssueInputSchema","issues.closeIssueCore","issues.updateIssueDescription","issues.updateIssueInputSchema","issues.updateIssueCore","issues.listLabelsDescription","issues.listLabelsInputSchema","issues.listLabelsCore","issues.addLabelsDescription","issues.addLabelsInputSchema","issues.addLabelsCore","issues.removeLabelDescription","issues.removeLabelInputSchema","issues.removeLabelCore","issues.createLabelDescription","issues.createLabelInputSchema","issues.createLabelCore","issues.updateLabelDescription","issues.updateLabelInputSchema","issues.updateLabelCore","issues.deleteLabelDescription","issues.deleteLabelInputSchema","issues.deleteLabelCore","issues.addAssigneesDescription","issues.addAssigneesInputSchema","issues.addAssigneesCore","issues.removeAssigneesDescription","issues.removeAssigneesInputSchema","issues.removeAssigneesCore","reactions.listIssueReactionsDescription","reactions.listIssueReactionsInputSchema","reactions.listIssueReactionsCore","reactions.addIssueReactionDescription","reactions.addIssueReactionInputSchema","reactions.addIssueReactionCore","reactions.listCommentReactionsDescription","reactions.listCommentReactionsInputSchema","reactions.listCommentReactionsCore","reactions.addCommentReactionDescription","reactions.addCommentReactionInputSchema","reactions.addCommentReactionCore","discussions.listDiscussionsDescription","discussions.listDiscussionsInputSchema","discussions.listDiscussionsCore","discussions.getDiscussionDescription","discussions.getDiscussionInputSchema","discussions.getDiscussionCore","discussions.addDiscussionCommentDescription","discussions.addDiscussionCommentInputSchema","discussions.addDiscussionCommentCore","notifications.listNotificationsDescription","notifications.listNotificationsInputSchema","notifications.listNotificationsCore","notifications.markNotificationReadDescription","notifications.markNotificationReadInputSchema","notifications.markNotificationReadCore","search.searchCodeDescription","search.searchCodeInputSchema","search.searchCodeCore","search.searchRepositoriesDescription","search.searchRepositoriesInputSchema","search.searchRepositoriesCore","search.searchIssuesDescription","search.searchIssuesInputSchema","search.searchIssuesCore","commits.listCommitsDescription","commits.listCommitsInputSchema","commits.listCommitsCore","commits.getCommitDescription","commits.getCommitInputSchema","commits.getCommitCore","commits.getBlameDescription","commits.getBlameInputSchema","commits.getBlameCore","commits.compareCommitsDescription","commits.compareCommitsInputSchema","commits.compareCommitsCore","gists.listGistsDescription","gists.listGistsInputSchema","gists.listGistsCore","gists.getGistDescription","gists.getGistInputSchema","gists.getGistCore","gists.listGistCommentsDescription","gists.listGistCommentsInputSchema","gists.listGistCommentsCore","gists.createGistDescription","gists.createGistInputSchema","gists.createGistCore","gists.updateGistDescription","gists.updateGistInputSchema","gists.updateGistCore","gists.deleteGistDescription","gists.deleteGistInputSchema","gists.deleteGistCore","gists.createGistCommentDescription","gists.createGistCommentInputSchema","gists.createGistCommentCore","workflows.listWorkflowsDescription","workflows.listWorkflowsInputSchema","workflows.listWorkflowsCore","workflows.listWorkflowRunsDescription","workflows.listWorkflowRunsInputSchema","workflows.listWorkflowRunsCore","workflows.getWorkflowRunDescription","workflows.getWorkflowRunInputSchema","workflows.getWorkflowRunCore","workflows.listWorkflowJobsDescription","workflows.listWorkflowJobsInputSchema","workflows.listWorkflowJobsCore","workflows.triggerWorkflowDescription","workflows.triggerWorkflowInputSchema","workflows.triggerWorkflowCore","workflows.cancelWorkflowRunDescription","workflows.cancelWorkflowRunInputSchema","workflows.cancelWorkflowRunCore","workflows.rerunWorkflowRunDescription","workflows.rerunWorkflowRunInputSchema","workflows.rerunWorkflowRunCore","checks.listCheckRunsDescription","checks.listCheckRunsInputSchema","checks.listCheckRunsCore","checks.getCombinedStatusDescription","checks.getCombinedStatusInputSchema","checks.getCombinedStatusCore","bundles.getCiFailureContextDescription","bundles.getCiFailureContextInputSchema","bundles.getCiFailureContextCore","releases.listReleasesDescription","releases.listReleasesInputSchema","releases.listReleasesCore","releases.getLatestReleaseDescription","releases.getLatestReleaseInputSchema","releases.getLatestReleaseCore","releases.getReleaseDescription","releases.getReleaseInputSchema","releases.getReleaseCore","bundles.getReleaseContextDescription","bundles.getReleaseContextInputSchema","bundles.getReleaseContextCore","releases.createReleaseDescription","releases.createReleaseInputSchema","releases.createReleaseCore","releases.updateReleaseDescription","releases.updateReleaseInputSchema","releases.updateReleaseCore","releases.deleteReleaseDescription","releases.deleteReleaseInputSchema","releases.deleteReleaseCore"],"sources":["../src/eve/load-eve.ts","../src/eve/approval.ts","../src/eve/registry.ts","../src/eve/steps.ts","../src/eve/build.ts"],"sourcesContent":["import * as eveTools from 'eve/tools'\nimport * as eveApproval from 'eve/tools/approval'\n\n/**\n * Static ESM imports so bundlers (eve/Nitro/Vercel) can resolve `eve` when it is\n * compiled into the output rather than left as `node_modules/eve` at runtime.\n * Runtime `createRequire(\"eve/tools\")` fails in those targets.\n */\nexport type EveToolsModule = typeof import('eve/tools')\nexport type EveApprovalModule = typeof import('eve/tools/approval')\n\nexport const MISSING_EVE_MESSAGE =\n 'The \"eve\" package is required to use @github-tools/sdk/eve. Install it with: pnpm add eve'\n\nexport function getEveTools(): EveToolsModule {\n return eveTools\n}\n\nexport function getEveApprovalHelpers(): EveApprovalModule {\n return eveApproval\n}\n","import type { Approval, ApprovalPolicy } from 'eve/tools'\nimport type { GithubWriteToolName } from '../core/write-tools'\nimport { getEveApprovalHelpers } from './load-eve'\nimport type { EveApprovalConfig, EveApprovalValue } from './types'\n\n/**\n * `false` / `'never'` should omit the tool `approval` field entirely.\n * eve treats a missing `approval` like `never()`; attaching `never()` is\n * redundant and has caused approval UI noise on some channels.\n */\nexport function isEveApprovalDisabled(value: EveApprovalValue | undefined): boolean {\n return value === false || value === 'never'\n}\n\nexport function mapEveApprovalValue(value: EveApprovalValue): ApprovalPolicy {\n if (typeof value === 'function') return value\n\n const { always, never, once } = getEveApprovalHelpers()\n\n if (value === true || value === 'always') return always()\n if (value === false || value === 'never') return never()\n if (value === 'once') return once()\n\n return always()\n}\n\nexport function resolveEveApproval(\n toolName: GithubWriteToolName,\n config: EveApprovalConfig | undefined,\n): ApprovalPolicy {\n if (config === undefined) return getEveApprovalHelpers().always()\n if (config === true) return getEveApprovalHelpers().always()\n if (config === false) return getEveApprovalHelpers().never()\n\n const value = config[toolName]\n if (value === undefined) return getEveApprovalHelpers().always()\n\n return mapEveApprovalValue(value)\n}\n\n/**\n * Approval to attach on a write tool, or `undefined` to omit the field.\n * Prefer this when building `defineTool` values so `false` / `'never'` do not\n * attach a redundant `never()` handler.\n */\nexport function resolveEveToolApproval(\n toolName: GithubWriteToolName,\n config: EveApprovalConfig | undefined,\n override?: EveApprovalValue,\n): Approval | undefined {\n if (override !== undefined) {\n if (isEveApprovalDisabled(override)) return undefined\n return mapEveApprovalValue(override)\n }\n if (config === false) return undefined\n if (typeof config === 'object' && config !== null && isEveApprovalDisabled(config[toolName])) {\n return undefined\n }\n return resolveEveApproval(toolName, config)\n}\n","import type { ToolModelOutput } from 'eve/tools'\nimport type { z } from 'zod'\nimport type { CommitIdentity } from '../types'\nimport * as bundles from '../core/bundles'\nimport * as checks from '../core/checks'\nimport * as commits from '../core/commits'\nimport { mergeContextArgs, softenContextSchema, type GithubToolsContext } from '../core/context'\nimport * as discussions from '../core/discussions'\nimport * as gists from '../core/gists'\nimport * as issues from '../core/issues'\nimport * as notifications from '../core/notifications'\nimport {\n compareCommitsToModelOutput,\n getCommitToModelOutput,\n getFileContentToModelOutput,\n getPullRequestContextToModelOutput,\n listPullRequestFilesToModelOutput,\n} from '../core/model-output'\nimport * as pullRequests from '../core/pull-requests'\nimport * as reactions from '../core/reactions'\nimport * as releases from '../core/releases'\nimport * as repository from '../core/repository'\nimport * as search from '../core/search'\nimport * as workflows from '../core/workflows'\nimport { stripRateLimit } from '../core/rate-limit'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { GithubWriteToolName } from '../core/write-tools'\nimport type { GithubToolName } from '../core/tool-names'\nexport type { GithubToolName } from '../core/tool-names'\nexport { ALL_GITHUB_TOOL_NAMES } from '../core/tool-names'\n\nexport type ToolBuildContext = {\n token: GithubTokenInput\n context?: GithubToolsContext\n author?: CommitIdentity\n committer?: CommitIdentity\n coAuthors?: CommitIdentity[]\n}\n\ntype ToolRegistryEntry = {\n name: GithubToolName\n writeTool?: GithubWriteToolName\n description: string\n inputSchema: z.ZodType\n execute: (args: Record<string, unknown>) => Promise<unknown>\n toModelOutput?: (output: unknown) => ToolModelOutput\n}\n\nfunction withToken<T extends Record<string, unknown>>(\n core: (args: T & { token: string }) => Promise<unknown>,\n ctx: ToolBuildContext,\n extra?: Record<string, unknown>,\n) {\n return async (input: Record<string, unknown>) =>\n core({\n token: await resolveGithubToken(ctx.token),\n ...extra,\n ...mergeContextArgs(input, ctx.context ?? {}),\n } as T & { token: string })\n}\n\nfunction modelOutputAdapter(\n fn: (options: { toolCallId: string, input: unknown, output: unknown }) => { type: 'json' | 'text', value: unknown },\n) {\n return (output: unknown) => fn({ toolCallId: '', input: {}, output }) as ToolModelOutput\n}\n\nconst GITHUB_EVE_TOOL_MODEL_OUTPUT = {\n getFileContent: modelOutputAdapter(getFileContentToModelOutput),\n listPullRequestFiles: modelOutputAdapter(listPullRequestFilesToModelOutput),\n getPullRequestContext: modelOutputAdapter(getPullRequestContextToModelOutput),\n getCommit: modelOutputAdapter(getCommitToModelOutput),\n compareCommits: modelOutputAdapter(compareCommitsToModelOutput),\n} satisfies Partial<Record<GithubToolName, (output: unknown) => ToolModelOutput>>\n\n/** Whether a GitHub tool has a built-in eve `toModelOutput` projection. */\nexport function hasGithubEveToolModelOutput(name: GithubToolName): boolean {\n return Object.hasOwn(GITHUB_EVE_TOOL_MODEL_OUTPUT, name)\n}\n\n/**\n * Apply the built-in eve `toModelOutput` projection for a tool.\n * Strips `rateLimit` so it never reaches the model. Tools without a dedicated\n * formatter get `{ type: 'json', value }` of the remaining payload.\n * Used by `@github-tools/eve-extension` so the callback only closes over a serializable tool name.\n */\nexport function formatGithubEveToolOutput(name: GithubToolName, output: unknown): ToolModelOutput {\n const stripped = stripRateLimit(output)\n // `runGithubToolStep` returns `{ error }` when execute throws. The per-tool\n // formatters assume the success shape (e.g. `listPullRequestFilesToModelOutput`\n // calls `.map` on the payload), so dispatching an error payload would throw a\n // second time inside model-output formatting and re-break the tool loop.\n if (isErrorPayload(stripped)) {\n return { type: 'json', value: stripped }\n }\n const format = GITHUB_EVE_TOOL_MODEL_OUTPUT[name as keyof typeof GITHUB_EVE_TOOL_MODEL_OUTPUT]\n if (!format) {\n return { type: 'json', value: stripped }\n }\n return format(stripped)\n}\n\nfunction isErrorPayload(output: unknown): output is { error: string } {\n return (\n output != null\n && typeof output === 'object'\n && !Array.isArray(output)\n && typeof (output as { error?: unknown }).error === 'string'\n )\n}\n\nexport function createToolRegistry(ctx: ToolBuildContext): ToolRegistryEntry[] {\n const entries: ToolRegistryEntry[] = [\n {\n name: 'getRepository',\n description: repository.getRepositoryDescription,\n inputSchema: repository.getRepositoryInputSchema,\n execute: withToken(repository.getRepositoryCore, ctx),\n },\n {\n name: 'listBranches',\n description: repository.listBranchesDescription,\n inputSchema: repository.listBranchesInputSchema,\n execute: withToken(repository.listBranchesCore, ctx),\n },\n {\n name: 'getFileContent',\n description: repository.getFileContentDescription,\n inputSchema: repository.getFileContentInputSchema,\n execute: withToken(repository.getFileContentCore, ctx),\n toModelOutput: GITHUB_EVE_TOOL_MODEL_OUTPUT.getFileContent,\n },\n {\n name: 'getRepositoryTree',\n description: repository.getRepositoryTreeDescription,\n inputSchema: repository.getRepositoryTreeInputSchema,\n execute: withToken(repository.getRepositoryTreeCore, ctx),\n },\n {\n name: 'createBranch',\n writeTool: 'createBranch',\n description: repository.createBranchDescription,\n inputSchema: repository.createBranchInputSchema,\n execute: withToken(repository.createBranchCore, ctx),\n },\n {\n name: 'forkRepository',\n writeTool: 'forkRepository',\n description: repository.forkRepositoryDescription,\n inputSchema: repository.forkRepositoryInputSchema,\n execute: withToken(repository.forkRepositoryCore, ctx),\n },\n {\n name: 'createRepository',\n writeTool: 'createRepository',\n description: repository.createRepositoryDescription,\n inputSchema: repository.createRepositoryInputSchema,\n execute: withToken(repository.createRepositoryCore, ctx),\n },\n {\n name: 'createOrUpdateFile',\n writeTool: 'createOrUpdateFile',\n description: repository.createOrUpdateFileDescription,\n inputSchema: repository.createOrUpdateFileInputSchema,\n execute: withToken(repository.createOrUpdateFileCore, ctx, {\n author: ctx.author,\n committer: ctx.committer,\n coAuthors: ctx.coAuthors,\n }),\n },\n {\n name: 'listPullRequests',\n description: pullRequests.listPullRequestsDescription,\n inputSchema: pullRequests.listPullRequestsInputSchema,\n execute: withToken(pullRequests.listPullRequestsCore, ctx),\n },\n {\n name: 'getPullRequest',\n description: pullRequests.getPullRequestDescription,\n inputSchema: pullRequests.getPullRequestInputSchema,\n execute: withToken(pullRequests.getPullRequestCore, ctx),\n },\n {\n name: 'createPullRequest',\n writeTool: 'createPullRequest',\n description: pullRequests.createPullRequestDescription,\n inputSchema: pullRequests.createPullRequestInputSchema,\n execute: withToken(pullRequests.createPullRequestCore, ctx),\n },\n {\n name: 'mergePullRequest',\n writeTool: 'mergePullRequest',\n description: pullRequests.mergePullRequestDescription,\n inputSchema: pullRequests.mergePullRequestInputSchema,\n execute: withToken(pullRequests.mergePullRequestCore, ctx, { coAuthors: ctx.coAuthors }),\n },\n {\n name: 'updatePullRequest',\n writeTool: 'updatePullRequest',\n description: pullRequests.updatePullRequestDescription,\n inputSchema: pullRequests.updatePullRequestInputSchema,\n execute: withToken(pullRequests.updatePullRequestCore, ctx),\n },\n {\n name: 'addPullRequestComment',\n writeTool: 'addPullRequestComment',\n description: pullRequests.addPullRequestCommentDescription,\n inputSchema: pullRequests.addPullRequestCommentInputSchema,\n execute: withToken(pullRequests.addPullRequestCommentCore, ctx),\n },\n {\n name: 'updatePullRequestComment',\n writeTool: 'updatePullRequestComment',\n description: pullRequests.updatePullRequestCommentDescription,\n inputSchema: pullRequests.updatePullRequestCommentInputSchema,\n execute: withToken(pullRequests.updatePullRequestCommentCore, ctx),\n },\n {\n name: 'deletePullRequestComment',\n writeTool: 'deletePullRequestComment',\n description: pullRequests.deletePullRequestCommentDescription,\n inputSchema: pullRequests.deletePullRequestCommentInputSchema,\n execute: withToken(pullRequests.deletePullRequestCommentCore, ctx),\n },\n {\n name: 'listPullRequestFiles',\n description: pullRequests.listPullRequestFilesDescription,\n inputSchema: pullRequests.listPullRequestFilesInputSchema,\n execute: withToken(pullRequests.listPullRequestFilesCore, ctx),\n toModelOutput: GITHUB_EVE_TOOL_MODEL_OUTPUT.listPullRequestFiles,\n },\n {\n name: 'listPullRequestReviews',\n description: pullRequests.listPullRequestReviewsDescription,\n inputSchema: pullRequests.listPullRequestReviewsInputSchema,\n execute: withToken(pullRequests.listPullRequestReviewsCore, ctx),\n },\n {\n name: 'createPullRequestReview',\n writeTool: 'createPullRequestReview',\n description: pullRequests.createPullRequestReviewDescription,\n inputSchema: pullRequests.createPullRequestReviewInputSchema,\n execute: withToken(pullRequests.createPullRequestReviewCore, ctx),\n },\n {\n name: 'requestReviewers',\n writeTool: 'requestReviewers',\n description: pullRequests.requestReviewersDescription,\n inputSchema: pullRequests.requestReviewersInputSchema,\n execute: withToken(pullRequests.requestReviewersCore, ctx),\n },\n {\n name: 'getPullRequestContext',\n description: bundles.getPullRequestContextDescription,\n inputSchema: bundles.getPullRequestContextInputSchema,\n execute: withToken(bundles.getPullRequestContextCore, ctx),\n toModelOutput: GITHUB_EVE_TOOL_MODEL_OUTPUT.getPullRequestContext,\n },\n {\n name: 'getIssueContext',\n description: bundles.getIssueContextDescription,\n inputSchema: bundles.getIssueContextInputSchema,\n execute: withToken(bundles.getIssueContextCore, ctx),\n },\n {\n name: 'listIssues',\n description: issues.listIssuesDescription,\n inputSchema: issues.listIssuesInputSchema,\n execute: withToken(issues.listIssuesCore, ctx),\n },\n {\n name: 'getIssue',\n description: issues.getIssueDescription,\n inputSchema: issues.getIssueInputSchema,\n execute: withToken(issues.getIssueCore, ctx),\n },\n {\n name: 'listIssueComments',\n description: issues.listIssueCommentsDescription,\n inputSchema: issues.listIssueCommentsInputSchema,\n execute: withToken(issues.listIssueCommentsCore, ctx),\n },\n {\n name: 'createIssue',\n writeTool: 'createIssue',\n description: issues.createIssueDescription,\n inputSchema: issues.createIssueInputSchema,\n execute: withToken(issues.createIssueCore, ctx),\n },\n {\n name: 'addIssueComment',\n writeTool: 'addIssueComment',\n description: issues.addIssueCommentDescription,\n inputSchema: issues.addIssueCommentInputSchema,\n execute: withToken(issues.addIssueCommentCore, ctx),\n },\n {\n name: 'updateIssueComment',\n writeTool: 'updateIssueComment',\n description: issues.updateIssueCommentDescription,\n inputSchema: issues.updateIssueCommentInputSchema,\n execute: withToken(issues.updateIssueCommentCore, ctx),\n },\n {\n name: 'deleteIssueComment',\n writeTool: 'deleteIssueComment',\n description: issues.deleteIssueCommentDescription,\n inputSchema: issues.deleteIssueCommentInputSchema,\n execute: withToken(issues.deleteIssueCommentCore, ctx),\n },\n {\n name: 'closeIssue',\n writeTool: 'closeIssue',\n description: issues.closeIssueDescription,\n inputSchema: issues.closeIssueInputSchema,\n execute: withToken(issues.closeIssueCore, ctx),\n },\n {\n name: 'updateIssue',\n writeTool: 'updateIssue',\n description: issues.updateIssueDescription,\n inputSchema: issues.updateIssueInputSchema,\n execute: withToken(issues.updateIssueCore, ctx),\n },\n {\n name: 'listLabels',\n description: issues.listLabelsDescription,\n inputSchema: issues.listLabelsInputSchema,\n execute: withToken(issues.listLabelsCore, ctx),\n },\n {\n name: 'addLabels',\n writeTool: 'addLabels',\n description: issues.addLabelsDescription,\n inputSchema: issues.addLabelsInputSchema,\n execute: withToken(issues.addLabelsCore, ctx),\n },\n {\n name: 'removeLabel',\n writeTool: 'removeLabel',\n description: issues.removeLabelDescription,\n inputSchema: issues.removeLabelInputSchema,\n execute: withToken(issues.removeLabelCore, ctx),\n },\n {\n name: 'createLabel',\n writeTool: 'createLabel',\n description: issues.createLabelDescription,\n inputSchema: issues.createLabelInputSchema,\n execute: withToken(issues.createLabelCore, ctx),\n },\n {\n name: 'updateLabel',\n writeTool: 'updateLabel',\n description: issues.updateLabelDescription,\n inputSchema: issues.updateLabelInputSchema,\n execute: withToken(issues.updateLabelCore, ctx),\n },\n {\n name: 'deleteLabel',\n writeTool: 'deleteLabel',\n description: issues.deleteLabelDescription,\n inputSchema: issues.deleteLabelInputSchema,\n execute: withToken(issues.deleteLabelCore, ctx),\n },\n {\n name: 'addAssignees',\n writeTool: 'addAssignees',\n description: issues.addAssigneesDescription,\n inputSchema: issues.addAssigneesInputSchema,\n execute: withToken(issues.addAssigneesCore, ctx),\n },\n {\n name: 'removeAssignees',\n writeTool: 'removeAssignees',\n description: issues.removeAssigneesDescription,\n inputSchema: issues.removeAssigneesInputSchema,\n execute: withToken(issues.removeAssigneesCore, ctx),\n },\n {\n name: 'listIssueReactions',\n description: reactions.listIssueReactionsDescription,\n inputSchema: reactions.listIssueReactionsInputSchema,\n execute: withToken(reactions.listIssueReactionsCore, ctx),\n },\n {\n name: 'addIssueReaction',\n writeTool: 'addIssueReaction',\n description: reactions.addIssueReactionDescription,\n inputSchema: reactions.addIssueReactionInputSchema,\n execute: withToken(reactions.addIssueReactionCore, ctx),\n },\n {\n name: 'listCommentReactions',\n description: reactions.listCommentReactionsDescription,\n inputSchema: reactions.listCommentReactionsInputSchema,\n execute: withToken(reactions.listCommentReactionsCore, ctx),\n },\n {\n name: 'addCommentReaction',\n writeTool: 'addCommentReaction',\n description: reactions.addCommentReactionDescription,\n inputSchema: reactions.addCommentReactionInputSchema,\n execute: withToken(reactions.addCommentReactionCore, ctx),\n },\n {\n name: 'listDiscussions',\n description: discussions.listDiscussionsDescription,\n inputSchema: discussions.listDiscussionsInputSchema,\n execute: withToken(discussions.listDiscussionsCore, ctx),\n },\n {\n name: 'getDiscussion',\n description: discussions.getDiscussionDescription,\n inputSchema: discussions.getDiscussionInputSchema,\n execute: withToken(discussions.getDiscussionCore, ctx),\n },\n {\n name: 'addDiscussionComment',\n writeTool: 'addDiscussionComment',\n description: discussions.addDiscussionCommentDescription,\n inputSchema: discussions.addDiscussionCommentInputSchema,\n execute: withToken(discussions.addDiscussionCommentCore, ctx),\n },\n {\n name: 'listNotifications',\n description: notifications.listNotificationsDescription,\n inputSchema: notifications.listNotificationsInputSchema,\n execute: withToken(notifications.listNotificationsCore, ctx),\n },\n {\n name: 'markNotificationRead',\n writeTool: 'markNotificationRead',\n description: notifications.markNotificationReadDescription,\n inputSchema: notifications.markNotificationReadInputSchema,\n execute: withToken(notifications.markNotificationReadCore, ctx),\n },\n {\n name: 'searchCode',\n description: search.searchCodeDescription,\n inputSchema: search.searchCodeInputSchema,\n execute: withToken(search.searchCodeCore, ctx),\n },\n {\n name: 'searchRepositories',\n description: search.searchRepositoriesDescription,\n inputSchema: search.searchRepositoriesInputSchema,\n execute: withToken(search.searchRepositoriesCore, ctx),\n },\n {\n name: 'searchIssues',\n description: search.searchIssuesDescription,\n inputSchema: search.searchIssuesInputSchema,\n execute: withToken(search.searchIssuesCore, ctx),\n },\n {\n name: 'listCommits',\n description: commits.listCommitsDescription,\n inputSchema: commits.listCommitsInputSchema,\n execute: withToken(commits.listCommitsCore, ctx),\n },\n {\n name: 'getCommit',\n description: commits.getCommitDescription,\n inputSchema: commits.getCommitInputSchema,\n execute: withToken(commits.getCommitCore, ctx),\n toModelOutput: GITHUB_EVE_TOOL_MODEL_OUTPUT.getCommit,\n },\n {\n name: 'getBlame',\n description: commits.getBlameDescription,\n inputSchema: commits.getBlameInputSchema,\n execute: withToken(commits.getBlameCore, ctx),\n },\n {\n name: 'compareCommits',\n description: commits.compareCommitsDescription,\n inputSchema: commits.compareCommitsInputSchema,\n execute: withToken(commits.compareCommitsCore, ctx),\n toModelOutput: GITHUB_EVE_TOOL_MODEL_OUTPUT.compareCommits,\n },\n {\n name: 'listGists',\n description: gists.listGistsDescription,\n inputSchema: gists.listGistsInputSchema,\n execute: withToken(gists.listGistsCore, ctx),\n },\n {\n name: 'getGist',\n description: gists.getGistDescription,\n inputSchema: gists.getGistInputSchema,\n execute: withToken(gists.getGistCore, ctx),\n },\n {\n name: 'listGistComments',\n description: gists.listGistCommentsDescription,\n inputSchema: gists.listGistCommentsInputSchema,\n execute: withToken(gists.listGistCommentsCore, ctx),\n },\n {\n name: 'createGist',\n writeTool: 'createGist',\n description: gists.createGistDescription,\n inputSchema: gists.createGistInputSchema,\n execute: withToken(gists.createGistCore, ctx),\n },\n {\n name: 'updateGist',\n writeTool: 'updateGist',\n description: gists.updateGistDescription,\n inputSchema: gists.updateGistInputSchema,\n execute: withToken(gists.updateGistCore, ctx),\n },\n {\n name: 'deleteGist',\n writeTool: 'deleteGist',\n description: gists.deleteGistDescription,\n inputSchema: gists.deleteGistInputSchema,\n execute: withToken(gists.deleteGistCore, ctx),\n },\n {\n name: 'createGistComment',\n writeTool: 'createGistComment',\n description: gists.createGistCommentDescription,\n inputSchema: gists.createGistCommentInputSchema,\n execute: withToken(gists.createGistCommentCore, ctx),\n },\n {\n name: 'listWorkflows',\n description: workflows.listWorkflowsDescription,\n inputSchema: workflows.listWorkflowsInputSchema,\n execute: withToken(workflows.listWorkflowsCore, ctx),\n },\n {\n name: 'listWorkflowRuns',\n description: workflows.listWorkflowRunsDescription,\n inputSchema: workflows.listWorkflowRunsInputSchema,\n execute: withToken(workflows.listWorkflowRunsCore, ctx),\n },\n {\n name: 'getWorkflowRun',\n description: workflows.getWorkflowRunDescription,\n inputSchema: workflows.getWorkflowRunInputSchema,\n execute: withToken(workflows.getWorkflowRunCore, ctx),\n },\n {\n name: 'listWorkflowJobs',\n description: workflows.listWorkflowJobsDescription,\n inputSchema: workflows.listWorkflowJobsInputSchema,\n execute: withToken(workflows.listWorkflowJobsCore, ctx),\n },\n {\n name: 'triggerWorkflow',\n writeTool: 'triggerWorkflow',\n description: workflows.triggerWorkflowDescription,\n inputSchema: workflows.triggerWorkflowInputSchema,\n execute: withToken(workflows.triggerWorkflowCore, ctx),\n },\n {\n name: 'cancelWorkflowRun',\n writeTool: 'cancelWorkflowRun',\n description: workflows.cancelWorkflowRunDescription,\n inputSchema: workflows.cancelWorkflowRunInputSchema,\n execute: withToken(workflows.cancelWorkflowRunCore, ctx),\n },\n {\n name: 'rerunWorkflowRun',\n writeTool: 'rerunWorkflowRun',\n description: workflows.rerunWorkflowRunDescription,\n inputSchema: workflows.rerunWorkflowRunInputSchema,\n execute: withToken(workflows.rerunWorkflowRunCore, ctx),\n },\n {\n name: 'listCheckRuns',\n description: checks.listCheckRunsDescription,\n inputSchema: checks.listCheckRunsInputSchema,\n execute: withToken(checks.listCheckRunsCore, ctx),\n },\n {\n name: 'getCombinedStatus',\n description: checks.getCombinedStatusDescription,\n inputSchema: checks.getCombinedStatusInputSchema,\n execute: withToken(checks.getCombinedStatusCore, ctx),\n },\n {\n name: 'getCiFailureContext',\n description: bundles.getCiFailureContextDescription,\n inputSchema: bundles.getCiFailureContextInputSchema,\n execute: withToken(bundles.getCiFailureContextCore, ctx),\n },\n {\n name: 'listReleases',\n description: releases.listReleasesDescription,\n inputSchema: releases.listReleasesInputSchema,\n execute: withToken(releases.listReleasesCore, ctx),\n },\n {\n name: 'getLatestRelease',\n description: releases.getLatestReleaseDescription,\n inputSchema: releases.getLatestReleaseInputSchema,\n execute: withToken(releases.getLatestReleaseCore, ctx),\n },\n {\n name: 'getRelease',\n description: releases.getReleaseDescription,\n inputSchema: releases.getReleaseInputSchema,\n execute: withToken(releases.getReleaseCore, ctx),\n },\n {\n name: 'getReleaseContext',\n description: bundles.getReleaseContextDescription,\n inputSchema: bundles.getReleaseContextInputSchema,\n execute: withToken(bundles.getReleaseContextCore, ctx),\n },\n {\n name: 'createRelease',\n writeTool: 'createRelease',\n description: releases.createReleaseDescription,\n inputSchema: releases.createReleaseInputSchema,\n execute: withToken(releases.createReleaseCore, ctx),\n },\n {\n name: 'updateRelease',\n writeTool: 'updateRelease',\n description: releases.updateReleaseDescription,\n inputSchema: releases.updateReleaseInputSchema,\n execute: withToken(releases.updateReleaseCore, ctx),\n },\n {\n name: 'deleteRelease',\n writeTool: 'deleteRelease',\n description: releases.deleteReleaseDescription,\n inputSchema: releases.deleteReleaseInputSchema,\n execute: withToken(releases.deleteReleaseCore, ctx),\n },\n ]\n\n if (!ctx.context) return entries\n\n return entries.map(entry => ({\n ...entry,\n inputSchema: softenContextSchema(entry.inputSchema, ctx.context!),\n }))\n}\n","import { resolveGithubToken } from '../core/token'\nimport { createToolRegistry, type GithubToolName, type ToolBuildContext } from './registry'\n\nasync function executeGithubToolStep(\n name: GithubToolName,\n input: Record<string, unknown>,\n ctx: ToolBuildContext,\n) {\n 'use step'\n const entry = createToolRegistry(ctx).find(tool => tool.name === name)\n if (!entry) {\n throw new Error(`Unknown GitHub tool: ${name}`)\n }\n return entry.execute(input)\n}\n\nexport async function runGithubToolStep(\n name: GithubToolName,\n input: Record<string, unknown>,\n ctx: ToolBuildContext,\n) {\n try {\n // Resolve the token before entering the step so only a serializable string crosses the boundary.\n const token = await resolveGithubToken(ctx.token)\n return await executeGithubToolStep(name, input, { ...ctx, token })\n } catch (error) {\n // Eve's tool-loop logs thrown execute errors but does not always append a\n // tool_result. Returning a payload keeps the Anthropic tool_use/tool_result pairing intact.\n return { error: error instanceof Error ? error.message : String(error) }\n }\n}\n","import type { ToolDefinition } from 'eve/tools'\nimport { resolvePresetTools, type CombinedPresetToolNames, type GithubToolPreset, type PresetToolName } from '../core/presets'\nimport { createGithubTokenResolver } from '../core/token'\nimport { isEveApprovalDisabled, mapEveApprovalValue, resolveEveToolApproval } from './approval'\nimport { getEveTools } from './load-eve'\nimport { ALL_GITHUB_TOOL_NAMES, createToolRegistry, formatGithubEveToolOutput, hasGithubEveToolModelOutput, type GithubToolName, type ToolBuildContext } from './registry'\nimport { runGithubToolStep } from './steps'\nimport type { EveGithubToolsOptions, EveToolFactoryOptions, EveToolOverrides } from './types'\n\ntype BuildOptions = EveGithubToolsOptions | (EveToolFactoryOptions & { preset?: EveGithubToolsOptions['preset'] })\ntype EveToolMap = Partial<Record<GithubToolName, ToolDefinition>>\n\nfunction resolveAllowedToolNames(\n options: Pick<EveGithubToolsOptions, 'preset' | 'include' | 'exclude'>,\n): (name: GithubToolName) => boolean {\n const presetAllowed = options.preset ? resolvePresetTools(options.preset) : null\n const includeAllowed = options.include ? new Set(options.include) : null\n const excluded = options.exclude ? new Set(options.exclude) : null\n\n // `preset` and `include` compose as a union (add tools a preset is missing);\n // `exclude` always subtracts from that combined set afterward.\n const allowed = presetAllowed && includeAllowed\n ? new Set([...presetAllowed, ...includeAllowed])\n : presetAllowed ?? includeAllowed\n\n return name => (!allowed || allowed.has(name)) && !excluded?.has(name)\n}\n\nfunction applyOverrides<T extends ToolDefinition>(\n tool: T,\n name: GithubToolName,\n overrides?: EveToolOverrides,\n): T {\n const override = overrides?.[name]\n if (!override) return tool\n\n const next: T = {\n ...tool,\n ...override.description !== undefined && { description: override.description },\n ...override.toModelOutput !== undefined && { toModelOutput: override.toModelOutput },\n ...override.outputSchema !== undefined && { outputSchema: override.outputSchema },\n }\n\n if (override.approval === undefined) return next\n if (isEveApprovalDisabled(override.approval)) {\n const rest = { ...next }\n delete (rest as { approval?: unknown }).approval\n return rest\n }\n return { ...next, approval: mapEveApprovalValue(override.approval) }\n}\n\nexport function buildEveToolDefinition(\n name: GithubToolName,\n options: BuildOptions = {},\n): ToolDefinition {\n const { defineTool } = getEveTools()\n const ctx: ToolBuildContext = {\n token: createGithubTokenResolver(options.token),\n context: options.context,\n author: options.author,\n committer: options.committer,\n coAuthors: options.coAuthors,\n }\n\n const entry = createToolRegistry(ctx).find(tool => tool.name === name)\n if (!entry) {\n throw new Error(`Unknown GitHub tool: ${name}`)\n }\n\n const approval = entry.writeTool\n ? resolveEveToolApproval(entry.writeTool, options.requireApproval)\n : undefined\n\n const tool = defineTool({\n description: entry.description,\n inputSchema: entry.inputSchema,\n ...(approval && { approval }),\n toModelOutput: (output: unknown) => formatGithubEveToolOutput(name, output),\n execute: async (input) => runGithubToolStep(name, input as Record<string, unknown>, ctx),\n })\n\n return applyOverrides(tool, name, options.overrides)\n}\n\nexport function buildEveToolMap(options: EveGithubToolsOptions = {}): EveToolMap {\n const { defineTool } = getEveTools()\n const ctx: ToolBuildContext = {\n token: createGithubTokenResolver(options.token),\n context: options.context,\n author: options.author,\n committer: options.committer,\n coAuthors: options.coAuthors,\n }\n\n const isAllowed = resolveAllowedToolNames(options)\n const registry = createToolRegistry(ctx)\n const tools = {} as EveToolMap\n\n for (const entry of registry) {\n if (!isAllowed(entry.name)) continue\n\n const approval = entry.writeTool\n ? resolveEveToolApproval(entry.writeTool, options.requireApproval)\n : undefined\n\n const tool = defineTool({\n description: entry.description,\n inputSchema: entry.inputSchema,\n ...(approval && { approval }),\n toModelOutput: (output: unknown) => formatGithubEveToolOutput(entry.name, output),\n execute: async (input) => runGithubToolStep(entry.name, input as Record<string, unknown>, ctx),\n })\n\n tools[entry.name] = applyOverrides(tool, entry.name, options.overrides)\n }\n\n return tools\n}\n\nexport function createEveGithubToolsDynamic(options: EveGithubToolsOptions = {}) {\n const { defineDynamic } = getEveTools()\n\n // TODO(eve-auth): resolve token from ctx.getToken('github') when eve-managed auth lands.\n // Deferred — eve does not yet expose managed GitHub tokens on the session context.\n return defineDynamic({\n events: {\n 'step.started': async () => buildEveToolMap(options),\n },\n })\n}\n\nexport function listResolvedEveToolNames(options?: { preset?: undefined, include?: undefined, exclude?: undefined }): GithubToolName[]\nexport function listResolvedEveToolNames<P extends GithubToolPreset>(options: { preset: P, include?: undefined, exclude?: undefined }): PresetToolName<P>[]\nexport function listResolvedEveToolNames<P extends readonly GithubToolPreset[]>(options: { preset: P, include?: undefined, exclude?: undefined }): CombinedPresetToolNames<P>[]\nexport function listResolvedEveToolNames(options: Pick<EveGithubToolsOptions, 'preset' | 'include' | 'exclude'>): GithubToolName[]\nexport function listResolvedEveToolNames(options: Pick<EveGithubToolsOptions, 'preset' | 'include' | 'exclude'> = {}): GithubToolName[] {\n const isAllowed = resolveAllowedToolNames(options)\n return ALL_GITHUB_TOOL_NAMES.filter(isAllowed)\n}\n\n/**\n * Tool descriptors (no `execute`) for authored eve `defineTool` loops.\n * Prefer this when registering tools outside the SDK package so durable transforms can hoist inline execute.\n */\nexport function listEveToolDescriptors(options: EveGithubToolsOptions = {}) {\n const ctx: ToolBuildContext = {\n token: createGithubTokenResolver(options.token),\n context: options.context,\n author: options.author,\n committer: options.committer,\n coAuthors: options.coAuthors,\n }\n\n const isAllowed = resolveAllowedToolNames(options)\n return createToolRegistry(ctx)\n .filter(entry => isAllowed(entry.name))\n .map(entry => ({\n name: entry.name,\n description: entry.description,\n inputSchema: entry.inputSchema,\n writeTool: entry.writeTool,\n toModelOutput: entry.toModelOutput,\n }))\n}\n\nexport { formatGithubEveToolOutput, hasGithubEveToolModelOutput }\n\n/**\n * Execute a GitHub tool by name with the given eve options (token/context/attribution).\n * Used by `@github-tools/eve-extension` so `execute` only closes over a serializable tool name.\n */\nexport async function executeGithubEveTool(\n name: GithubToolName,\n input: Record<string, unknown>,\n options: EveGithubToolsOptions = {},\n) {\n const ctx: ToolBuildContext = {\n token: createGithubTokenResolver(options.token),\n context: options.context,\n author: options.author,\n committer: options.committer,\n coAuthors: options.coAuthors,\n }\n return runGithubToolStep(name, input, ctx)\n}\n"],"mappings":";;;;AAWA,MAAa,sBACX;AAEF,SAAgB,cAA8B;CAC5C,OAAO;AACT;AAEA,SAAgB,wBAA2C;CACzD,OAAO;AACT;;;;;;;;ACVA,SAAgB,sBAAsB,OAA8C;CAClF,OAAO,UAAU,SAAS,UAAU;AACtC;AAEA,SAAgB,oBAAoB,OAAyC;CAC3E,IAAI,OAAO,UAAU,YAAY,OAAO;CAExC,MAAM,EAAE,QAAQ,OAAO,SAAS,sBAAsB;CAEtD,IAAI,UAAU,QAAQ,UAAU,UAAU,OAAO,OAAO;CACxD,IAAI,UAAU,SAAS,UAAU,SAAS,OAAO,MAAM;CACvD,IAAI,UAAU,QAAQ,OAAO,KAAK;CAElC,OAAO,OAAO;AAChB;AAEA,SAAgB,mBACd,UACA,QACgB;CAChB,IAAI,WAAW,KAAA,GAAW,OAAO,sBAAsB,CAAC,CAAC,OAAO;CAChE,IAAI,WAAW,MAAM,OAAO,sBAAsB,CAAC,CAAC,OAAO;CAC3D,IAAI,WAAW,OAAO,OAAO,sBAAsB,CAAC,CAAC,MAAM;CAE3D,MAAM,QAAQ,OAAO;CACrB,IAAI,UAAU,KAAA,GAAW,OAAO,sBAAsB,CAAC,CAAC,OAAO;CAE/D,OAAO,oBAAoB,KAAK;AAClC;;;;;;AAOA,SAAgB,uBACd,UACA,QACA,UACsB;CACtB,IAAI,aAAa,KAAA,GAAW;EAC1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QAAQ,EACN,gBAAgB,YAAY,gBAAgB,OAAO,EACrD,EACF,CAAC;AACH;AAMA,SAAgB,yBAAyB,UAAyE,CAAC,GAAqB;CACtI,MAAM,YAAY,wBAAwB,OAAO;CACjD,OAAO,sBAAsB,OAAO,SAAS;AAC/C;;;;;AAMA,SAAgB,uBAAuB,UAAiC,CAAC,GAAG;CAC1E,MAAM,MAAwB;EAC5B,OAAO,0BAA0B,QAAQ,KAAK;EAC9C,SAAS,QAAQ;EACjB,QAAQ,QAAQ;EAChB,WAAW,QAAQ;EACnB,WAAW,QAAQ;CACrB;CAEA,MAAM,YAAY,wBAAwB,OAAO;CACjD,OAAO,mBAAmB,GAAG,CAAC,CAC3B,QAAO,UAAS,UAAU,MAAM,IAAI,CAAC,CAAC,CACtC,KAAI,WAAU;EACb,MAAM,MAAM;EACZ,aAAa,MAAM;EACnB,aAAa,MAAM;EACnB,WAAW,MAAM;EACjB,eAAe,MAAM;CACvB,EAAE;AACN;;;;;AAQA,eAAsB,qBACpB,MACA,OACA,UAAiC,CAAC,GAClC;CAQA,OAAO,kBAAkB,MAAM,OAAO;EANpC,OAAO,0BAA0B,QAAQ,KAAK;EAC9C,SAAS,QAAQ;EACjB,QAAQ,QAAQ;EAChB,WAAW,QAAQ;EACnB,WAAW,QAAQ;CAEiB,CAAG;AAC3C"}
@@ -1,7 +1,18 @@
1
- import { $t as GithubToolName, Jt as CombinedPresetToolNames, Yt as GithubToolPreset, Zt as PresetToolName, qt as GithubWriteToolName } from "./index-BNeMjmgp.mjs";
2
- import { i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-BDO-Mmn6.mjs";
1
+ import { Jt as GithubWriteToolName, Qt as PresetToolName, Xt as GithubToolPreset, Yt as CombinedPresetToolNames, en as GithubToolName } from "./index-CGeFo38P.mjs";
2
+ import { i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-CoTpsxxp.mjs";
3
3
  import { z } from "zod";
4
- import { Approval, ToolDefinition, ToolModelOutput } from "eve/tools";
4
+ import { Approval, ApprovalPolicy, ToolDefinition, ToolModelOutput } from "eve/tools";
5
+ //#region src/eve/registry.d.ts
6
+ /** Whether a GitHub tool has a built-in eve `toModelOutput` projection. */
7
+ declare function hasGithubEveToolModelOutput(name: GithubToolName): boolean;
8
+ /**
9
+ * Apply the built-in eve `toModelOutput` projection for a tool.
10
+ * Strips `rateLimit` so it never reaches the model. Tools without a dedicated
11
+ * formatter get `{ type: 'json', value }` of the remaining payload.
12
+ * Used by `@github-tools/eve-extension` so the callback only closes over a serializable tool name.
13
+ */
14
+ declare function formatGithubEveToolOutput(name: GithubToolName, output: unknown): ToolModelOutput;
15
+ //#endregion
5
16
  //#region src/eve/build.d.ts
6
17
  type BuildOptions = EveGithubToolsOptions | (EveToolFactoryOptions & {
7
18
  preset?: EveGithubToolsOptions['preset'];
@@ -44,11 +55,23 @@ declare function listEveToolDescriptors(options?: EveGithubToolsOptions): {
44
55
  declare function executeGithubEveTool(name: GithubToolName, input: Record<string, unknown>, options?: EveGithubToolsOptions): Promise<unknown>;
45
56
  //#endregion
46
57
  //#region src/eve/approval.d.ts
47
- declare function mapEveApprovalValue(value: EveApprovalValue): Approval;
48
- declare function resolveEveApproval(toolName: GithubWriteToolName, config: EveApprovalConfig | undefined): Approval | undefined;
58
+ /**
59
+ * `false` / `'never'` should omit the tool `approval` field entirely.
60
+ * eve treats a missing `approval` like `never()`; attaching `never()` is
61
+ * redundant and has caused approval UI noise on some channels.
62
+ */
63
+ declare function isEveApprovalDisabled(value: EveApprovalValue | undefined): boolean;
64
+ declare function mapEveApprovalValue(value: EveApprovalValue): ApprovalPolicy;
65
+ declare function resolveEveApproval(toolName: GithubWriteToolName, config: EveApprovalConfig | undefined): ApprovalPolicy;
66
+ /**
67
+ * Approval to attach on a write tool, or `undefined` to omit the field.
68
+ * Prefer this when building `defineTool` values so `false` / `'never'` do not
69
+ * attach a redundant `never()` handler.
70
+ */
71
+ declare function resolveEveToolApproval(toolName: GithubWriteToolName, config: EveApprovalConfig | undefined, override?: EveApprovalValue): Approval | undefined;
49
72
  //#endregion
50
73
  //#region src/eve/load-eve.d.ts
51
74
  declare const MISSING_EVE_MESSAGE = "The \"eve\" package is required to use @github-tools/sdk/eve. Install it with: pnpm add eve";
52
75
  //#endregion
53
- export { buildEveToolMap as a, listEveToolDescriptors as c, buildEveToolDefinition as i, listResolvedEveToolNames as l, mapEveApprovalValue as n, createEveGithubToolsDynamic as o, resolveEveApproval as r, executeGithubEveTool as s, MISSING_EVE_MESSAGE as t };
54
- //# sourceMappingURL=eve-runtime-BqfQZAP7.d.mts.map
76
+ export { resolveEveToolApproval as a, createEveGithubToolsDynamic as c, listResolvedEveToolNames as d, formatGithubEveToolOutput as f, resolveEveApproval as i, executeGithubEveTool as l, isEveApprovalDisabled as n, buildEveToolDefinition as o, hasGithubEveToolModelOutput as p, mapEveApprovalValue as r, buildEveToolMap as s, MISSING_EVE_MESSAGE as t, listEveToolDescriptors as u };
77
+ //# sourceMappingURL=eve-runtime-BmoVTbEU.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eve-runtime-BmoVTbEU.d.mts","names":[],"sources":["../src/eve/registry.ts","../src/eve/build.ts","../src/eve/approval.ts","../src/eve/load-eve.ts"],"mappings":";;;;;;iBA4EgB,4BAA4B,MAAM;;;;;;;iBAUlC,0BAA0B,MAAM,gBAAgB,kBAAkB;;;KC7E7E,eAAe,yBAAyB;EAA0B,SAAS;;KAC3E,aAAa,QAAQ,OAAO,gBAAgB;iBA0CjC,uBACd,MAAM,gBACN,UAAS,eACR;iBA8Ba,gBAAgB,UAAS,wBAA6B;iBAmCtD,4BAA4B,UAAS,4CAA0B,gBAAA,QAAA,OAAA,gBAAA;iBAY/D,yBAAyB;EAAY;EAAoB;EAAqB;IAAwB;iBACtG,yBAAyB,UAAU,kBAAkB;EAAW,QAAQ;EAAG;EAAqB;IAAwB,eAAe;iBACvI,yBAAyB,mBAAmB,oBAAoB;EAAW,QAAQ;EAAG;EAAqB;IAAwB,wBAAwB;iBAC3J,yBAAyB,SAAS,KAAK,2DAA2D;;;;;iBAUlG,uBAAuB,UAAS;;;;;;;;;;;iBA2B1B,qBACpB,MAAM,gBACN,OAAO,yBACP,UAAS,wBAA0B;;;;;;;;iBCrKrB,sBAAsB,OAAO;iBAI7B,oBAAoB,OAAO,mBAAmB;iBAY9C,mBACd,UAAU,qBACV,QAAQ,gCACP;;;;;;iBAgBa,uBACd,UAAU,qBACV,QAAQ,+BACR,WAAW,mBACV;;;cCtCU"}
@@ -1,4 +1,4 @@
1
- import { $t as GithubToolName, Ft as PickGithubTools, Jt as CombinedPresetToolNames, Kt as GITHUB_WRITE_TOOLS, Mt as AllGithubTools, Pt as GithubToolsForPreset, Qt as GITHUB_TOOL_NAMES, Xt as PRESET_TOOLS, Yt as GithubToolPreset, Zt as PresetToolName, qt as GithubWriteToolName, zt as CommitIdentity } from "./index-BNeMjmgp.mjs";
2
- import { a as EveToolOverrides, i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-BDO-Mmn6.mjs";
3
- import { a as buildEveToolMap, c as listEveToolDescriptors, i as buildEveToolDefinition, l as listResolvedEveToolNames, n as mapEveApprovalValue, o as createEveGithubToolsDynamic, r as resolveEveApproval, s as executeGithubEveTool, t as MISSING_EVE_MESSAGE } from "./eve-runtime-BqfQZAP7.mjs";
4
- export { type AllGithubTools, type CombinedPresetToolNames, type CommitIdentity, type EveApprovalConfig, type EveApprovalValue, type EveGithubToolsOptions, type EveToolFactoryOptions, type EveToolOverrides, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, type GithubToolName, type GithubToolPreset, type GithubToolsForPreset, type GithubWriteToolName, MISSING_EVE_MESSAGE, PRESET_TOOLS, type PickGithubTools, type PresetToolName, buildEveToolDefinition, buildEveToolMap, createEveGithubToolsDynamic, executeGithubEveTool, listEveToolDescriptors, listResolvedEveToolNames, mapEveApprovalValue, resolveEveApproval };
1
+ import { $t as GITHUB_TOOL_NAMES, Bt as CommitIdentity, Ft as GithubToolsForPreset, It as PickGithubTools, Jt as GithubWriteToolName, Nt as AllGithubTools, Qt as PresetToolName, Xt as GithubToolPreset, Yt as CombinedPresetToolNames, Zt as PRESET_TOOLS, en as GithubToolName, o as GithubRateLimit, qt as GITHUB_WRITE_TOOLS } from "./index-CGeFo38P.mjs";
2
+ import { a as EveToolOverrides, i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-CoTpsxxp.mjs";
3
+ import { a as resolveEveToolApproval, c as createEveGithubToolsDynamic, d as listResolvedEveToolNames, f as formatGithubEveToolOutput, i as resolveEveApproval, l as executeGithubEveTool, n as isEveApprovalDisabled, o as buildEveToolDefinition, p as hasGithubEveToolModelOutput, r as mapEveApprovalValue, s as buildEveToolMap, t as MISSING_EVE_MESSAGE, u as listEveToolDescriptors } from "./eve-runtime-BmoVTbEU.mjs";
4
+ export { type AllGithubTools, type CombinedPresetToolNames, type CommitIdentity, type EveApprovalConfig, type EveApprovalValue, type EveGithubToolsOptions, type EveToolFactoryOptions, type EveToolOverrides, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, type GithubRateLimit, type GithubToolName, type GithubToolPreset, type GithubToolsForPreset, type GithubWriteToolName, MISSING_EVE_MESSAGE, PRESET_TOOLS, type PickGithubTools, type PresetToolName, buildEveToolDefinition, buildEveToolMap, createEveGithubToolsDynamic, executeGithubEveTool, formatGithubEveToolOutput, hasGithubEveToolModelOutput, isEveApprovalDisabled, listEveToolDescriptors, listResolvedEveToolNames, mapEveApprovalValue, resolveEveApproval, resolveEveToolApproval };
@@ -1,3 +1,3 @@
1
- import { i as PRESET_TOOLS, r as GITHUB_TOOL_NAMES, t as GITHUB_WRITE_TOOLS } from "./write-tools-Dk32V9Hl.mjs";
2
- import { a as listEveToolDescriptors, c as resolveEveApproval, i as executeGithubEveTool, l as MISSING_EVE_MESSAGE, n as buildEveToolMap, o as listResolvedEveToolNames, r as createEveGithubToolsDynamic, s as mapEveApprovalValue, t as buildEveToolDefinition } from "./eve-runtime-DXZgfCMb.mjs";
3
- export { GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, MISSING_EVE_MESSAGE, PRESET_TOOLS, buildEveToolDefinition, buildEveToolMap, createEveGithubToolsDynamic, executeGithubEveTool, listEveToolDescriptors, listResolvedEveToolNames, mapEveApprovalValue, resolveEveApproval };
1
+ import { i as PRESET_TOOLS, r as GITHUB_TOOL_NAMES, t as GITHUB_WRITE_TOOLS } from "./write-tools-CnJE0Vvu.mjs";
2
+ import { a as listEveToolDescriptors, c as hasGithubEveToolModelOutput, d as resolveEveApproval, f as resolveEveToolApproval, i as executeGithubEveTool, l as isEveApprovalDisabled, n as buildEveToolMap, o as listResolvedEveToolNames, p as MISSING_EVE_MESSAGE, r as createEveGithubToolsDynamic, s as formatGithubEveToolOutput, t as buildEveToolDefinition, u as mapEveApprovalValue } from "./eve-runtime-3asyv7YM.mjs";
3
+ export { GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, MISSING_EVE_MESSAGE, PRESET_TOOLS, buildEveToolDefinition, buildEveToolMap, createEveGithubToolsDynamic, executeGithubEveTool, formatGithubEveToolOutput, hasGithubEveToolModelOutput, isEveApprovalDisabled, listEveToolDescriptors, listResolvedEveToolNames, mapEveApprovalValue, resolveEveApproval, resolveEveToolApproval };
package/dist/eve.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { $t as GithubToolName, Ft as PickGithubTools, Jt as CombinedPresetToolNames, Kt as GITHUB_WRITE_TOOLS, Mt as AllGithubTools, Pt as GithubToolsForPreset, Qt as GITHUB_TOOL_NAMES, Xt as PRESET_TOOLS, Yt as GithubToolPreset, Zt as PresetToolName, qt as GithubWriteToolName, zt as CommitIdentity } from "./index-BNeMjmgp.mjs";
2
- import { a as EveToolOverrides, i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-BDO-Mmn6.mjs";
3
- import { a as buildEveToolMap, c as listEveToolDescriptors, i as buildEveToolDefinition, l as listResolvedEveToolNames, n as mapEveApprovalValue, o as createEveGithubToolsDynamic, r as resolveEveApproval, s as executeGithubEveTool, t as MISSING_EVE_MESSAGE } from "./eve-runtime-BqfQZAP7.mjs";
1
+ import { $t as GITHUB_TOOL_NAMES, Bt as CommitIdentity, Ft as GithubToolsForPreset, It as PickGithubTools, Jt as GithubWriteToolName, Nt as AllGithubTools, Qt as PresetToolName, Xt as GithubToolPreset, Yt as CombinedPresetToolNames, Zt as PRESET_TOOLS, en as GithubToolName, qt as GITHUB_WRITE_TOOLS } from "./index-CGeFo38P.mjs";
2
+ import { a as EveToolOverrides, i as EveToolFactoryOptions, n as EveApprovalValue, r as EveGithubToolsOptions, t as EveApprovalConfig } from "./types-CoTpsxxp.mjs";
3
+ import { a as resolveEveToolApproval, c as createEveGithubToolsDynamic, d as listResolvedEveToolNames, i as resolveEveApproval, l as executeGithubEveTool, n as isEveApprovalDisabled, o as buildEveToolDefinition, r as mapEveApprovalValue, s as buildEveToolMap, t as MISSING_EVE_MESSAGE, u as listEveToolDescriptors } from "./eve-runtime-BmoVTbEU.mjs";
4
4
  //#region src/eve.d.ts
5
5
  /**
6
6
  * Register all GitHub tools (or a preset subset) as eve dynamic capabilities.
@@ -368,5 +368,5 @@ declare const getCiFailureContext: (options?: EveToolFactoryOptions) => import("
368
368
  */
369
369
  declare const getReleaseContext: (options?: EveToolFactoryOptions) => import("eve/tools").ToolDefinition<unknown, unknown>;
370
370
  //#endregion
371
- export { type AllGithubTools, type CombinedPresetToolNames, type CommitIdentity, type EveApprovalConfig, type EveApprovalValue, type EveGithubToolsOptions, type EveToolFactoryOptions, type EveToolOverrides, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, type GithubToolName, type GithubToolPreset, type GithubToolsForPreset, type GithubWriteToolName, MISSING_EVE_MESSAGE, PRESET_TOOLS, type PickGithubTools, type PresetToolName, addIssueComment, addLabels, addPullRequestComment, buildEveToolDefinition, buildEveToolMap, cancelWorkflowRun, closeIssue, createBranch, createEveGithubToolsDynamic, createGist, createGistComment, createGithubTools, createIssue, createLabel, createOrUpdateFile, createPullRequest, createPullRequestReview, createRepository, deleteGist, deleteLabel, executeGithubEveTool, forkRepository, getBlame, getCiFailureContext, getCommit, getFileContent, getGist, getIssue, getIssueContext, getPullRequest, getPullRequestContext, getReleaseContext, getRepository, getWorkflowRun, listBranches, listCommits, listEveToolDescriptors, listGistComments, listGists, listIssueComments, listIssues, listLabels, listPullRequestFiles, listPullRequestReviews, listPullRequests, listResolvedEveToolNames, listWorkflowJobs, listWorkflowRuns, listWorkflows, mapEveApprovalValue, mergePullRequest, removeLabel, rerunWorkflowRun, resolveEveApproval, searchCode, searchRepositories, triggerWorkflow, updateGist, updateLabel };
371
+ export { type AllGithubTools, type CombinedPresetToolNames, type CommitIdentity, type EveApprovalConfig, type EveApprovalValue, type EveGithubToolsOptions, type EveToolFactoryOptions, type EveToolOverrides, GITHUB_TOOL_NAMES, GITHUB_WRITE_TOOLS, type GithubToolName, type GithubToolPreset, type GithubToolsForPreset, type GithubWriteToolName, MISSING_EVE_MESSAGE, PRESET_TOOLS, type PickGithubTools, type PresetToolName, addIssueComment, addLabels, addPullRequestComment, buildEveToolDefinition, buildEveToolMap, cancelWorkflowRun, closeIssue, createBranch, createEveGithubToolsDynamic, createGist, createGistComment, createGithubTools, createIssue, createLabel, createOrUpdateFile, createPullRequest, createPullRequestReview, createRepository, deleteGist, deleteLabel, executeGithubEveTool, forkRepository, getBlame, getCiFailureContext, getCommit, getFileContent, getGist, getIssue, getIssueContext, getPullRequest, getPullRequestContext, getReleaseContext, getRepository, getWorkflowRun, isEveApprovalDisabled, listBranches, listCommits, listEveToolDescriptors, listGistComments, listGists, listIssueComments, listIssues, listLabels, listPullRequestFiles, listPullRequestReviews, listPullRequests, listResolvedEveToolNames, listWorkflowJobs, listWorkflowRuns, listWorkflows, mapEveApprovalValue, mergePullRequest, removeLabel, rerunWorkflowRun, resolveEveApproval, resolveEveToolApproval, searchCode, searchRepositories, triggerWorkflow, updateGist, updateLabel };
372
372
  //# sourceMappingURL=eve.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eve.d.mts","names":[],"sources":["../src/eve.ts"],"mappings":";;;;;;;;;;;;;;;;;;iBAwDgB,kBAAkB,UAAlB,4CAAuE,gBAAA,QAAA,OAArB,oCAAqB;;;;;;;cAc1E,gBAAa,UATN,8CAAqB;;;;;;;cAgB5B,eAAY,UAhBL,8CAAqB;;;;;;;cAuB5B,iBAAc,UAvBP,8CAAqB;;;;;;;cA8B5B,eAAY,UA9BL,8CAAqB;;;;;;;cAqC5B,iBAAc,UArCP,8CAAqB;;;;;;;cA4C5B,mBAAgB,UA5CT,8CAAqB;;;;;;;cAmD5B,qBAAkB,UAnDX,8CAAqB;;;;;;;cA0D5B,mBAAgB,UA1DT,8CAAqB;;;;;;;cAiE5B,iBAAc,UAjEP,8CAAqB;;;;;;;cAwE5B,oBAAiB,UAxEV,8CAAqB;;;;;;;cA+E5B,mBAAgB,UA/ET,8CAAqB;;;;;;;cAsF5B,wBAAqB,UAtFd,8CAAqB;;;;;;;cA6F5B,uBAAoB,UA7Fb,8CAAqB;;;;;;;cAoG5B,yBAAsB,UApGf,8CAAqB;;;;;;;cA2G5B,0BAAuB,UA3GhB,8CAAqB;;;;;;;cAkH5B,wBAAqB,UAlHd,8CAAqB;;;;;;;cAyH5B,kBAAe,UAzHR,8CAAqB;;;;;;;cAgI5B,aAAU,UAhIH,8CAAqB;;;;;;;cAuI5B,WAAQ,UAvID,8CAAqB;;;;;;;cA8I5B,oBAAiB,UA9IV,8CAAqB;;;;;;;cAqJ5B,cAAW,UArJJ,8CAAqB;;;;;;;cA4J5B,kBAAe,UA5JR,8CAAqB;;;;;;;cAmK5B,aAAU,UAnKH,8CAAqB;;;;;;;cA0K5B,aAAU,UA1KH,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