{"version":3,"file":"src-C54blWpT.mjs","names":[],"sources":["../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/core/approval.ts","../src/agents.ts","../src/index.ts"],"sourcesContent":["import { tool } from 'ai'\nimport {\n  getRepositoryInputSchema,\n  getRepositoryDescription,\n  getRepositoryCore,\n  listBranchesInputSchema,\n  listBranchesDescription,\n  listBranchesCore,\n  getFileContentInputSchema,\n  getFileContentDescription,\n  getFileContentCore,\n  getRepositoryTreeInputSchema,\n  getRepositoryTreeDescription,\n  getRepositoryTreeCore,\n  createBranchInputSchema,\n  createBranchDescription,\n  createBranchCore,\n  deleteBranchInputSchema,\n  deleteBranchDescription,\n  deleteBranchCore,\n  forkRepositoryInputSchema,\n  forkRepositoryDescription,\n  forkRepositoryCore,\n  createRepositoryInputSchema,\n  createRepositoryDescription,\n  createRepositoryCore,\n  createOrUpdateFileInputSchema,\n  createOrUpdateFileDescription,\n  createOrUpdateFileCore,\n  composeCommitMessage,\n} from '../core/repository'\nimport { getFileContentToModelOutput, getRepositoryTreeToModelOutput } from '../core/model-output'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { CommitToolOptions, ToolOptions, GithubTool } from '../types'\n\nexport { composeCommitMessage }\n\nasync function getRepositoryStep(args: Parameters<typeof getRepositoryCore>[0]) {\n  \"use step\"\n  return getRepositoryCore(args)\n}\n\n/** Get information about a GitHub repository including description, stars, forks, language, and default branch. */\nexport const getRepository = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getRepositoryDescription,\n    inputSchema: getRepositoryInputSchema,\n    execute: async args => getRepositoryStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function listBranchesStep(args: Parameters<typeof listBranchesCore>[0]) {\n  \"use step\"\n  return listBranchesCore(args)\n}\n\n/** List branches in a GitHub repository. */\nexport const listBranches = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listBranchesDescription,\n    inputSchema: listBranchesInputSchema,\n    execute: async args => listBranchesStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getFileContentStep(args: Parameters<typeof getFileContentCore>[0]) {\n  \"use step\"\n  return getFileContentCore(args)\n}\n\n/** Get the content of a file from a GitHub repository. */\nexport const getFileContent = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getFileContentDescription,\n    inputSchema: getFileContentInputSchema,\n    toModelOutput: getFileContentToModelOutput,\n    execute: async args => getFileContentStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getRepositoryTreeStep(args: Parameters<typeof getRepositoryTreeCore>[0]) {\n  \"use step\"\n  return getRepositoryTreeCore(args)\n}\n\n/** List the file and directory structure of a repository at a given ref. */\nexport const getRepositoryTree = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getRepositoryTreeDescription,\n    inputSchema: getRepositoryTreeInputSchema,\n    toModelOutput: getRepositoryTreeToModelOutput,\n    execute: async args => getRepositoryTreeStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function createBranchStep(args: Parameters<typeof createBranchCore>[0]) {\n  \"use step\"\n  return createBranchCore(args)\n}\n\n/** Create a new branch in a GitHub repository from an existing branch or commit SHA. Requires approval by default. */\nexport const createBranch = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: createBranchDescription,\n    needsApproval,\n    inputSchema: createBranchInputSchema,\n    execute: async args => createBranchStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function deleteBranchStep(args: Parameters<typeof deleteBranchCore>[0]) {\n  \"use step\"\n  return deleteBranchCore(args)\n}\n\n/** Delete a branch from a GitHub repository permanently. Requires approval by default. */\nexport const deleteBranch = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: deleteBranchDescription,\n    needsApproval,\n    inputSchema: deleteBranchInputSchema,\n    execute: async args => deleteBranchStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function forkRepositoryStep(args: Parameters<typeof forkRepositoryCore>[0]) {\n  \"use step\"\n  return forkRepositoryCore(args)\n}\n\n/** Fork a GitHub repository to the authenticated user account or a specified organization. Requires approval by default. */\nexport const forkRepository = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: forkRepositoryDescription,\n    needsApproval,\n    inputSchema: forkRepositoryInputSchema,\n    execute: async args => forkRepositoryStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function createRepositoryStep(args: Parameters<typeof createRepositoryCore>[0]) {\n  \"use step\"\n  return createRepositoryCore(args)\n}\n\n/** Create a new GitHub repository for the authenticated user or a specified organization. Requires approval by default. */\nexport const createRepository = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: createRepositoryDescription,\n    needsApproval,\n    inputSchema: createRepositoryInputSchema,\n    execute: async args => createRepositoryStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function createOrUpdateFileStep(args: Parameters<typeof createOrUpdateFileCore>[0]) {\n  \"use step\"\n  return createOrUpdateFileCore(args)\n}\n\n/** Create or update a file in a GitHub repository. Provide the SHA when updating an existing file. Requires approval by default. */\nexport const createOrUpdateFile = (\n  token: GithubTokenInput,\n  { needsApproval = true, author, committer, coAuthors }: CommitToolOptions = {},\n): GithubTool =>\n  tool({\n    description: createOrUpdateFileDescription,\n    needsApproval,\n    inputSchema: createOrUpdateFileInputSchema,\n    execute: async args => createOrUpdateFileStep({ token: await resolveGithubToken(token), author, committer, coAuthors, ...args }),\n  })\n","import { tool } from 'ai'\nimport {\n  listPullRequestsInputSchema,\n  listPullRequestsDescription,\n  listPullRequestsCore,\n  getPullRequestInputSchema,\n  getPullRequestDescription,\n  getPullRequestCore,\n  createPullRequestInputSchema,\n  createPullRequestDescription,\n  createPullRequestCore,\n  mergePullRequestInputSchema,\n  mergePullRequestDescription,\n  mergePullRequestCore,\n  updatePullRequestInputSchema,\n  updatePullRequestDescription,\n  updatePullRequestCore,\n  addPullRequestCommentInputSchema,\n  addPullRequestCommentDescription,\n  addPullRequestCommentCore,\n  updatePullRequestCommentInputSchema,\n  updatePullRequestCommentDescription,\n  updatePullRequestCommentCore,\n  deletePullRequestCommentInputSchema,\n  deletePullRequestCommentDescription,\n  deletePullRequestCommentCore,\n  listPullRequestFilesInputSchema,\n  listPullRequestFilesDescription,\n  listPullRequestFilesCore,\n  listPullRequestReviewsInputSchema,\n  listPullRequestReviewsDescription,\n  listPullRequestReviewsCore,\n  createPullRequestReviewInputSchema,\n  createPullRequestReviewDescription,\n  createPullRequestReviewCore,\n  listPullRequestReviewThreadsInputSchema,\n  listPullRequestReviewThreadsDescription,\n  listPullRequestReviewThreadsCore,\n  replyToReviewCommentInputSchema,\n  replyToReviewCommentDescription,\n  replyToReviewCommentCore,\n  resolveReviewThreadInputSchema,\n  resolveReviewThreadDescription,\n  resolveReviewThreadCore,\n  requestReviewersInputSchema,\n  requestReviewersDescription,\n  requestReviewersCore,\n} from '../core/pull-requests'\nimport { listPullRequestFilesToModelOutput } from '../core/model-output'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { CommitIdentity, ToolOptions, GithubTool } from '../types'\n\nexport type MergeToolOptions = ToolOptions & {\n  coAuthors?: CommitIdentity[]\n}\n\nasync function listPullRequestsStep(args: Parameters<typeof listPullRequestsCore>[0]) {\n  \"use step\"\n  return listPullRequestsCore(args)\n}\n\n/** List pull requests for a GitHub repository. */\nexport const listPullRequests = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listPullRequestsDescription,\n    inputSchema: listPullRequestsInputSchema,\n    execute: async args => listPullRequestsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getPullRequestStep(args: Parameters<typeof getPullRequestCore>[0]) {\n  \"use step\"\n  return getPullRequestCore(args)\n}\n\n/** Get detailed information about a specific pull request. */\nexport const getPullRequest = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getPullRequestDescription,\n    inputSchema: getPullRequestInputSchema,\n    execute: async args => getPullRequestStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function createPullRequestStep(args: Parameters<typeof createPullRequestCore>[0]) {\n  \"use step\"\n  return createPullRequestCore(args)\n}\n\n/** Create a new pull request in a GitHub repository. Requires approval by default. */\nexport const createPullRequest = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: createPullRequestDescription,\n    needsApproval,\n    inputSchema: createPullRequestInputSchema,\n    execute: async args => createPullRequestStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function mergePullRequestStep(args: Parameters<typeof mergePullRequestCore>[0]) {\n  \"use step\"\n  return mergePullRequestCore(args)\n}\n\n/** Merge a pull request. Requires approval by default. */\nexport const mergePullRequest = (token: GithubTokenInput, { needsApproval = true, coAuthors }: MergeToolOptions = {}): GithubTool =>\n  tool({\n    description: mergePullRequestDescription,\n    needsApproval,\n    inputSchema: mergePullRequestInputSchema,\n    execute: async args => mergePullRequestStep({ token: await resolveGithubToken(token), coAuthors, ...args }),\n  })\n\nasync function updatePullRequestStep(args: Parameters<typeof updatePullRequestCore>[0]) {\n  \"use step\"\n  return updatePullRequestCore(args)\n}\n\n/** Update a pull request — title, body, state, base branch, or draft status. Requires approval by default. */\nexport const updatePullRequest = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: updatePullRequestDescription,\n    needsApproval,\n    inputSchema: updatePullRequestInputSchema,\n    execute: async args => updatePullRequestStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function addPullRequestCommentStep(args: Parameters<typeof addPullRequestCommentCore>[0]) {\n  \"use step\"\n  return addPullRequestCommentCore(args)\n}\n\n/** Add a comment to a pull request. Requires approval by default. */\nexport const addPullRequestComment = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: addPullRequestCommentDescription,\n    needsApproval,\n    inputSchema: addPullRequestCommentInputSchema,\n    execute: async args => addPullRequestCommentStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function updatePullRequestCommentStep(args: Parameters<typeof updatePullRequestCommentCore>[0]) {\n  \"use step\"\n  return updatePullRequestCommentCore(args)\n}\n\n/** Update the body of a comment on a pull request. Requires approval by default. */\nexport const updatePullRequestComment = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: updatePullRequestCommentDescription,\n    needsApproval,\n    inputSchema: updatePullRequestCommentInputSchema,\n    execute: async args => updatePullRequestCommentStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function deletePullRequestCommentStep(args: Parameters<typeof deletePullRequestCommentCore>[0]) {\n  \"use step\"\n  return deletePullRequestCommentCore(args)\n}\n\n/** Delete a comment from a pull request permanently. Requires approval by default. */\nexport const deletePullRequestComment = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: deletePullRequestCommentDescription,\n    needsApproval,\n    inputSchema: deletePullRequestCommentInputSchema,\n    execute: async args => deletePullRequestCommentStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function listPullRequestFilesStep(args: Parameters<typeof listPullRequestFilesCore>[0]) {\n  \"use step\"\n  return listPullRequestFilesCore(args)\n}\n\n/** List files changed in a pull request with status and stats. Patches omitted by default. */\nexport const listPullRequestFiles = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listPullRequestFilesDescription,\n    inputSchema: listPullRequestFilesInputSchema,\n    toModelOutput: listPullRequestFilesToModelOutput,\n    execute: async args => listPullRequestFilesStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function listPullRequestReviewsStep(args: Parameters<typeof listPullRequestReviewsCore>[0]) {\n  \"use step\"\n  return listPullRequestReviewsCore(args)\n}\n\n/** List reviews on a pull request (approvals, change requests, and comments). */\nexport const listPullRequestReviews = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listPullRequestReviewsDescription,\n    inputSchema: listPullRequestReviewsInputSchema,\n    execute: async args => listPullRequestReviewsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function createPullRequestReviewStep(args: Parameters<typeof createPullRequestReviewCore>[0]) {\n  \"use step\"\n  return createPullRequestReviewCore(args)\n}\n\n/** Submit a pull request review with optional inline comments. Requires approval by default. */\nexport const createPullRequestReview = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: createPullRequestReviewDescription,\n    needsApproval,\n    inputSchema: createPullRequestReviewInputSchema,\n    execute: async args => createPullRequestReviewStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function listPullRequestReviewThreadsStep(args: Parameters<typeof listPullRequestReviewThreadsCore>[0]) {\n  \"use step\"\n  return listPullRequestReviewThreadsCore(args)\n}\n\n/** List review threads on a pull request with comments, resolution state, and reply/resolve IDs. */\nexport const listPullRequestReviewThreads = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listPullRequestReviewThreadsDescription,\n    inputSchema: listPullRequestReviewThreadsInputSchema,\n    execute: async args => listPullRequestReviewThreadsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function replyToReviewCommentStep(args: Parameters<typeof replyToReviewCommentCore>[0]) {\n  \"use step\"\n  return replyToReviewCommentCore(args)\n}\n\n/** Reply to a pull request review comment in its review thread. Requires approval by default. */\nexport const replyToReviewComment = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: replyToReviewCommentDescription,\n    needsApproval,\n    inputSchema: replyToReviewCommentInputSchema,\n    execute: async args => replyToReviewCommentStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function resolveReviewThreadStep(args: Parameters<typeof resolveReviewThreadCore>[0]) {\n  \"use step\"\n  return resolveReviewThreadCore(args)\n}\n\n/** Mark a pull request review thread as resolved. Requires approval by default. */\nexport const resolveReviewThread = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: resolveReviewThreadDescription,\n    needsApproval,\n    inputSchema: resolveReviewThreadInputSchema,\n    execute: async args => resolveReviewThreadStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function requestReviewersStep(args: Parameters<typeof requestReviewersCore>[0]) {\n  \"use step\"\n  return requestReviewersCore(args)\n}\n\n/** Request reviews from users or teams on a pull request. Requires approval by default. */\nexport const requestReviewers = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: requestReviewersDescription,\n    needsApproval,\n    inputSchema: requestReviewersInputSchema,\n    execute: async args => requestReviewersStep({ token: await resolveGithubToken(token), ...args }),\n  })\n","import { tool } from 'ai'\nimport {\n  listIssuesInputSchema,\n  listIssuesDescription,\n  listIssuesCore,\n  getIssueInputSchema,\n  getIssueDescription,\n  getIssueCore,\n  listIssueCommentsInputSchema,\n  listIssueCommentsDescription,\n  listIssueCommentsCore,\n  createIssueInputSchema,\n  createIssueDescription,\n  createIssueCore,\n  addIssueCommentInputSchema,\n  addIssueCommentDescription,\n  addIssueCommentCore,\n  closeIssueInputSchema,\n  closeIssueDescription,\n  closeIssueCore,\n  updateIssueInputSchema,\n  updateIssueDescription,\n  updateIssueCore,\n  updateIssueCommentInputSchema,\n  updateIssueCommentDescription,\n  updateIssueCommentCore,\n  deleteIssueCommentInputSchema,\n  deleteIssueCommentDescription,\n  deleteIssueCommentCore,\n  listLabelsInputSchema,\n  listLabelsDescription,\n  listLabelsCore,\n  addLabelsInputSchema,\n  addLabelsDescription,\n  addLabelsCore,\n  removeLabelInputSchema,\n  removeLabelDescription,\n  removeLabelCore,\n  createLabelInputSchema,\n  createLabelDescription,\n  createLabelCore,\n  updateLabelInputSchema,\n  updateLabelDescription,\n  updateLabelCore,\n  deleteLabelInputSchema,\n  deleteLabelDescription,\n  deleteLabelCore,\n  addAssigneesInputSchema,\n  addAssigneesDescription,\n  addAssigneesCore,\n  removeAssigneesInputSchema,\n  removeAssigneesDescription,\n  removeAssigneesCore,\n} from '../core/issues'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { ToolOptions, GithubTool } from '../types'\n\nasync function listIssuesStep(args: Parameters<typeof listIssuesCore>[0]) {\n  \"use step\"\n  return listIssuesCore(args)\n}\n\n/** List issues for a GitHub repository (excludes pull requests). */\nexport const listIssues = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listIssuesDescription,\n    inputSchema: listIssuesInputSchema,\n    execute: async args => listIssuesStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getIssueStep(args: Parameters<typeof getIssueCore>[0]) {\n  \"use step\"\n  return getIssueCore(args)\n}\n\n/** Get detailed information about a specific issue. */\nexport const getIssue = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getIssueDescription,\n    inputSchema: getIssueInputSchema,\n    execute: async args => getIssueStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function listIssueCommentsStep(args: Parameters<typeof listIssueCommentsCore>[0]) {\n  \"use step\"\n  return listIssueCommentsCore(args)\n}\n\n/** List comments on a GitHub issue. Prefer getIssueContext for the first page when triaging. */\nexport const listIssueComments = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listIssueCommentsDescription,\n    inputSchema: listIssueCommentsInputSchema,\n    execute: async args => listIssueCommentsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function createIssueStep(args: Parameters<typeof createIssueCore>[0]) {\n  \"use step\"\n  return createIssueCore(args)\n}\n\n/** Create a new issue in a GitHub repository. Requires approval by default. */\nexport const createIssue = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: createIssueDescription,\n    needsApproval,\n    inputSchema: createIssueInputSchema,\n    execute: async args => createIssueStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function addIssueCommentStep(args: Parameters<typeof addIssueCommentCore>[0]) {\n  \"use step\"\n  return addIssueCommentCore(args)\n}\n\n/** Add a comment to a GitHub issue. Requires approval by default. */\nexport const addIssueComment = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: addIssueCommentDescription,\n    needsApproval,\n    inputSchema: addIssueCommentInputSchema,\n    execute: async args => addIssueCommentStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function closeIssueStep(args: Parameters<typeof closeIssueCore>[0]) {\n  \"use step\"\n  return closeIssueCore(args)\n}\n\n/** Close an open GitHub issue. Requires approval by default. */\nexport const closeIssue = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: closeIssueDescription,\n    needsApproval,\n    inputSchema: closeIssueInputSchema,\n    execute: async args => closeIssueStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function updateIssueStep(args: Parameters<typeof updateIssueCore>[0]) {\n  \"use step\"\n  return updateIssueCore(args)\n}\n\n/** Update a GitHub issue — title, body, state, labels, milestone, or assignees. Requires approval by default. */\nexport const updateIssue = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: updateIssueDescription,\n    needsApproval,\n    inputSchema: updateIssueInputSchema,\n    execute: async args => updateIssueStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function updateIssueCommentStep(args: Parameters<typeof updateIssueCommentCore>[0]) {\n  \"use step\"\n  return updateIssueCommentCore(args)\n}\n\n/** Update the body of a comment on a GitHub issue. Requires approval by default. */\nexport const updateIssueComment = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: updateIssueCommentDescription,\n    needsApproval,\n    inputSchema: updateIssueCommentInputSchema,\n    execute: async args => updateIssueCommentStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function deleteIssueCommentStep(args: Parameters<typeof deleteIssueCommentCore>[0]) {\n  \"use step\"\n  return deleteIssueCommentCore(args)\n}\n\n/** Delete a comment from a GitHub issue permanently. Requires approval by default. */\nexport const deleteIssueComment = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: deleteIssueCommentDescription,\n    needsApproval,\n    inputSchema: deleteIssueCommentInputSchema,\n    execute: async args => deleteIssueCommentStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function listLabelsStep(args: Parameters<typeof listLabelsCore>[0]) {\n  \"use step\"\n  return listLabelsCore(args)\n}\n\n/** List labels available in a GitHub repository. */\nexport const listLabels = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listLabelsDescription,\n    inputSchema: listLabelsInputSchema,\n    execute: async args => listLabelsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function addLabelsStep(args: Parameters<typeof addLabelsCore>[0]) {\n  \"use step\"\n  return addLabelsCore(args)\n}\n\n/** Add labels to an issue or pull request. Requires approval by default. */\nexport const addLabels = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: addLabelsDescription,\n    needsApproval,\n    inputSchema: addLabelsInputSchema,\n    execute: async args => addLabelsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function removeLabelStep(args: Parameters<typeof removeLabelCore>[0]) {\n  \"use step\"\n  return removeLabelCore(args)\n}\n\n/** Remove a label from an issue or pull request. Requires approval by default. */\nexport const removeLabel = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: removeLabelDescription,\n    needsApproval,\n    inputSchema: removeLabelInputSchema,\n    execute: async args => removeLabelStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function createLabelStep(args: Parameters<typeof createLabelCore>[0]) {\n  \"use step\"\n  return createLabelCore(args)\n}\n\n/** Create a label in a GitHub repository. Requires approval by default. */\nexport const createLabel = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: createLabelDescription,\n    needsApproval,\n    inputSchema: createLabelInputSchema,\n    execute: async args => createLabelStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function updateLabelStep(args: Parameters<typeof updateLabelCore>[0]) {\n  \"use step\"\n  return updateLabelCore(args)\n}\n\n/** Update a label in a GitHub repository. Requires approval by default. */\nexport const updateLabel = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: updateLabelDescription,\n    needsApproval,\n    inputSchema: updateLabelInputSchema,\n    execute: async args => updateLabelStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function deleteLabelStep(args: Parameters<typeof deleteLabelCore>[0]) {\n  \"use step\"\n  return deleteLabelCore(args)\n}\n\n/** Delete a label from a GitHub repository permanently. Requires approval by default. */\nexport const deleteLabel = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: deleteLabelDescription,\n    needsApproval,\n    inputSchema: deleteLabelInputSchema,\n    execute: async args => deleteLabelStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function addAssigneesStep(args: Parameters<typeof addAssigneesCore>[0]) {\n  \"use step\"\n  return addAssigneesCore(args)\n}\n\n/** Assign users to an issue or pull request. Requires approval by default. */\nexport const addAssignees = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: addAssigneesDescription,\n    needsApproval,\n    inputSchema: addAssigneesInputSchema,\n    execute: async args => addAssigneesStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function removeAssigneesStep(args: Parameters<typeof removeAssigneesCore>[0]) {\n  \"use step\"\n  return removeAssigneesCore(args)\n}\n\n/** Remove assignees from an issue or pull request. Requires approval by default. */\nexport const removeAssignees = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: removeAssigneesDescription,\n    needsApproval,\n    inputSchema: removeAssigneesInputSchema,\n    execute: async args => removeAssigneesStep({ token: await resolveGithubToken(token), ...args }),\n  })\n","import { tool } from 'ai'\nimport {\n  listIssueReactionsInputSchema,\n  listIssueReactionsDescription,\n  listIssueReactionsCore,\n  addIssueReactionInputSchema,\n  addIssueReactionDescription,\n  addIssueReactionCore,\n  listCommentReactionsInputSchema,\n  listCommentReactionsDescription,\n  listCommentReactionsCore,\n  addCommentReactionInputSchema,\n  addCommentReactionDescription,\n  addCommentReactionCore,\n} from '../core/reactions'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { ToolOptions, GithubTool } from '../types'\n\nasync function listIssueReactionsStep(args: Parameters<typeof listIssueReactionsCore>[0]) {\n  \"use step\"\n  return listIssueReactionsCore(args)\n}\n\n/** List reactions on an issue or pull request conversation. */\nexport const listIssueReactions = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listIssueReactionsDescription,\n    inputSchema: listIssueReactionsInputSchema,\n    execute: async args => listIssueReactionsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function addIssueReactionStep(args: Parameters<typeof addIssueReactionCore>[0]) {\n  \"use step\"\n  return addIssueReactionCore(args)\n}\n\n/** React to an issue or pull request with an emoji. Requires approval by default. */\nexport const addIssueReaction = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: addIssueReactionDescription,\n    needsApproval,\n    inputSchema: addIssueReactionInputSchema,\n    execute: async args => addIssueReactionStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function listCommentReactionsStep(args: Parameters<typeof listCommentReactionsCore>[0]) {\n  \"use step\"\n  return listCommentReactionsCore(args)\n}\n\n/** List reactions on an issue or pull request comment. */\nexport const listCommentReactions = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listCommentReactionsDescription,\n    inputSchema: listCommentReactionsInputSchema,\n    execute: async args => listCommentReactionsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function addCommentReactionStep(args: Parameters<typeof addCommentReactionCore>[0]) {\n  \"use step\"\n  return addCommentReactionCore(args)\n}\n\n/** React to an issue or pull request comment with an emoji. Requires approval by default. */\nexport const addCommentReaction = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: addCommentReactionDescription,\n    needsApproval,\n    inputSchema: addCommentReactionInputSchema,\n    execute: async args => addCommentReactionStep({ token: await resolveGithubToken(token), ...args }),\n  })\n","import { tool } from 'ai'\nimport {\n  listDiscussionsInputSchema,\n  listDiscussionsDescription,\n  listDiscussionsCore,\n  getDiscussionInputSchema,\n  getDiscussionDescription,\n  getDiscussionCore,\n  addDiscussionCommentInputSchema,\n  addDiscussionCommentDescription,\n  addDiscussionCommentCore,\n} from '../core/discussions'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { ToolOptions, GithubTool } from '../types'\n\nasync function listDiscussionsStep(args: Parameters<typeof listDiscussionsCore>[0]) {\n  \"use step\"\n  return listDiscussionsCore(args)\n}\n\n/** List discussions in a repository, optionally filtered by category. */\nexport const listDiscussions = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listDiscussionsDescription,\n    inputSchema: listDiscussionsInputSchema,\n    execute: async args => listDiscussionsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getDiscussionStep(args: Parameters<typeof getDiscussionCore>[0]) {\n  \"use step\"\n  return getDiscussionCore(args)\n}\n\n/** Get a discussion by number. */\nexport const getDiscussion = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getDiscussionDescription,\n    inputSchema: getDiscussionInputSchema,\n    execute: async args => getDiscussionStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function addDiscussionCommentStep(args: Parameters<typeof addDiscussionCommentCore>[0]) {\n  \"use step\"\n  return addDiscussionCommentCore(args)\n}\n\n/** Add a comment to a discussion. Requires approval by default. */\nexport const addDiscussionComment = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: addDiscussionCommentDescription,\n    needsApproval,\n    inputSchema: addDiscussionCommentInputSchema,\n    execute: async args => addDiscussionCommentStep({ token: await resolveGithubToken(token), ...args }),\n  })\n","import { tool } from 'ai'\nimport {\n  listNotificationsInputSchema,\n  listNotificationsDescription,\n  listNotificationsCore,\n  markNotificationReadInputSchema,\n  markNotificationReadDescription,\n  markNotificationReadCore,\n} from '../core/notifications'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { ToolOptions, GithubTool } from '../types'\n\nasync function listNotificationsStep(args: Parameters<typeof listNotificationsCore>[0]) {\n  \"use step\"\n  return listNotificationsCore(args)\n}\n\n/** List notification threads for the authenticated user. */\nexport const listNotifications = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listNotificationsDescription,\n    inputSchema: listNotificationsInputSchema,\n    execute: async args => listNotificationsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function markNotificationReadStep(args: Parameters<typeof markNotificationReadCore>[0]) {\n  \"use step\"\n  return markNotificationReadCore(args)\n}\n\n/** Mark a notification thread as read. Requires approval by default. */\nexport const markNotificationRead = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: markNotificationReadDescription,\n    needsApproval,\n    inputSchema: markNotificationReadInputSchema,\n    execute: async args => markNotificationReadStep({ token: await resolveGithubToken(token), ...args }),\n  })\n","import { tool } from 'ai'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { GithubTool } from '../types'\nimport {\n  searchCodeInputSchema,\n  searchCodeDescription,\n  searchCodeCore,\n  searchRepositoriesInputSchema,\n  searchRepositoriesDescription,\n  searchRepositoriesCore,\n  searchIssuesInputSchema,\n  searchIssuesDescription,\n  searchIssuesCore,\n} from '../core/search'\n\nasync function searchCodeStep(args: Parameters<typeof searchCodeCore>[0]) {\n  \"use step\"\n  return searchCodeCore(args)\n}\n\n/** Search for code in GitHub repositories. Use qualifiers like \"repo:owner/name\" to scope the search. Results include matching text snippets when GitHub returns them. */\nexport const searchCode = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: searchCodeDescription,\n    inputSchema: searchCodeInputSchema,\n    execute: async args => searchCodeStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function searchRepositoriesStep(args: Parameters<typeof searchRepositoriesCore>[0]) {\n  \"use step\"\n  return searchRepositoriesCore(args)\n}\n\n/** Search for GitHub repositories by keyword, topic, language, or other qualifiers. */\nexport const searchRepositories = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: searchRepositoriesDescription,\n    inputSchema: searchRepositoriesInputSchema,\n    execute: async args => searchRepositoriesStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function searchIssuesStep(args: Parameters<typeof searchIssuesCore>[0]) {\n  \"use step\"\n  return searchIssuesCore(args)\n}\n\n/** Search for issues and pull requests across GitHub using search qualifiers like \"repo:owner/name is:open\". */\nexport const searchIssues = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: searchIssuesDescription,\n    inputSchema: searchIssuesInputSchema,\n    execute: async args => searchIssuesStep({ token: await resolveGithubToken(token), ...args }),\n  })\n","import { tool } from 'ai'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { GithubTool } from '../types'\nimport {\n  listCommitsInputSchema,\n  listCommitsDescription,\n  listCommitsCore,\n  getCommitInputSchema,\n  getCommitDescription,\n  getCommitCore,\n  getBlameInputSchema,\n  getBlameDescription,\n  getBlameCore,\n  compareCommitsInputSchema,\n  compareCommitsDescription,\n  compareCommitsCore,\n} from '../core/commits'\nimport { getCommitToModelOutput, compareCommitsToModelOutput } from '../core/model-output'\n\nasync function listCommitsStep(args: Parameters<typeof listCommitsCore>[0]) {\n  \"use step\"\n  return listCommitsCore(args)\n}\n\n/** List commits for a GitHub repository. Filter by file path to see commits that touched a file. */\nexport const listCommits = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listCommitsDescription,\n    inputSchema: listCommitsInputSchema,\n    execute: async args => listCommitsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getCommitStep(args: Parameters<typeof getCommitCore>[0]) {\n  \"use step\"\n  return getCommitCore(args)\n}\n\n/** Get detailed information about a specific commit. Patches omitted by default. */\nexport const getCommit = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getCommitDescription,\n    inputSchema: getCommitInputSchema,\n    toModelOutput: getCommitToModelOutput,\n    execute: async args => getCommitStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getBlameStep(args: Parameters<typeof getBlameCore>[0]) {\n  \"use step\"\n  return getBlameCore(args)\n}\n\n/** Line-level git blame for a file at a commit-like ref (branch, tag, or SHA). */\nexport const getBlame = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getBlameDescription,\n    inputSchema: getBlameInputSchema,\n    execute: async args => getBlameStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function compareCommitsStep(args: Parameters<typeof compareCommitsCore>[0]) {\n  \"use step\"\n  return compareCommitsCore(args)\n}\n\n/** Compare two branches, tags, or commits. Patches omitted by default. */\nexport const compareCommits = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: compareCommitsDescription,\n    inputSchema: compareCommitsInputSchema,\n    toModelOutput: compareCommitsToModelOutput,\n    execute: async args => compareCommitsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n","import { tool } from 'ai'\nimport {\n  listGistsInputSchema,\n  listGistsDescription,\n  listGistsCore,\n  getGistInputSchema,\n  getGistDescription,\n  getGistCore,\n  listGistCommentsInputSchema,\n  listGistCommentsDescription,\n  listGistCommentsCore,\n  createGistInputSchema,\n  createGistDescription,\n  createGistCore,\n  updateGistInputSchema,\n  updateGistDescription,\n  updateGistCore,\n  deleteGistInputSchema,\n  deleteGistDescription,\n  deleteGistCore,\n  createGistCommentInputSchema,\n  createGistCommentDescription,\n  createGistCommentCore,\n} from '../core/gists'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { ToolOptions, GithubTool } from '../types'\n\nasync function listGistsStep(args: Parameters<typeof listGistsCore>[0]) {\n  \"use step\"\n  return listGistsCore(args)\n}\n\n/** List gists for the authenticated user or a specific user. */\nexport const listGists = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listGistsDescription,\n    inputSchema: listGistsInputSchema,\n    execute: async args => listGistsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getGistStep(args: Parameters<typeof getGistCore>[0]) {\n  \"use step\"\n  return getGistCore(args)\n}\n\n/** Get a gist by ID, including file contents. */\nexport const getGist = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getGistDescription,\n    inputSchema: getGistInputSchema,\n    execute: async args => getGistStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function listGistCommentsStep(args: Parameters<typeof listGistCommentsCore>[0]) {\n  \"use step\"\n  return listGistCommentsCore(args)\n}\n\n/** List comments on a gist. */\nexport const listGistComments = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listGistCommentsDescription,\n    inputSchema: listGistCommentsInputSchema,\n    execute: async args => listGistCommentsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function createGistStep(args: Parameters<typeof createGistCore>[0]) {\n  \"use step\"\n  return createGistCore(args)\n}\n\n/** Create a new gist with one or more files. Requires approval by default. */\nexport const createGist = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: createGistDescription,\n    needsApproval,\n    inputSchema: createGistInputSchema,\n    execute: async args => createGistStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function updateGistStep(args: Parameters<typeof updateGistCore>[0]) {\n  \"use step\"\n  return updateGistCore(args)\n}\n\n/** Update an existing gist. Requires approval by default. */\nexport const updateGist = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: updateGistDescription,\n    needsApproval,\n    inputSchema: updateGistInputSchema,\n    execute: async args => updateGistStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function deleteGistStep(args: Parameters<typeof deleteGistCore>[0]) {\n  \"use step\"\n  return deleteGistCore(args)\n}\n\n/** Delete a gist permanently. Requires approval by default. */\nexport const deleteGist = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: deleteGistDescription,\n    needsApproval,\n    inputSchema: deleteGistInputSchema,\n    execute: async args => deleteGistStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function createGistCommentStep(args: Parameters<typeof createGistCommentCore>[0]) {\n  \"use step\"\n  return createGistCommentCore(args)\n}\n\n/** Add a comment to a gist. Requires approval by default. */\nexport const createGistComment = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: createGistCommentDescription,\n    needsApproval,\n    inputSchema: createGistCommentInputSchema,\n    execute: async args => createGistCommentStep({ token: await resolveGithubToken(token), ...args }),\n  })\n","import { tool } from 'ai'\nimport {\n  listWorkflowsInputSchema,\n  listWorkflowsDescription,\n  listWorkflowsCore,\n  listWorkflowRunsInputSchema,\n  listWorkflowRunsDescription,\n  listWorkflowRunsCore,\n  getWorkflowRunInputSchema,\n  getWorkflowRunDescription,\n  getWorkflowRunCore,\n  listWorkflowJobsInputSchema,\n  listWorkflowJobsDescription,\n  listWorkflowJobsCore,\n  getWorkflowJobLogsInputSchema,\n  getWorkflowJobLogsDescription,\n  getWorkflowJobLogsCore,\n  triggerWorkflowInputSchema,\n  triggerWorkflowDescription,\n  triggerWorkflowCore,\n  cancelWorkflowRunInputSchema,\n  cancelWorkflowRunDescription,\n  cancelWorkflowRunCore,\n  rerunWorkflowRunInputSchema,\n  rerunWorkflowRunDescription,\n  rerunWorkflowRunCore,\n} from '../core/workflows'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { ToolOptions, GithubTool } from '../types'\n\nasync function listWorkflowsStep(args: Parameters<typeof listWorkflowsCore>[0]) {\n  \"use step\"\n  return listWorkflowsCore(args)\n}\n\n/** List GitHub Actions workflows in a repository. */\nexport const listWorkflows = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listWorkflowsDescription,\n    inputSchema: listWorkflowsInputSchema,\n    execute: async args => listWorkflowsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function listWorkflowRunsStep(args: Parameters<typeof listWorkflowRunsCore>[0]) {\n  \"use step\"\n  return listWorkflowRunsCore(args)\n}\n\n/** List workflow runs for a repository, optionally filtered by workflow, branch, status, or event. */\nexport const listWorkflowRuns = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listWorkflowRunsDescription,\n    inputSchema: listWorkflowRunsInputSchema,\n    execute: async args => listWorkflowRunsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getWorkflowRunStep(args: Parameters<typeof getWorkflowRunCore>[0]) {\n  \"use step\"\n  return getWorkflowRunCore(args)\n}\n\n/** Get details of a specific workflow run including status, timing, and trigger info. */\nexport const getWorkflowRun = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getWorkflowRunDescription,\n    inputSchema: getWorkflowRunInputSchema,\n    execute: async args => getWorkflowRunStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function listWorkflowJobsStep(args: Parameters<typeof listWorkflowJobsCore>[0]) {\n  \"use step\"\n  return listWorkflowJobsCore(args)\n}\n\n/** List jobs for a workflow run, including step-level status and timing. */\nexport const listWorkflowJobs = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listWorkflowJobsDescription,\n    inputSchema: listWorkflowJobsInputSchema,\n    execute: async args => listWorkflowJobsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getWorkflowJobLogsStep(args: Parameters<typeof getWorkflowJobLogsCore>[0]) {\n  \"use step\"\n  return getWorkflowJobLogsCore(args)\n}\n\n/** Get the log output of a workflow job, tail-truncated with timestamps stripped. */\nexport const getWorkflowJobLogs = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getWorkflowJobLogsDescription,\n    inputSchema: getWorkflowJobLogsInputSchema,\n    execute: async args => getWorkflowJobLogsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function triggerWorkflowStep(args: Parameters<typeof triggerWorkflowCore>[0]) {\n  \"use step\"\n  return triggerWorkflowCore(args)\n}\n\n/** Trigger a workflow via workflow_dispatch event. Requires approval by default. */\nexport const triggerWorkflow = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: triggerWorkflowDescription,\n    needsApproval,\n    inputSchema: triggerWorkflowInputSchema,\n    execute: async args => triggerWorkflowStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function cancelWorkflowRunStep(args: Parameters<typeof cancelWorkflowRunCore>[0]) {\n  \"use step\"\n  return cancelWorkflowRunCore(args)\n}\n\n/** Cancel an in-progress workflow run. Requires approval by default. */\nexport const cancelWorkflowRun = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: cancelWorkflowRunDescription,\n    needsApproval,\n    inputSchema: cancelWorkflowRunInputSchema,\n    execute: async args => cancelWorkflowRunStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function rerunWorkflowRunStep(args: Parameters<typeof rerunWorkflowRunCore>[0]) {\n  \"use step\"\n  return rerunWorkflowRunCore(args)\n}\n\n/** Re-run a workflow run, optionally only the failed jobs. Requires approval by default. */\nexport const rerunWorkflowRun = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: rerunWorkflowRunDescription,\n    needsApproval,\n    inputSchema: rerunWorkflowRunInputSchema,\n    execute: async args => rerunWorkflowRunStep({ token: await resolveGithubToken(token), ...args }),\n  })\n","import { tool } from 'ai'\nimport {\n  listCheckRunsInputSchema,\n  listCheckRunsDescription,\n  listCheckRunsCore,\n  getCombinedStatusInputSchema,\n  getCombinedStatusDescription,\n  getCombinedStatusCore,\n} from '../core/checks'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { GithubTool } from '../types'\n\nasync function listCheckRunsStep(args: Parameters<typeof listCheckRunsCore>[0]) {\n  \"use step\"\n  return listCheckRunsCore(args)\n}\n\n/** List check runs (Checks API — GitHub Actions and other CI providers) for a commit, branch, or tag. */\nexport const listCheckRuns = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listCheckRunsDescription,\n    inputSchema: listCheckRunsInputSchema,\n    execute: async args => listCheckRunsStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getCombinedStatusStep(args: Parameters<typeof getCombinedStatusCore>[0]) {\n  \"use step\"\n  return getCombinedStatusCore(args)\n}\n\n/** Get the combined commit status (Statuses API — legacy CI integrations) for a commit, branch, or tag. */\nexport const getCombinedStatus = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getCombinedStatusDescription,\n    inputSchema: getCombinedStatusInputSchema,\n    execute: async args => getCombinedStatusStep({ token: await resolveGithubToken(token), ...args }),\n  })\n","import { tool } from 'ai'\nimport {\n  listReleasesInputSchema,\n  listReleasesDescription,\n  listReleasesCore,\n  getLatestReleaseInputSchema,\n  getLatestReleaseDescription,\n  getLatestReleaseCore,\n  getReleaseInputSchema,\n  getReleaseDescription,\n  getReleaseCore,\n  createReleaseInputSchema,\n  createReleaseDescription,\n  createReleaseCore,\n  updateReleaseInputSchema,\n  updateReleaseDescription,\n  updateReleaseCore,\n  deleteReleaseInputSchema,\n  deleteReleaseDescription,\n  deleteReleaseCore,\n} from '../core/releases'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { ToolOptions, GithubTool } from '../types'\n\nasync function listReleasesStep(args: Parameters<typeof listReleasesCore>[0]) {\n  \"use step\"\n  return listReleasesCore(args)\n}\n\n/** List releases for a GitHub repository, newest first (includes drafts and prereleases). */\nexport const listReleases = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: listReleasesDescription,\n    inputSchema: listReleasesInputSchema,\n    execute: async args => listReleasesStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getLatestReleaseStep(args: Parameters<typeof getLatestReleaseCore>[0]) {\n  \"use step\"\n  return getLatestReleaseCore(args)\n}\n\n/** Get the latest published release for a GitHub repository (excludes drafts and prereleases). */\nexport const getLatestRelease = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getLatestReleaseDescription,\n    inputSchema: getLatestReleaseInputSchema,\n    execute: async args => getLatestReleaseStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getReleaseStep(args: Parameters<typeof getReleaseCore>[0]) {\n  \"use step\"\n  return getReleaseCore(args)\n}\n\n/** Get a specific release by ID, including its assets. */\nexport const getRelease = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getReleaseDescription,\n    inputSchema: getReleaseInputSchema,\n    execute: async args => getReleaseStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function createReleaseStep(args: Parameters<typeof createReleaseCore>[0]) {\n  \"use step\"\n  return createReleaseCore(args)\n}\n\n/** Create a new release (and its tag if needed) in a GitHub repository. Requires approval by default. */\nexport const createRelease = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: createReleaseDescription,\n    needsApproval,\n    inputSchema: createReleaseInputSchema,\n    execute: async args => createReleaseStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function updateReleaseStep(args: Parameters<typeof updateReleaseCore>[0]) {\n  \"use step\"\n  return updateReleaseCore(args)\n}\n\n/** Update an existing release — tag, target, title, notes, draft, or prerelease status. Requires approval by default. */\nexport const updateRelease = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: updateReleaseDescription,\n    needsApproval,\n    inputSchema: updateReleaseInputSchema,\n    execute: async args => updateReleaseStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function deleteReleaseStep(args: Parameters<typeof deleteReleaseCore>[0]) {\n  \"use step\"\n  return deleteReleaseCore(args)\n}\n\n/** Delete a release permanently. Requires approval by default. */\nexport const deleteRelease = (token: GithubTokenInput, { needsApproval = true }: ToolOptions = {}): GithubTool =>\n  tool({\n    description: deleteReleaseDescription,\n    needsApproval,\n    inputSchema: deleteReleaseInputSchema,\n    execute: async args => deleteReleaseStep({ token: await resolveGithubToken(token), ...args }),\n  })\n","import { tool } from 'ai'\nimport {\n  getPullRequestContextInputSchema,\n  getPullRequestContextDescription,\n  getPullRequestContextCore,\n  getIssueContextInputSchema,\n  getIssueContextDescription,\n  getIssueContextCore,\n  getReleaseContextInputSchema,\n  getReleaseContextDescription,\n  getReleaseContextCore,\n  getCiFailureContextInputSchema,\n  getCiFailureContextDescription,\n  getCiFailureContextCore,\n} from '../core/bundles'\nimport { getPullRequestContextToModelOutput } from '../core/model-output'\nimport { resolveGithubToken, type GithubTokenInput } from '../core/token'\nimport type { GithubTool } from '../types'\n\nasync function getPullRequestContextStep(args: Parameters<typeof getPullRequestContextCore>[0]) {\n  \"use step\"\n  return getPullRequestContextCore(args)\n}\n\n/** Fetch pull request details plus files, reviews, and optional CI checks in one call. */\nexport const getPullRequestContext = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getPullRequestContextDescription,\n    inputSchema: getPullRequestContextInputSchema,\n    toModelOutput: getPullRequestContextToModelOutput,\n    execute: async args => getPullRequestContextStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getIssueContextStep(args: Parameters<typeof getIssueContextCore>[0]) {\n  \"use step\"\n  return getIssueContextCore(args)\n}\n\n/** Fetch an issue plus available label names and recent comments in one call. */\nexport const getIssueContext = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getIssueContextDescription,\n    inputSchema: getIssueContextInputSchema,\n    execute: async args => getIssueContextStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getReleaseContextStep(args: Parameters<typeof getReleaseContextCore>[0]) {\n  \"use step\"\n  return getReleaseContextCore(args)\n}\n\n/** Fetch a release plus the previous release and tag comparison in one call. */\nexport const getReleaseContext = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getReleaseContextDescription,\n    inputSchema: getReleaseContextInputSchema,\n    execute: async args => getReleaseContextStep({ token: await resolveGithubToken(token), ...args }),\n  })\n\nasync function getCiFailureContextStep(args: Parameters<typeof getCiFailureContextCore>[0]) {\n  \"use step\"\n  return getCiFailureContextCore(args)\n}\n\n/** Diagnose CI failures for a ref — combined status, failing checks, and failed workflow jobs. */\nexport const getCiFailureContext = (token: GithubTokenInput): GithubTool =>\n  tool({\n    description: getCiFailureContextDescription,\n    inputSchema: getCiFailureContextInputSchema,\n    execute: async args => getCiFailureContextStep({ token: await resolveGithubToken(token), ...args }),\n  })\n","import type { GithubWriteToolName } from './write-tools'\n\n/**\n * Whether write operations require user approval.\n *\n * - `true` — all write tools need approval (default)\n * - `false` — no approval needed for any write tool\n * - object — per-tool override via {@link GithubWriteToolName}; unspecified write tools default to `true`\n *\n * @example Global disable\n * ```ts\n * createGithubTools({ token, requireApproval: false })\n * ```\n *\n * @example Granular per write tool\n * ```ts\n * createGithubTools({\n *   token,\n *   requireApproval: {\n *     mergePullRequest: true,\n *     createOrUpdateFile: true,\n *     addPullRequestComment: false,\n *   },\n * })\n * ```\n */\nexport type ApprovalConfig = boolean | Partial<Record<GithubWriteToolName, boolean>>\n\n/**\n * Resolve whether a write tool requires approval for the AI SDK.\n *\n * @param toolName - The write tool to check.\n * @param config - Global or per-tool approval config.\n * @returns `true` when approval is required; defaults to `true` for unspecified write tools in object mode.\n */\nexport function resolveAiSdkApproval(toolName: GithubWriteToolName, config: ApprovalConfig): boolean {\n  if (typeof config === 'boolean') return config\n  return config[toolName] ?? true\n}\n","import { ToolLoopAgent } from 'ai'\nimport type { ToolLoopAgentSettings, ToolSet } from 'ai'\nimport { createGithubTools } from './index'\nimport type { AllGithubTools, GithubToolsBaseOptions } from './core/tool-types'\nimport type { CombinedPresetToolNames, GithubToolPreset, PresetToolName } from './core/presets'\nimport type { GithubToolName } from './core/tool-names'\nimport { formatContextInstructions, type GithubToolsContext } from './core/context'\n\nconst SHARED_RULES = `When a tool execution is denied by the user, do not retry it. Briefly acknowledge the decision and move on.\nCall independent read tools in the same step when you already know the arguments — never serialize reads that could run in parallel.\nBodies default to detail summary; patches default to includePatch false; prefer getFileContent with startLine/endLine or maxLines for large files.\nPaged lists return { items, hasMore, page, nextPage }. When hasMore, call with nextPage or raise maxPages — never the same page. Prefer path/author/since/until on listCommits instead of walking history. Prefer a path prefix on getRepositoryTree over recursive true.`\n\nconst DEFAULT_INSTRUCTIONS = `You are a helpful GitHub assistant. You can read and explore repositories, issues, pull requests, discussions, commits, code, gists, and workflows. You can also create issues, pull requests, comments, gists, reactions, trigger workflows, and update files when asked.\n\nPrefer getPullRequestContext, getIssueContext, getReleaseContext, or getCiFailureContext for multi-part reads instead of chaining separate tools.\n\n${SHARED_RULES}`\n\nconst PRESET_INSTRUCTIONS: Record<GithubToolPreset, string> = {\n  'code-review': `You are a code review assistant. Your job is to review pull requests thoroughly and provide constructive feedback.\n\nWhen reviewing a PR:\n- Start with getPullRequestContext (set includeChecks true when CI matters)\n- Then listPullRequestFiles with includePatch true and filenames for only the files you need — in the same step as any getFileContent / getBlame calls when possible\n- Use getBlame then getCommit(includePatch true) only when line history matters\n- Check for bugs, logic errors, and edge cases; be constructive\n- Use createPullRequestReview for formal reviews when asked\n- Use listPullRequestReviewThreads (unresolved by default) to see open feedback; replyToReviewComment to answer in a thread and resolveReviewThread once it is addressed\n- Use updatePullRequest to change title, body, base branch, or draft status; addPullRequestComment / updatePullRequestComment / deletePullRequestComment to manage comments\n\n${SHARED_RULES}`,\n\n  'issue-triage': `You are an issue triage assistant. Your job is to help manage and organize GitHub issues.\n\nWhen triaging issues:\n- Call getIssueContext exactly once (full body + labelNames + recent comments). In that same step, call listIssues or searchIssues if you need duplicate checks\n- Never re-call getIssueContext for the same issue\n- Use listIssueComments to paginate beyond the comments returned by getIssueContext\n- Pick labels from labelNames; use addLabels / removeLabel to apply them. Use createLabel / updateLabel / deleteLabel when the repository taxonomy itself needs changing\n- Create issues with clear titles and descriptions when asked\n- Use updateIssue to edit title, body, labels, milestone, or assignees, and to reopen a closed issue (state: 'open') — there is no separate reopen tool\n- Use updateIssueComment / deleteIssueComment to correct or remove existing comments\n- Acknowledge a report or a comment with addIssueReaction / addCommentReaction instead of posting a comment that says nothing new\n\n${SHARED_RULES}`,\n\n  'ci-ops': `You are a CI/CD operations assistant. Your job is to help monitor and manage GitHub Actions workflows.\n\nWhen working with workflows:\n- Prefer getCiFailureContext first when diagnosing a failing ref\n- Read the failing job's output with getWorkflowJobLogs (the default 200-line tail is usually enough; raise maxLines only when the error is higher up)\n- Use listCheckRuns / getCombinedStatus for narrower follow-ups\n- Inspect job steps to find the failing step; confirm before cancel/re-run\n- Trigger workflow_dispatch with the correct inputs and branch when asked\n\n${SHARED_RULES}`,\n\n  'security-audit': `You are a security audit assistant. Your job is to review repositories for security risks and report findings clearly — you never make destructive changes.\n\nWhen auditing a repository:\n- Use searchCode for secrets and unsafe patterns; getBlame / listCommits to trace introductions\n- Use searchIssues to check for prior reports of the same vulnerability before filing a duplicate\n- Prefer getCiFailureContext or getPullRequestContext for CI / PR context\n- Use compareCommits to scope changes (includePatch only when you need diffs)\n- Report findings as issues with reproduction, impact, and severity\n- Read-only plus createIssue / addIssueComment / addLabels — never assume you can fix code directly\n\n${SHARED_RULES}`,\n\n  'repo-explorer': `You are a repository explorer. Your job is to help users understand codebases and find information across GitHub repositories.\n\nWhen exploring repos:\n- Answer questions about structure and organization; find files and patterns with searchCode / getFileContent\n- Use searchIssues to find issues or pull requests by qualifier across a repository or organization\n- Use listDiscussions / getDiscussion for questions answered in the repository's discussions rather than its issues\n- Prefer getPullRequestContext or getCiFailureContext when summarizing a PR or failing CI\n- Use getBlame for line ownership; summarize recent commits / PRs / issues when asked\n- Read-only — you cannot make changes\n\n${SHARED_RULES}`,\n\n  'release-manager': `You are a release management assistant. Your job is to help prepare and publish GitHub releases.\n\nWhen preparing a release:\n- Prefer getReleaseContext first (current/latest release, previous release, tag compare)\n- Use compareCommits / listCommits for more changelog detail; getCiFailureContext before cutting\n- createRelease with generateReleaseNotes when there is no manual changelog\n- Double-check the target branch or SHA — releases and tags are hard to undo\n- Use updateRelease to fix notes or toggle draft/prerelease after publishing; deleteRelease only when explicitly asked — it does not delete the underlying tag\n\n${SHARED_RULES}`,\n\n  'discussion-moderator': `You are a discussion moderator. Your job is to answer and guide repository Discussions clearly and on-topic.\n\nWhen working in discussions:\n- Use listDiscussions / getDiscussion to load the thread before replying\n- Prefer addDiscussionComment for answers that belong in Discussions\n- Use searchIssues / getIssueContext when the question overlaps an existing issue; addIssueComment only when the follow-up belongs on that issue\n- Keep replies concise and point to docs or code when helpful\n\n${SHARED_RULES}`,\n\n  'notification-inbox': `You are a notification inbox assistant. Your job is to help triage GitHub notification threads for the authenticated user.\n\nWhen clearing the inbox:\n- Use listNotifications to see unread threads (set all true only when asked)\n- Open the related getIssue or getPullRequest when you need context before acting\n- Use markNotificationRead once a thread is handled or is noise\n- These tools need a user PAT with Notifications access — say so if calls fail for that reason\n\n${SHARED_RULES}`,\n\n  'pr-author': `You are a pull request authoring assistant. Your job is to prepare branches, edit files, and open focused PRs.\n\nWhen opening a PR:\n- Inspect the repo with getRepository / listBranches / getFileContent before editing\n- createBranch from a sensible base, then createOrUpdateFile for the change set\n- createPullRequest with a clear title and body; updatePullRequest if the draft or description needs a fix\n- Use listPullRequestFiles / compareCommits / getCommit to verify what will land\n- Address review feedback: listPullRequestReviewThreads for open threads, replyToReviewComment to answer, resolveReviewThread once fixed\n- Use deleteBranch to clean up a merged or abandoned branch when asked\n- Stay scoped to authoring — you do not review, merge, or manage issues\n\n${SHARED_RULES}`,\n\n  'maintainer': `You are a repository maintainer assistant. You have full access to manage repositories, issues, pull requests, discussions, notifications, gists, and workflows.\n\nWhen maintaining repos:\n- Prefer getPullRequestContext or getCiFailureContext for multi-part reads\n- Be careful with writes — review before acting\n- Keep issues, PRs, and commits clear and well-structured\n- Use listNotifications to find what needs attention, then markNotificationRead once a thread is handled\n- Acknowledge a thread with addIssueReaction / addCommentReaction instead of a comment that adds nothing\n- Answer questions in discussions with addDiscussionComment\n\n${SHARED_RULES}`\n}\n\nexport function resolveInstructions(options: {\n  preset?: GithubToolPreset | GithubToolPreset[]\n  instructions?: string\n  additionalInstructions?: string\n  context?: GithubToolsContext\n}): string {\n  const defaultPrompt = options.preset && !Array.isArray(options.preset)\n    ? PRESET_INSTRUCTIONS[options.preset]\n    : DEFAULT_INSTRUCTIONS\n\n  let prompt: string\n  if (options.instructions) prompt = options.instructions\n  else if (options.additionalInstructions) prompt = `${defaultPrompt}\\n\\n${options.additionalInstructions}`\n  else prompt = defaultPrompt\n\n  const contextBlock = options.context ? formatContextInstructions(options.context) : ''\n  if (contextBlock) return `${prompt}\\n\\n${contextBlock}`\n  return prompt\n}\n\ntype AgentOptions = Omit<ToolLoopAgentSettings<ToolSet>, 'model' | 'tools' | 'instructions'>\n\nexport type CreateGithubAgentOptions = AgentOptions & GithubToolsBaseOptions & {\n  model: ToolLoopAgentSettings<ToolSet>['model']\n  /**\n   * Restrict tools and system prompt to a predefined preset.\n   *\n   * Selects a subset of tools and, when a single preset is passed,\n   * sets a matching system prompt. Combine presets with an array to merge tool sets.\n   *\n   * @see {@link GithubToolPreset} for available presets and included tools.\n   */\n  preset?: GithubToolPreset | GithubToolPreset[]\n  /**\n   * Fully replace the default system prompt.\n   * When set, `preset` system prompts and `additionalInstructions` are ignored.\n   * `context` is still appended when provided.\n   */\n  instructions?: string\n  /**\n   * Append text to the preset-specific (or default) system prompt.\n   * Ignored when `instructions` is set.\n   */\n  additionalInstructions?: string\n}\n\nexport function createGithubAgent(options: CreateGithubAgentOptions & { preset?: undefined }): ToolLoopAgent<never, AllGithubTools>\nexport function createGithubAgent<P extends GithubToolPreset>(\n  options: CreateGithubAgentOptions & { preset: P },\n): ToolLoopAgent<never, Pick<AllGithubTools, PresetToolName<P>>>\nexport function createGithubAgent<P extends readonly GithubToolPreset[]>(\n  options: CreateGithubAgentOptions & { preset: P },\n): ToolLoopAgent<never, Pick<AllGithubTools, CombinedPresetToolNames<P>>>\n\n/**\n * Create a pre-configured GitHub agent powered by the AI SDK's `ToolLoopAgent`.\n *\n * Returns a `ToolLoopAgent` instance with `.generate()` and `.stream()` methods.\n *\n * @example\n * ```ts\n * import { createGithubAgent } from '@github-tools/sdk'\n *\n * const agent = createGithubAgent({\n *   model: 'anthropic/claude-sonnet-4.6',\n *   token: process.env.GITHUB_TOKEN!,\n *   preset: 'code-review',\n *   context: { owner: 'vercel', repo: 'ai', pullNumber: 42 },\n * })\n *\n * const result = await agent.generate({ prompt: 'Review this PR' })\n * ```\n */\nexport function createGithubAgent({\n  token,\n  preset,\n  requireApproval,\n  context,\n  instructions,\n  additionalInstructions,\n  author,\n  committer,\n  coAuthors,\n  ...agentOptions\n}: CreateGithubAgentOptions): ToolLoopAgent<never, AllGithubTools | Pick<AllGithubTools, GithubToolName>> {\n  const tools = createGithubTools({ token, requireApproval, preset, context, author, committer, coAuthors })\n\n  return new ToolLoopAgent({\n    ...agentOptions,\n    tools,\n    instructions: resolveInstructions({ preset, instructions, additionalInstructions, context }),\n  } as ToolLoopAgentSettings<never, typeof tools>) as ToolLoopAgent<never, typeof tools>\n}\n","import type { ToolSet } from 'ai'\nimport { getRepository, listBranches, getFileContent, getRepositoryTree, createBranch, deleteBranch, forkRepository, createRepository, createOrUpdateFile } from './tools/repository'\nimport { listPullRequests, getPullRequest, createPullRequest, mergePullRequest, updatePullRequest, addPullRequestComment, updatePullRequestComment, deletePullRequestComment, listPullRequestFiles, listPullRequestReviews, listPullRequestReviewThreads, createPullRequestReview, replyToReviewComment, resolveReviewThread, requestReviewers } from './tools/pull-requests'\nimport { listIssues, getIssue, listIssueComments, createIssue, addIssueComment, updateIssueComment, deleteIssueComment, closeIssue, updateIssue, listLabels, addLabels, removeLabel, createLabel, updateLabel, deleteLabel, addAssignees, removeAssignees } from './tools/issues'\nimport { listIssueReactions, addIssueReaction, listCommentReactions, addCommentReaction } from './tools/reactions'\nimport { listDiscussions, getDiscussion, addDiscussionComment } from './tools/discussions'\nimport { listNotifications, markNotificationRead } from './tools/notifications'\nimport { searchCode, searchRepositories, searchIssues } from './tools/search'\nimport { listCommits, getCommit, getBlame, compareCommits } from './tools/commits'\nimport { listGists, getGist, listGistComments, createGist, updateGist, deleteGist, createGistComment } from './tools/gists'\nimport { listWorkflows, listWorkflowRuns, getWorkflowRun, listWorkflowJobs, getWorkflowJobLogs, triggerWorkflow, cancelWorkflowRun, rerunWorkflowRun } from './tools/workflows'\nimport { listCheckRuns, getCombinedStatus } from './tools/checks'\nimport { listReleases, getLatestRelease, getRelease, createRelease, updateRelease, deleteRelease } from './tools/releases'\nimport { getPullRequestContext, getIssueContext, getReleaseContext, getCiFailureContext } from './tools/bundles'\nimport { resolveAiSdkApproval } from './core/approval'\nimport { bindToolsContext } from './core/context'\nimport { stripRateLimit } from './core/rate-limit'\nimport { resolvePresetTools, type CombinedPresetToolNames, type GithubToolPreset, type PresetToolName } from './core/presets'\nimport type { GithubTool } from './types'\nimport { type GithubToolName } from './core/tool-names'\nimport { type AllGithubTools, type GithubToolsBaseOptions } from './core/tool-types'\nimport { createGithubTokenResolver } from './core/token'\nimport type { GithubWriteToolName } from './core/write-tools'\n\nexport type { GithubWriteToolName } from './core/write-tools'\nexport type { ApprovalConfig } from './core/approval'\nexport type { GithubToolsContext } from './core/context'\nexport type { GithubToolPreset, PresetToolName, CombinedPresetToolNames } from './core/presets'\nexport type { GithubToolName } from './core/tool-names'\nexport type { AllGithubTools, GithubToolsForPreset, PickGithubTools } from './core/tool-types'\nexport { PRESET_TOOLS } from './core/presets'\nexport { GITHUB_TOOL_NAMES } from './core/tool-names'\nexport { GITHUB_WRITE_TOOLS } from './core/write-tools'\n\nexport type GithubToolsOptions = GithubToolsBaseOptions & {\n  /**\n   * Restrict the returned tools to a predefined preset.\n   * Prefer a focused preset for most agents. Omit or use `maintainer` for the full catalog.\n   *\n   * @see {@link GithubToolPreset} for available presets and included tools.\n   *\n   * @example\n   * ```ts\n   * // Only code-review tools\n   * createGithubTools({ token, preset: 'code-review' })\n   *\n   * // Combine presets\n   * createGithubTools({ token, preset: ['code-review', 'issue-triage'] })\n   *\n   * // Full catalog\n   * createGithubTools({ token, preset: 'maintainer' })\n   * ```\n   */\n  preset?: GithubToolPreset | GithubToolPreset[]\n}\n\nexport function createGithubTools(options?: GithubToolsBaseOptions & { preset?: undefined }): AllGithubTools\nexport function createGithubTools<P extends GithubToolPreset>(\n  options: GithubToolsBaseOptions & { preset: P },\n): Pick<AllGithubTools, PresetToolName<P>>\nexport function createGithubTools<P extends readonly GithubToolPreset[]>(\n  options: GithubToolsBaseOptions & { preset: P },\n): Pick<AllGithubTools, CombinedPresetToolNames<P>>\nexport function createGithubTools(options?: GithubToolsOptions): AllGithubTools | Pick<AllGithubTools, GithubToolName>\n/**\n * Create a set of GitHub tools for the Vercel AI SDK.\n *\n * Write operations require user approval by default.\n * Control this globally or per-tool via `requireApproval`.\n * Prefer `preset` to expose only the tools your agent needs.\n * Pass `context` to default owner/repo/PR/issue/ref on tool inputs.\n *\n * @example\n * ```ts\n * // Code-review agent — only PR & commit tools\n * createGithubTools({ token, preset: 'code-review' })\n *\n * // Scoped to a repo / PR\n * createGithubTools({\n *   token,\n *   preset: 'code-review',\n *   context: { owner: 'vercel', repo: 'ai', pullNumber: 42 },\n * })\n *\n * // Combine presets\n * createGithubTools({ token, preset: ['code-review', 'issue-triage'] })\n *\n * // Full catalog (same as omitting preset)\n * createGithubTools({ token, preset: 'maintainer' })\n *\n * // Granular approval\n * createGithubTools({\n *   token,\n *   preset: 'maintainer',\n *   requireApproval: {\n *     mergePullRequest: true,\n *     createOrUpdateFile: true,\n *     addPullRequestComment: false,\n *   }\n * })\n * ```\n */\nexport function createGithubTools({\n  token,\n  requireApproval = true,\n  preset,\n  context,\n  overrides,\n  author,\n  committer,\n  coAuthors,\n}: GithubToolsOptions = {}): AllGithubTools | Pick<AllGithubTools, GithubToolName> {\n  const resolveToken = createGithubTokenResolver(token)\n  const approval = (name: GithubWriteToolName) => ({ needsApproval: resolveAiSdkApproval(name, requireApproval) })\n  const allowed = preset ? resolvePresetTools(preset) : null\n\n  const allTools = {\n    getRepository: getRepository(resolveToken),\n    listBranches: listBranches(resolveToken),\n    getFileContent: getFileContent(resolveToken),\n    getRepositoryTree: getRepositoryTree(resolveToken),\n    listPullRequests: listPullRequests(resolveToken),\n    getPullRequest: getPullRequest(resolveToken),\n    listIssues: listIssues(resolveToken),\n    getIssue: getIssue(resolveToken),\n    searchCode: searchCode(resolveToken),\n    searchRepositories: searchRepositories(resolveToken),\n    searchIssues: searchIssues(resolveToken),\n    listCommits: listCommits(resolveToken),\n    getCommit: getCommit(resolveToken),\n    getBlame: getBlame(resolveToken),\n    compareCommits: compareCommits(resolveToken),\n    createBranch: createBranch(resolveToken, approval('createBranch')),\n    deleteBranch: deleteBranch(resolveToken, approval('deleteBranch')),\n    forkRepository: forkRepository(resolveToken, approval('forkRepository')),\n    createRepository: createRepository(resolveToken, approval('createRepository')),\n    createOrUpdateFile: createOrUpdateFile(resolveToken, { ...approval('createOrUpdateFile'), author, committer, coAuthors }),\n    createPullRequest: createPullRequest(resolveToken, approval('createPullRequest')),\n    mergePullRequest: mergePullRequest(resolveToken, { ...approval('mergePullRequest'), coAuthors }),\n    updatePullRequest: updatePullRequest(resolveToken, approval('updatePullRequest')),\n    addPullRequestComment: addPullRequestComment(resolveToken, approval('addPullRequestComment')),\n    updatePullRequestComment: updatePullRequestComment(resolveToken, approval('updatePullRequestComment')),\n    deletePullRequestComment: deletePullRequestComment(resolveToken, approval('deletePullRequestComment')),\n    listPullRequestFiles: listPullRequestFiles(resolveToken),\n    listPullRequestReviews: listPullRequestReviews(resolveToken),\n    listPullRequestReviewThreads: listPullRequestReviewThreads(resolveToken),\n    createPullRequestReview: createPullRequestReview(resolveToken, approval('createPullRequestReview')),\n    replyToReviewComment: replyToReviewComment(resolveToken, approval('replyToReviewComment')),\n    resolveReviewThread: resolveReviewThread(resolveToken, approval('resolveReviewThread')),\n    requestReviewers: requestReviewers(resolveToken, approval('requestReviewers')),\n    getPullRequestContext: getPullRequestContext(resolveToken),\n    getIssueContext: getIssueContext(resolveToken),\n    listIssueComments: listIssueComments(resolveToken),\n    createIssue: createIssue(resolveToken, approval('createIssue')),\n    addIssueComment: addIssueComment(resolveToken, approval('addIssueComment')),\n    updateIssueComment: updateIssueComment(resolveToken, approval('updateIssueComment')),\n    deleteIssueComment: deleteIssueComment(resolveToken, approval('deleteIssueComment')),\n    closeIssue: closeIssue(resolveToken, approval('closeIssue')),\n    updateIssue: updateIssue(resolveToken, approval('updateIssue')),\n    listLabels: listLabels(resolveToken),\n    addLabels: addLabels(resolveToken, approval('addLabels')),\n    removeLabel: removeLabel(resolveToken, approval('removeLabel')),\n    createLabel: createLabel(resolveToken, approval('createLabel')),\n    updateLabel: updateLabel(resolveToken, approval('updateLabel')),\n    deleteLabel: deleteLabel(resolveToken, approval('deleteLabel')),\n    addAssignees: addAssignees(resolveToken, approval('addAssignees')),\n    removeAssignees: removeAssignees(resolveToken, approval('removeAssignees')),\n    listIssueReactions: listIssueReactions(resolveToken),\n    addIssueReaction: addIssueReaction(resolveToken, approval('addIssueReaction')),\n    listCommentReactions: listCommentReactions(resolveToken),\n    addCommentReaction: addCommentReaction(resolveToken, approval('addCommentReaction')),\n    listDiscussions: listDiscussions(resolveToken),\n    getDiscussion: getDiscussion(resolveToken),\n    addDiscussionComment: addDiscussionComment(resolveToken, approval('addDiscussionComment')),\n    listNotifications: listNotifications(resolveToken),\n    markNotificationRead: markNotificationRead(resolveToken, approval('markNotificationRead')),\n    listGists: listGists(resolveToken),\n    getGist: getGist(resolveToken),\n    listGistComments: listGistComments(resolveToken),\n    createGist: createGist(resolveToken, approval('createGist')),\n    updateGist: updateGist(resolveToken, approval('updateGist')),\n    deleteGist: deleteGist(resolveToken, approval('deleteGist')),\n    createGistComment: createGistComment(resolveToken, approval('createGistComment')),\n    listWorkflows: listWorkflows(resolveToken),\n    listWorkflowRuns: listWorkflowRuns(resolveToken),\n    getWorkflowRun: getWorkflowRun(resolveToken),\n    listWorkflowJobs: listWorkflowJobs(resolveToken),\n    getWorkflowJobLogs: getWorkflowJobLogs(resolveToken),\n    triggerWorkflow: triggerWorkflow(resolveToken, approval('triggerWorkflow')),\n    cancelWorkflowRun: cancelWorkflowRun(resolveToken, approval('cancelWorkflowRun')),\n    rerunWorkflowRun: rerunWorkflowRun(resolveToken, approval('rerunWorkflowRun')),\n    listCheckRuns: listCheckRuns(resolveToken),\n    getCombinedStatus: getCombinedStatus(resolveToken),\n    getCiFailureContext: getCiFailureContext(resolveToken),\n    listReleases: listReleases(resolveToken),\n    getLatestRelease: getLatestRelease(resolveToken),\n    getRelease: getRelease(resolveToken),\n    getReleaseContext: getReleaseContext(resolveToken),\n    createRelease: createRelease(resolveToken, approval('createRelease')),\n    updateRelease: updateRelease(resolveToken, approval('updateRelease')),\n    deleteRelease: deleteRelease(resolveToken, approval('deleteRelease')),\n  } satisfies AllGithubTools\n\n  if (overrides) {\n    for (const [name, toolOverrides] of Object.entries(overrides)) {\n      if (name in allTools && toolOverrides) {\n        const key = name as keyof typeof allTools\n        Object.assign(allTools, { [key]: { ...allTools[key], ...toolOverrides } })\n      }\n    }\n  }\n\n  const scoped = bindToolsContext(\n    Object.fromEntries(\n      Object.entries(allTools).map(([name, tool]) => [name, withStrippedRateLimit(tool)]),\n    ) as typeof allTools,\n    context,\n  )\n\n  if (!allowed) return scoped\n\n  return Object.fromEntries(\n    Object.entries(scoped).filter(([name]) => allowed.has(name as GithubToolName))\n  ) as Pick<typeof scoped, GithubToolName>\n}\n\nfunction withStrippedRateLimit(tool: GithubTool): GithubTool {\n  const inner = tool.toModelOutput\n  return {\n    ...tool,\n    toModelOutput: (options) => {\n      const next = { ...options, output: stripRateLimit(options.output) }\n      if (inner) return inner(next)\n      return { type: 'json' as const, value: next.output }\n    },\n  }\n}\n\nexport type GithubTools = AllGithubTools & ToolSet\n\n// Re-export individual tool factories for cherry-picking\nexport { createOctokit } from './client'\nexport { getRepository, listBranches, getFileContent, getRepositoryTree, createBranch, deleteBranch, forkRepository, createRepository, createOrUpdateFile } from './tools/repository'\nexport { listPullRequests, getPullRequest, createPullRequest, mergePullRequest, updatePullRequest, addPullRequestComment, updatePullRequestComment, deletePullRequestComment, listPullRequestFiles, listPullRequestReviews, listPullRequestReviewThreads, createPullRequestReview, replyToReviewComment, resolveReviewThread, requestReviewers } from './tools/pull-requests'\nexport { listIssues, getIssue, listIssueComments, createIssue, addIssueComment, updateIssueComment, deleteIssueComment, closeIssue, updateIssue, listLabels, addLabels, removeLabel, createLabel, updateLabel, deleteLabel, addAssignees, removeAssignees } from './tools/issues'\nexport { listIssueReactions, addIssueReaction, listCommentReactions, addCommentReaction } from './tools/reactions'\nexport { listDiscussions, getDiscussion, addDiscussionComment } from './tools/discussions'\nexport { listNotifications, markNotificationRead } from './tools/notifications'\nexport { searchCode, searchRepositories, searchIssues } from './tools/search'\nexport { listCommits, getCommit, getBlame, compareCommits } from './tools/commits'\nexport { listGists, getGist, listGistComments, createGist, updateGist, deleteGist, createGistComment } from './tools/gists'\nexport { listWorkflows, listWorkflowRuns, getWorkflowRun, listWorkflowJobs, getWorkflowJobLogs, triggerWorkflow, cancelWorkflowRun, rerunWorkflowRun } from './tools/workflows'\nexport { listCheckRuns, getCombinedStatus } from './tools/checks'\nexport { listReleases, getLatestRelease, getRelease, createRelease, updateRelease, deleteRelease } from './tools/releases'\nexport { getPullRequestContext, getIssueContext, getReleaseContext, getCiFailureContext } from './tools/bundles'\nexport type { GithubRateLimit } from './core/rate-limit'\nexport { githubToolsErrors } from './core/errors'\nexport type { CommitIdentity, CommitToolOptions, GithubTool, Octokit, ToolOptions, ToolOverrides } from './types'\nexport type { GithubTokenInput } from './core/token'\nexport { resolveGithubToken } from './core/token'\nexport { createGithubAgent } from './agents'\nexport type { CreateGithubAgentOptions } from './agents'\n"],"mappings":";;;AAqCA,eAAe,kBAAkB,MAA+C;CAC9E;CACA,OAAO,kBAAkB,IAAI;AAC/B;;AAGA,MAAa,iBAAiB,UAC5B,KAAK;CACH,aAAa;CACb,aAAa;CACb,SAAS,OAAM,SAAQ,kBAAkB;EAAE,OAAO,MAAM,mBAAmB,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