@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@github-tools/sdk",
3
- "version": "1.11.0",
3
+ "version": "1.12.0",
4
4
  "description": "A typed tool layer for GitHub AI agents, with presets, human approval, and durable execution. Works with eve, the AI SDK, Vercel Workflow, and Chat SDK",
5
5
  "author": "HugoRCD <hugo.richard@vercel.com",
6
6
  "repository": {
@@ -89,13 +89,13 @@
89
89
  },
90
90
  "devDependencies": {
91
91
  "@ai-sdk/provider": "^4.0.5",
92
- "@ai-sdk/provider-utils": "^5.0.21",
92
+ "@ai-sdk/provider-utils": "^5.0.28",
93
93
  "@ai-sdk/workflow": "^1.0.52",
94
94
  "@types/node": "^26.1.2",
95
95
  "@vercel/connect": "^0.6.1",
96
- "ai": "^7.0.52",
96
+ "ai": "^7.0.58",
97
97
  "eslint": "^10.8.0",
98
- "eve": "^0.30.6",
98
+ "eve": "^0.40.0",
99
99
  "tsdown": "^0.22.14",
100
100
  "typescript": "^6.0.3",
101
101
  "typescript-eslint": "^8.65.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"eve-runtime-BqfQZAP7.d.mts","names":[],"sources":["../src/eve/build.ts","../src/eve/approval.ts","../src/eve/load-eve.ts"],"mappings":";;;;;KASK,eAAe,yBAAyB;EAA0B,SAAS;;KAC3E,aAAa,QAAQ,OAAO,gBAAgB;iBAkCjC,uBACd,MAAM,gBACN,UAAS,eACR;iBA4Ba,gBAAgB,UAAS,wBAA6B;iBAiCtD,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;;;;;;;;;;;iBAyB1B,qBACpB,MAAM,gBACN,OAAO,yBACP,UAAS,wBAA0B;;;iBC5JrB,oBAAoB,OAAO,mBAAmB;iBAY9C,mBACd,UAAU,qBACV,QAAQ,gCACP;;;cCTU"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"eve-runtime-DXZgfCMb.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 } from 'eve/tools'\nimport type { GithubWriteToolName } from '../core/write-tools'\nimport { getEveApprovalHelpers } from './load-eve'\nimport type { EveApprovalConfig, EveApprovalValue } from './types'\n\nexport function mapEveApprovalValue(value: EveApprovalValue): Approval {\n if (typeof value === 'function') return value\n\n const { always, never, once } = getEveApprovalHelpers()\n\n if (value === true || value === 'always') return always()\n if (value === false || value === 'never') return never()\n if (value === 'once') return once()\n\n return always()\n}\n\nexport function resolveEveApproval(\n toolName: GithubWriteToolName,\n config: EveApprovalConfig | undefined,\n): Approval | undefined {\n if (config === undefined) return getEveApprovalHelpers().always()\n if (config === true) return getEveApprovalHelpers().always()\n if (config === false) return getEveApprovalHelpers().never()\n\n const value = config[toolName]\n if (value === undefined) return getEveApprovalHelpers().always()\n\n return mapEveApprovalValue(value)\n}\n","import type { ToolModelOutput } from 'eve/tools'\nimport type { z } from 'zod'\nimport type { CommitIdentity } from '../types'\nimport * as 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 { 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\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: modelOutputAdapter(getFileContentToModelOutput),\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: modelOutputAdapter(listPullRequestFilesToModelOutput),\n },\n {\n name: 'listPullRequestReviews',\n description: pullRequests.listPullRequestReviewsDescription,\n inputSchema: pullRequests.listPullRequestReviewsInputSchema,\n execute: withToken(pullRequests.listPullRequestReviewsCore, ctx),\n },\n {\n name: 'createPullRequestReview',\n writeTool: 'createPullRequestReview',\n description: pullRequests.createPullRequestReviewDescription,\n inputSchema: pullRequests.createPullRequestReviewInputSchema,\n execute: withToken(pullRequests.createPullRequestReviewCore, ctx),\n },\n {\n name: '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: modelOutputAdapter(getPullRequestContextToModelOutput),\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: modelOutputAdapter(getCommitToModelOutput),\n },\n {\n name: 'getBlame',\n description: commits.getBlameDescription,\n inputSchema: commits.getBlameInputSchema,\n execute: withToken(commits.getBlameCore, ctx),\n },\n {\n name: 'compareCommits',\n description: commits.compareCommitsDescription,\n inputSchema: commits.compareCommitsInputSchema,\n execute: withToken(commits.compareCommitsCore, ctx),\n toModelOutput: modelOutputAdapter(compareCommitsToModelOutput),\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 // Resolve the token before entering the step so only a serializable string crosses the boundary.\n const token = await resolveGithubToken(ctx.token)\n return executeGithubToolStep(name, input, { ...ctx, token })\n}\n","import type { ToolDefinition } from 'eve/tools'\nimport { resolvePresetTools, type CombinedPresetToolNames, type GithubToolPreset, type PresetToolName } from '../core/presets'\nimport { createGithubTokenResolver } from '../core/token'\nimport { mapEveApprovalValue, resolveEveApproval } from './approval'\nimport { getEveTools } from './load-eve'\nimport { ALL_GITHUB_TOOL_NAMES, createToolRegistry, type GithubToolName, type ToolBuildContext } from './registry'\nimport { runGithubToolStep } from './steps'\nimport type { EveGithubToolsOptions, EveToolFactoryOptions, EveToolOverrides } from './types'\n\ntype BuildOptions = EveGithubToolsOptions | (EveToolFactoryOptions & { preset?: EveGithubToolsOptions['preset'] })\ntype EveToolMap = Partial<Record<GithubToolName, ToolDefinition>>\n\nfunction 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 return {\n ...tool,\n ...override.description !== undefined && { description: override.description },\n ...override.approval !== undefined && { approval: mapEveApprovalValue(override.approval) },\n ...override.toModelOutput !== undefined && { toModelOutput: override.toModelOutput },\n ...override.outputSchema !== undefined && { outputSchema: override.outputSchema },\n }\n}\n\nexport function buildEveToolDefinition(\n name: GithubToolName,\n options: BuildOptions = {},\n): ToolDefinition {\n const { defineTool } = getEveTools()\n const ctx: ToolBuildContext = {\n token: createGithubTokenResolver(options.token),\n 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 tool = defineTool({\n description: entry.description,\n inputSchema: entry.inputSchema,\n ...(entry.writeTool && {\n approval: resolveEveApproval(entry.writeTool, options.requireApproval),\n }),\n ...(entry.toModelOutput && { toModelOutput: entry.toModelOutput }),\n execute: async (input) => runGithubToolStep(name, input as Record<string, unknown>, ctx),\n })\n\n return applyOverrides(tool, name, options.overrides)\n}\n\nexport function buildEveToolMap(options: EveGithubToolsOptions = {}): EveToolMap {\n const { defineTool } = getEveTools()\n const ctx: ToolBuildContext = {\n token: createGithubTokenResolver(options.token),\n 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 tool = defineTool({\n description: entry.description,\n inputSchema: entry.inputSchema,\n ...(entry.writeTool && {\n approval: resolveEveApproval(entry.writeTool, options.requireApproval),\n }),\n ...(entry.toModelOutput && { toModelOutput: entry.toModelOutput }),\n execute: async (input) => runGithubToolStep(entry.name, input as Record<string, unknown>, ctx),\n })\n\n tools[entry.name] = applyOverrides(tool, entry.name, options.overrides)\n }\n\n return tools\n}\n\nexport function createEveGithubToolsDynamic(options: EveGithubToolsOptions = {}) {\n const { defineDynamic } = getEveTools()\n\n // TODO(eve-auth): resolve token from ctx.getToken('github') when eve-managed auth lands.\n // Deferred — eve does not yet expose managed GitHub tokens on the session context.\n return defineDynamic({\n events: {\n 'session.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\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;;;ACfA,SAAgB,oBAAoB,OAAmC;CACrE,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,QACsB;CACtB,IAAI,WAAW,KAAA,GAAW,OAAO,sBAAsB,CAAC,CAAC,OAAO;CAChE,IAAI,WAAW,MAAM,OAAO,sBAAsB,CAAC,CA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E,eAAe,MAAM,cAAc;GAChE,SAAS,OAAO,UAAU,kBAAkB,MAAM,MAAM,OAAkC,GAAG;EAC/F,CAAC;EAED,MAAM,MAAM,QAAQ,eAAe,MAAM,MAAM,MAAM,QAAQ,SAAS;CACxE;CAEA,OAAO;AACT;AAEA,SAAgB,4BAA4B,UAAiC,CAAC,GAAG;CAC/E,MAAM,EAAE,kBAAkB,YAAY;CAItC,OAAO,cAAc,EACnB,QAAQ,EACN,mBAAmB,YAAY,gBAAgB,OAAO,EACxD,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;;;;;AAMA,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 +0,0 @@
1
- {"version":3,"file":"index-BNeMjmgp.d.mts","names":[],"sources":["../src/core/tool-names.ts","../src/core/presets.ts","../src/core/write-tools.ts","../src/core/approval.ts","../src/types.ts","../src/core/context.ts","../src/core/token.ts","../src/core/tool-types.ts","../src/client.ts","../src/tools/repository.ts","../src/tools/pull-requests.ts","../src/tools/issues.ts","../src/tools/reactions.ts","../src/tools/discussions.ts","../src/tools/notifications.ts","../src/tools/search.ts","../src/tools/commits.ts","../src/tools/gists.ts","../src/tools/workflows.ts","../src/tools/checks.ts","../src/tools/releases.ts","../src/tools/bundles.ts","../src/agents.ts","../src/index.ts"],"mappings":";;;;;;;;cAIa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiKD,wBAAwB,+BAA+B;;;;;;;;cC9JtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA2KD,gCAAgC;;KAGhC,eAAe,UAAU,oBAAoB,gBAAgB,cAAc,YAAY;;KAGvF,wBAAwB,mBAAmB,sBAAsB,eAAe;;;;;;;cCpL/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAiFD,6BAA6B,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;KC3D7D,2BAA2B,QAAQ,OAAO;;;KCpB1C,aAAa;KAEb;EAAgB;;;;;;;;KAQhB;EACV;EACA;;;;;KAMU,oBAAoB;;;;;EAK9B,SAAS;;;;;EAKT,YAAY;;;;;EAKZ,YAAY;;;;;;;;;;;;;;;;;;;;KAqBF,gBAAgB,QAC1B,KACE;;;;;;;;;;KCpDQ;EACV;EACA;EACA;EACA;EACA;;;;KCfU,mCAAmC;;iBA+B/B,mBAAmB,QAAQ,mBAAmB;;;;KCvBlD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BAC1C,SAAS;EAA6B,QAAQ;IAC7C,qBAAqB,KAAK,gBAAgB,eAAe;iBAC5C,kBAAkB,mBAAmB,oBACnD,SAAS;EAA6B,QAAQ;IAC7C,qBAAqB,KAAK,gBAAgB,wBAAwB;;;KC1JzD,qBAAqB;;;;;;;;;;;;;;;;;;;EAmB/B,SAAS,mBAAmB;;iBAGd,kBAAkB,UAAU;EAA2B;IAAuB;iBAC9E,kBAAkB,UAAU,kBAC1C,SAAS;EAA2B,QAAQ;IAC3C,KAAK,gBAAgB,eAAe;iBACvB,kBAAkB,mBAAmB,oBACnD,SAAS;EAA2B,QAAQ;IAC3C,KAAK,gBAAgB,wBAAwB;iBAChC,kBAAkB,UAAU,qBAAqB,iBAAiB,KAAK,gBAAgB;KAyJ3F,cAAc,iBAAiB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"token-OPdZa0t3.mjs","names":[],"sources":["../src/connect/connector.ts","../src/connect/scopes.ts","../src/connect/params.ts","../src/connect/token.ts"],"sourcesContent":["/**\n * A Vercel Connect connector name, or a resolver that returns one.\n *\n * Use a function to pick the connector dynamically — e.g. a different\n * connector per environment (`production` vs. `preview`) or per tenant.\n * It's resolved lazily, on every token request, alongside the token itself.\n */\nexport type GithubConnectorInput = string | (() => string | Promise<string>)\n\n/** Resolves a {@link GithubConnectorInput} to a connector name string. */\nexport async function resolveGithubConnector(connector: GithubConnectorInput): Promise<string> {\n return typeof connector === 'function' ? await connector() : connector\n}\n","import { resolvePresetTools, type GithubToolPreset } from '../core/presets'\nimport { ALL_GITHUB_TOOL_NAMES, type GithubToolName } from '../core/tool-names'\n\n/**\n * Vercel Connect scope strings mapped to each {@link GithubToolPreset}.\n *\n * Scopes mirror GitHub App permissions (`contents`, `pull_requests`, `issues`,\n * `discussions`, `actions`, `checks`, `statuses`, `administration`, `metadata`)\n * and must cover every read/write family a preset's tools touch, not just its\n * primary domain. Release tools fall under the `contents` permission on GitHub\n * Apps, and reaction tools under `issues`, so neither needs a scope of its own.\n *\n * Gist tools in `repo-explorer` and `maintainer` are intentionally left\n * unscoped: the Gists API only accepts GitHub App *user* access tokens, never\n * installation tokens, and Connect always mints `subject: { type: 'app' }`\n * installation tokens. Gist calls made with a Connect-derived token 403\n * regardless of requested scopes — use a fine-grained PAT with the \"Gists\"\n * account permission for those tools instead.\n *\n * Notification tools in `maintainer` and `notification-inbox` are unscoped for\n * the same reason: `notifications` is an account-level GitHub App permission\n * that only applies to user access tokens, so `listNotifications` /\n * `markNotificationRead` need a PAT with the \"Notifications\" account permission.\n */\nexport const PRESET_CONNECT_SCOPES = {\n 'repo-explorer': [\n 'contents:read',\n 'metadata:read',\n 'pull_requests:read',\n 'issues:read',\n 'discussions:read',\n 'actions:read',\n 'checks:read',\n 'statuses:read',\n ],\n 'code-review': [\n 'contents:read',\n 'metadata:read',\n 'pull_requests:read',\n 'pull_requests:write',\n 'checks:read',\n 'statuses:read',\n ],\n 'issue-triage': [\n 'contents:read',\n 'metadata:read',\n 'issues:read',\n 'issues:write',\n ],\n 'ci-ops': [\n 'contents:read',\n 'metadata:read',\n 'actions:read',\n 'actions:write',\n 'checks:read',\n 'statuses:read',\n ],\n 'security-audit': [\n 'contents:read',\n 'metadata:read',\n 'pull_requests:read',\n 'issues:read',\n 'issues:write',\n 'actions:read',\n 'checks:read',\n 'statuses:read',\n ],\n 'release-manager': [\n 'contents:read',\n 'contents:write',\n 'metadata:read',\n 'pull_requests:read',\n 'actions:read',\n 'actions:write',\n ],\n 'discussion-moderator': [\n 'contents:read',\n 'metadata:read',\n 'issues:read',\n 'issues:write',\n 'discussions:read',\n 'discussions:write',\n ],\n 'notification-inbox': [\n 'contents:read',\n 'metadata:read',\n 'pull_requests:read',\n 'issues:read',\n ],\n 'pr-author': [\n 'contents:read',\n 'contents:write',\n 'metadata:read',\n 'pull_requests:read',\n 'pull_requests:write',\n ],\n 'maintainer': [\n 'contents:read',\n 'contents:write',\n 'metadata:read',\n 'pull_requests:read',\n 'pull_requests:write',\n 'issues:read',\n 'issues:write',\n 'discussions:read',\n 'discussions:write',\n 'actions:read',\n 'actions:write',\n 'checks:read',\n 'statuses:read',\n 'administration:read',\n 'administration:write',\n ],\n} as const satisfies Record<GithubToolPreset, readonly string[]>\n\n/** Default scopes when no preset is specified — union of all preset scopes. */\nconst ALL_CONNECT_SCOPES = [\n ...new Set(Object.values(PRESET_CONNECT_SCOPES).flat()),\n] as string[]\n\n/** Stable scope order for tool-derived unions (tests + Connect payloads). */\nconst SCOPE_ORDER = [\n 'contents:read',\n 'contents:write',\n 'metadata:read',\n 'pull_requests:read',\n 'pull_requests:write',\n 'issues:read',\n 'issues:write',\n 'discussions:read',\n 'discussions:write',\n 'actions:read',\n 'actions:write',\n 'checks:read',\n 'statuses:read',\n 'administration:read',\n 'administration:write',\n] as const\n\nconst CONTENTS_READ = ['contents:read', 'metadata:read'] as const\nconst CONTENTS_WRITE = ['contents:read', 'contents:write', 'metadata:read'] as const\nconst PR_READ = ['contents:read', 'metadata:read', 'pull_requests:read'] as const\nconst PR_WRITE = ['contents:read', 'metadata:read', 'pull_requests:read', 'pull_requests:write'] as const\n/** Read-only PR context (details, files, reviews) plus optional CI checks. */\nconst PR_CONTEXT = ['contents:read', 'metadata:read', 'pull_requests:read', 'checks:read', 'statuses:read'] as const\nconst ISSUES_READ = ['contents:read', 'metadata:read', 'issues:read'] as const\nconst ISSUES_WRITE = ['contents:read', 'metadata:read', 'issues:read', 'issues:write'] as const\nconst DISCUSSIONS_READ = ['contents:read', 'metadata:read', 'discussions:read'] as const\nconst DISCUSSIONS_WRITE = ['contents:read', 'metadata:read', 'discussions:read', 'discussions:write'] as const\nconst ACTIONS_READ = ['contents:read', 'metadata:read', 'actions:read'] as const\nconst ACTIONS_WRITE = ['contents:read', 'metadata:read', 'actions:read', 'actions:write'] as const\nconst CHECKS = ['contents:read', 'metadata:read', 'checks:read', 'statuses:read'] as const\nconst CI_CONTEXT = ['contents:read', 'metadata:read', 'actions:read', 'checks:read', 'statuses:read'] as const\nconst ADMIN = ['metadata:read', 'administration:read', 'administration:write'] as const\nconst SEARCH_REPOS = ['metadata:read'] as const\nconst SEARCH_ISSUES = ['metadata:read', 'issues:read', 'pull_requests:read'] as const\nconst UNSCOPED = [] as const\n\n/**\n * Per-tool Connect scopes. Empty arrays are intentional for gist and\n * notification tools (installation tokens cannot satisfy those APIs).\n */\nexport const TOOL_CONNECT_SCOPES = {\n getRepository: CONTENTS_READ,\n listBranches: CONTENTS_READ,\n getFileContent: CONTENTS_READ,\n getRepositoryTree: CONTENTS_READ,\n createBranch: CONTENTS_WRITE,\n forkRepository: CONTENTS_READ,\n createRepository: ADMIN,\n createOrUpdateFile: CONTENTS_WRITE,\n\n listPullRequests: PR_READ,\n getPullRequest: PR_READ,\n createPullRequest: PR_WRITE,\n mergePullRequest: PR_WRITE,\n updatePullRequest: PR_WRITE,\n addPullRequestComment: PR_WRITE,\n updatePullRequestComment: PR_WRITE,\n deletePullRequestComment: PR_WRITE,\n listPullRequestFiles: PR_READ,\n listPullRequestReviews: PR_READ,\n createPullRequestReview: PR_WRITE,\n requestReviewers: PR_WRITE,\n getPullRequestContext: PR_CONTEXT,\n\n listIssues: ISSUES_READ,\n getIssue: ISSUES_READ,\n getIssueContext: ISSUES_READ,\n createIssue: ISSUES_WRITE,\n addIssueComment: ISSUES_WRITE,\n updateIssueComment: ISSUES_WRITE,\n deleteIssueComment: ISSUES_WRITE,\n closeIssue: ISSUES_WRITE,\n updateIssue: ISSUES_WRITE,\n listLabels: ISSUES_READ,\n addLabels: ISSUES_WRITE,\n removeLabel: ISSUES_WRITE,\n createLabel: ISSUES_WRITE,\n updateLabel: ISSUES_WRITE,\n deleteLabel: ISSUES_WRITE,\n addAssignees: ISSUES_WRITE,\n removeAssignees: ISSUES_WRITE,\n\n searchCode: CONTENTS_READ,\n searchRepositories: SEARCH_REPOS,\n searchIssues: SEARCH_ISSUES,\n\n listCommits: CONTENTS_READ,\n getCommit: CONTENTS_READ,\n getBlame: CONTENTS_READ,\n compareCommits: CONTENTS_READ,\n\n listGists: UNSCOPED,\n getGist: UNSCOPED,\n listGistComments: UNSCOPED,\n createGist: UNSCOPED,\n updateGist: UNSCOPED,\n deleteGist: UNSCOPED,\n createGistComment: UNSCOPED,\n\n listWorkflows: ACTIONS_READ,\n listWorkflowRuns: ACTIONS_READ,\n getWorkflowRun: ACTIONS_READ,\n listWorkflowJobs: ACTIONS_READ,\n triggerWorkflow: ACTIONS_WRITE,\n cancelWorkflowRun: ACTIONS_WRITE,\n rerunWorkflowRun: ACTIONS_WRITE,\n\n listCheckRuns: CHECKS,\n getCombinedStatus: CHECKS,\n getCiFailureContext: CI_CONTEXT,\n\n listDiscussions: DISCUSSIONS_READ,\n getDiscussion: DISCUSSIONS_READ,\n addDiscussionComment: DISCUSSIONS_WRITE,\n\n listNotifications: UNSCOPED,\n markNotificationRead: UNSCOPED,\n\n listIssueReactions: ISSUES_READ,\n addIssueReaction: ISSUES_WRITE,\n listCommentReactions: ISSUES_READ,\n addCommentReaction: ISSUES_WRITE,\n\n listReleases: CONTENTS_READ,\n getLatestRelease: CONTENTS_READ,\n getRelease: CONTENTS_READ,\n getReleaseContext: CONTENTS_READ,\n createRelease: CONTENTS_WRITE,\n updateRelease: CONTENTS_WRITE,\n deleteRelease: CONTENTS_WRITE,\n} as const satisfies Record<GithubToolName, readonly string[]>\n\nfunction orderScopes(scopes: Set<string>): string[] {\n return SCOPE_ORDER.filter(scope => scopes.has(scope))\n}\n\n/**\n * Returns Vercel Connect scopes for a preset or combined presets.\n * Without a preset, returns the union of all preset scopes (full tool set).\n */\nexport function connectGithubScopesForPreset(\n preset?: GithubToolPreset | GithubToolPreset[],\n): string[] {\n if (!preset) return [...ALL_CONNECT_SCOPES]\n\n const presets = Array.isArray(preset) ? preset : [preset]\n return [\n ...new Set(presets.flatMap(p => PRESET_CONNECT_SCOPES[p])),\n ]\n}\n\n/**\n * Returns Connect scopes covering exactly the given tools.\n * Always includes `metadata:read`. Gist and notification tools contribute nothing.\n */\nexport function connectGithubScopesForTools(names: readonly GithubToolName[]): string[] {\n const scopes = new Set<string>(['metadata:read'])\n for (const name of names) {\n for (const scope of TOOL_CONNECT_SCOPES[name]) {\n scopes.add(scope)\n }\n }\n return orderScopes(scopes)\n}\n\nexport type ConnectScopeSelection = {\n preset?: GithubToolPreset | GithubToolPreset[]\n include?: readonly GithubToolName[]\n exclude?: readonly GithubToolName[]\n}\n\nfunction resolveSelectedToolNames({\n preset,\n include,\n exclude,\n}: ConnectScopeSelection): GithubToolName[] {\n const presetAllowed = preset ? resolvePresetTools(preset) : null\n const includeAllowed = include ? new Set(include) : null\n const excluded = exclude ? new Set(exclude) : null\n\n const allowed = presetAllowed && includeAllowed\n ? new Set([...presetAllowed, ...includeAllowed])\n : presetAllowed ?? includeAllowed\n\n return ALL_GITHUB_TOOL_NAMES.filter(\n name => (!allowed || allowed.has(name)) && !excluded?.has(name),\n )\n}\n\n/**\n * Resolves Connect scopes for the effective tool set.\n *\n * - No `include` / `exclude`: same as {@link connectGithubScopesForPreset}\n * (omitted preset → full union, including `administration:write`).\n * - With `include` and/or `exclude`: scopes are derived from the resolved tools\n * so a hand-picked `include` list does not mint the full admin surface.\n */\nexport function connectGithubScopesForSelection(selection: ConnectScopeSelection = {}): string[] {\n const { preset, include, exclude } = selection\n if (!include && !exclude) {\n return connectGithubScopesForPreset(preset)\n }\n return connectGithubScopesForTools(resolveSelectedToolNames(selection))\n}\n","import type { ConnectTokenParams } from '@vercel/connect'\nimport { connectGithubScopesForSelection } from './scopes'\nimport type { ConnectGithubTokenOptions, GithubConnectParams } from './types'\n\nexport function resolveGithubConnectTokenParams(\n options: ConnectGithubTokenOptions = {},\n): ConnectTokenParams {\n const { preset, include, exclude, params } = options\n const scopes = params?.scopes ?? connectGithubScopesForSelection({ preset, include, exclude })\n return buildConnectTokenParams(scopes, params)\n}\n\nfunction buildConnectTokenParams(\n scopes: string[],\n params?: GithubConnectParams,\n): ConnectTokenParams {\n const { repositories, ...rest } = params ?? {}\n\n const authorizationDetails = rest.authorizationDetails\n ?? (repositories?.length\n ? [{ type: 'github_app_installation' as const, repositories }]\n : undefined)\n\n return {\n subject: { type: 'app' },\n ...rest,\n scopes,\n ...(authorizationDetails && { authorizationDetails }),\n }\n}\n","import { getToken, type ConnectOptions } from '@vercel/connect'\nimport type { GithubTokenInput } from '../core/token'\nimport { resolveGithubConnector, type GithubConnectorInput } from './connector'\nimport { resolveGithubConnectTokenParams } from './params'\nimport type { ConnectGithubTokenOptions } from './types'\n\n/**\n * Returns a lazy GitHub token provider backed by a Vercel Connect connector.\n * Scopes are derived from `preset`, or from the resolved `include`/`exclude`\n * tool set when those are set, unless overridden in `params.scopes`.\n *\n * `connector` may be a static name or a resolver function — e.g. to pick a\n * different connector per environment (production vs. preview) or tenant.\n * It's re-resolved on every call, alongside the token itself.\n */\nexport function connectGithubToken(\n connector: GithubConnectorInput,\n options: ConnectGithubTokenOptions = {},\n): GithubTokenInput {\n const { connectOptions } = options\n const tokenParams = resolveGithubConnectTokenParams(options)\n\n return async () => getToken(await resolveGithubConnector(connector), tokenParams, connectOptions)\n}\n\nexport type { ConnectOptions }\n"],"mappings":";;;;AAUA,eAAsB,uBAAuB,WAAkD;CAC7F,OAAO,OAAO,cAAc,aAAa,MAAM,UAAU,IAAI;AAC/D;;;;;;;;;;;;;;;;;;;;;;;;ACYA,MAAa,wBAAwB;CACnC,iBAAiB;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,eAAe;EACb;EACA;EACA;EACA;EACA;EACA;CACF;CACA,gBAAgB;EACd;EACA;EACA;EACA;CACF;CACA,UAAU;EACR;EACA;EACA;EACA;EACA;EACA;CACF;CACA,kBAAkB;EAChB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,mBAAmB;EACjB;EACA;EACA;EACA;EACA;EACA;CACF;CACA,wBAAwB;EACtB;EACA;EACA;EACA;EACA;EACA;CACF;CACA,sBAAsB;EACpB;EACA;EACA;EACA;CACF;CACA,aAAa;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