import { Tool } from "ai"; import { z } from "zod"; import { Octokit as Octokit$1 } from "octokit"; //#endregion //#region src/core/detail.d.ts type DetailLevel = 'summary' | 'full'; declare namespace bundles_d_exports { export { getCiFailureContextCore, getCiFailureContextDescription, getCiFailureContextInputSchema, getIssueContextCore, getIssueContextDescription, getIssueContextInputSchema, getPullRequestContextCore, getPullRequestContextDescription, getPullRequestContextInputSchema, getReleaseContextCore, getReleaseContextDescription, getReleaseContextInputSchema }; } declare const getPullRequestContextInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; includeFiles: z.ZodDefault>; includeReviews: z.ZodDefault>; includeChecks: z.ZodDefault>; includePatch: z.ZodDefault>; filesPerPage: z.ZodDefault>; detail: z.ZodDefault>>; }, z.core.$strip>; declare const getPullRequestContextDescription = "Fetch pull request details plus files, reviews, and optional CI checks in one call — prefer this over separate getPullRequest / listPullRequestFiles / listPullRequestReviews calls. filesHasMore / reviewsHasMore mean more pages exist on those lists."; declare function getPullRequestContextCore({ token, owner, repo, pullNumber, includeFiles, includeReviews, includeChecks, includePatch, filesPerPage, detail }: { token: string; owner: string; repo: string; pullNumber: number; includeFiles: boolean; includeReviews: boolean; includeChecks: boolean; includePatch: boolean; filesPerPage: number; detail?: DetailLevel; }): Promise<{ checks?: { checkRuns: { hasMore: boolean; page: number; perPage: number; nextPage?: number; totalCount: number; checkRuns: { id: number; name: string; status: "completed" | "in_progress" | "queued" | "requested" | "waiting" | "pending"; conclusion: "success" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "timed_out" | null; url: string | null; startedAt: string | null; completedAt: string | null; }[]; }; combinedStatus: { state: string; totalCount: number; statuses: { context: string; state: string; description: string | null; url: string | null; }[]; }; } | undefined; reviews?: { id: number; state: string; body: string; author: string | undefined; url: string; submittedAt: string | undefined; }[] | undefined; reviewsHasMore?: boolean | undefined; files?: { patch?: string | undefined; filename: string; status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged"; additions: number; deletions: number; changes: number; }[] | undefined; filesHasMore?: boolean | undefined; pullRequest: { number: number; title: string; body: string | null | undefined; state: "open" | "closed"; url: string; author: string; branch: string; headSha: string; base: string; draft: boolean | undefined; merged: boolean; mergeable: boolean | null; additions: number; deletions: number; changedFiles: number; createdAt: string; updatedAt: string; mergedAt: string | null; }; }>; declare const getIssueContextInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; includeLabels: z.ZodDefault>; includeComments: z.ZodDefault>; maxComments: z.ZodDefault>; detail: z.ZodDefault>>; }, z.core.$strip>; declare const getIssueContextDescription = "Fetch an issue plus available label names and recent comments in one call — prefer this over separate getIssue / listLabels / comment calls when triaging. Call once; do not re-fetch the same issue. commentsHasMore means more comments exist — use listIssueComments with nextPage."; declare function getIssueContextCore({ token, owner, repo, issueNumber, includeLabels, includeComments, maxComments, detail }: { token: string; owner: string; repo: string; issueNumber: number; includeLabels: boolean; includeComments: boolean; maxComments: number; detail?: DetailLevel; }): Promise<{ comments?: { id: number; url: string; body: string | null | undefined; author: string | undefined; createdAt: string; updatedAt: string; }[] | undefined; commentsHasMore?: boolean | undefined; labelNames?: string[] | undefined; issue: { number: number; title: string; body: string | null | undefined; state: string; url: string; author: string | undefined; assignees: string[] | undefined; labels: (string | undefined)[]; comments: number; createdAt: string; updatedAt: string; closedAt: string | null; }; }>; declare const getReleaseContextInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; releaseId: z.ZodOptional; includePrevious: z.ZodDefault>; includeCompare: z.ZodDefault>; detail: z.ZodDefault>>; }, z.core.$strip>; declare const getReleaseContextDescription = "Fetch a release (latest or by ID) plus the previous release and tag comparison in one call — prefer this when preparing or reviewing a release"; declare function getReleaseContextCore({ token, owner, repo, releaseId, includePrevious, includeCompare, detail }: { token: string; owner: string; repo: string; releaseId?: number; includePrevious: boolean; includeCompare: boolean; detail?: DetailLevel; }): Promise<{ comparison?: { status: "diverged" | "ahead" | "behind" | "identical"; aheadBy: number; behindBy: number; totalCommits: number; url: string; commits: { sha: string; message: string; author: string | undefined; authorLogin: string | undefined; }[]; files: { patch?: string | undefined; filename: string; status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged"; additions: number; deletions: number; }[] | undefined; } | undefined; previousRelease?: { id: number; tagName: string; name: string | null; body: string | null | undefined; draft: boolean; prerelease: boolean; url: string; author: string; createdAt: string; publishedAt: string | null; } | undefined; release: { id: number; tagName: string; name: string | null; body: string | null | undefined; url: string; author: string; createdAt: string; publishedAt: string | null; assets: { name: string; downloadUrl: string; size: number; downloadCount: number; }[]; }; }>; declare const getCiFailureContextInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; ref: z.ZodString; maxFailedRuns: z.ZodDefault>; maxFailedJobs: z.ZodDefault>; }, z.core.$strip>; declare const getCiFailureContextDescription = "Diagnose CI failures for a ref in one call — combined status, failing check runs, recent failed workflow runs, and failed jobs/steps from the latest failure"; declare function getCiFailureContextCore({ token, owner, repo, ref, maxFailedRuns, maxFailedJobs }: { token: string; owner: string; repo: string; ref: string; maxFailedRuns: number; maxFailedJobs: number; }): Promise<{ latestFailure?: { run: { id: number; name: string | null | undefined; status: string | null; conclusion: string | null; branch: string | null; event: string; url: string; actor: string | undefined; createdAt: string; updatedAt: string; runNumber: number; runAttempt: number | undefined; }; jobs: Array<{ id: number; name: string; status: string; conclusion: string | null; url: string | null; startedAt: string; completedAt: string | null; steps?: Array<{ name: string; status: string; conclusion: string | null; number: number; startedAt?: string | null; completedAt?: string | null; }>; }>; } | undefined; ref: string; combinedStatus: { state: string; totalCount: number; statuses: { context: string; state: string; description: string | null; url: string | null; }[]; }; failedCheckRuns: { id: number; name: string; status: "completed" | "in_progress" | "queued" | "requested" | "waiting" | "pending"; conclusion: "success" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "timed_out" | null; url: string | null; startedAt: string | null; completedAt: string | null; }[]; checkRunTotalCount: number; recentFailedRuns: { id: number; name: string | null | undefined; status: string | null; conclusion: string | null; branch: string | null; event: string; url: string; actor: string | undefined; createdAt: string; updatedAt: string; runNumber: number; runAttempt: number | undefined; }[]; }>; declare namespace checks_d_exports { export { getCombinedStatusCore, getCombinedStatusDescription, getCombinedStatusInputSchema, listCheckRunsCore, listCheckRunsDescription, listCheckRunsInputSchema }; } declare const listCheckRunsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; ref: z.ZodString; perPage: z.ZodDefault>; page: z.ZodDefault>; maxPages: z.ZodOptional; }, z.core.$strip>; declare const listCheckRunsDescription = "List check runs (Checks API — GitHub Actions and other CI providers) for a commit, branch, or tag. When hasMore, pass nextPage or raise maxPages — do not repeat the same call."; declare function listCheckRunsCore({ token, owner, repo, ref, perPage, page, maxPages }: { token: string; owner: string; repo: string; ref: string; perPage: number; page?: number; maxPages?: number; }): Promise<{ hasMore: boolean; page: number; perPage: number; nextPage?: number; totalCount: number; checkRuns: { id: number; name: string; status: "completed" | "in_progress" | "queued" | "requested" | "waiting" | "pending"; conclusion: "success" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "timed_out" | null; url: string | null; startedAt: string | null; completedAt: string | null; }[]; }>; declare const getCombinedStatusInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; ref: z.ZodString; }, z.core.$strip>; declare const getCombinedStatusDescription = "Get the combined commit status (Statuses API — legacy CI integrations) for a commit, branch, or tag"; declare function getCombinedStatusCore({ token, owner, repo, ref }: { token: string; owner: string; repo: string; ref: string; }): Promise<{ state: string; totalCount: number; statuses: { context: string; state: string; description: string | null; url: string | null; }[]; }>; //#endregion //#region src/core/pagination.d.ts type PagingFields = { hasMore: boolean; page: number; perPage: number; nextPage?: number; }; type PagedList = { items: T[]; } & PagingFields; declare namespace commits_d_exports { export { BLAME_QUERY, compareCommitsCore, compareCommitsDescription, compareCommitsInputSchema, getBlameCore, getBlameDescription, getBlameInputSchema, getCommitCore, getCommitDescription, getCommitInputSchema, listCommitsCore, listCommitsDescription, listCommitsInputSchema }; } declare const BLAME_QUERY = "\n query ($owner: String!, $name: String!, $expression: String!, $path: String!) {\n repository(owner: $owner, name: $name) {\n object(expression: $expression) {\n ... on Commit {\n oid\n blame(path: $path) {\n ranges {\n startingLine\n endingLine\n age\n commit {\n oid\n abbreviatedOid\n messageHeadline\n authoredDate\n url\n author {\n name\n email\n user {\n login\n }\n }\n }\n }\n }\n }\n }\n }\n }\n"; declare const listCommitsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; path: z.ZodOptional; sha: z.ZodOptional; author: z.ZodOptional; since: z.ZodOptional; until: z.ZodOptional; perPage: z.ZodDefault>; page: z.ZodDefault>; maxPages: z.ZodOptional; }, z.core.$strip>; declare const listCommitsDescription = "List commits for a GitHub repository. Filter with path, author, since, or until instead of paging the full history. When hasMore, pass nextPage or raise maxPages — do not repeat the same call. For line-by-line attribution, use getBlame."; declare function listCommitsCore({ token, owner, repo, path, sha, author, since, until, perPage, page, maxPages }: { token: string; owner: string; repo: string; path?: string; sha?: string; author?: string; since?: string; until?: string; perPage: number; page?: number; maxPages?: number; }): Promise>; declare const getCommitInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; ref: z.ZodString; includePatch: z.ZodDefault>; }, z.core.$strip>; declare const getCommitDescription = "Get detailed information about a specific commit, including the list of files changed with additions and deletions. Patches are omitted by default — set includePatch true to include diffs"; declare function getCommitCore({ token, owner, repo, ref, includePatch }: { token: string; owner: string; repo: string; ref: string; includePatch: boolean; }): Promise<{ sha: string; message: string; author: string | undefined; authorLogin: string | undefined; date: string | undefined; url: string; stats: { additions: number | undefined; deletions: number | undefined; total: number | undefined; } | null; files: { patch?: string | undefined; filename: string; status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged"; additions: number; deletions: number; }[] | undefined; }>; declare const getBlameInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; path: z.ZodString; ref: z.ZodOptional; line: z.ZodOptional; lineStart: z.ZodOptional; lineEnd: z.ZodOptional; }, z.core.$strip>; declare const getBlameDescription = "Line-level git blame for a file at a commit-like ref (branch, tag, or SHA). Returns contiguous ranges mapping lines to the commits that last modified them — use this to see who introduced a line and when (GitHub GraphQL API)."; declare function getBlameCore({ token, owner, repo, path, ref, line, lineStart, lineEnd }: { token: string; owner: string; repo: string; path: string; ref?: string; line?: number; lineStart?: number; lineEnd?: number; }): Promise<{ error: string; ref?: undefined; tipSha?: undefined; path?: undefined; rangeCount?: undefined; ranges?: undefined; } | { ref: string; tipSha: string; path: string; rangeCount: number; ranges: { startingLine: number; endingLine: number; age: number; commit: { sha: string; abbreviatedSha: string; messageHeadline: string; authoredDate: string; url: string; authorName: string | null; authorEmail: string | null; authorLogin: string | null; }; }[]; error?: undefined; }>; declare const compareCommitsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; base: z.ZodString; head: z.ZodString; includePatch: z.ZodDefault>; }, z.core.$strip>; declare const compareCommitsDescription = "Compare two branches, tags, or commits — shows ahead/behind counts, the commits in between, and the files that differ. Patches are omitted by default — set includePatch true to include diffs"; declare function compareCommitsCore({ token, owner, repo, base, head, includePatch }: { token: string; owner: string; repo: string; base: string; head: string; includePatch: boolean; }): Promise<{ status: "diverged" | "ahead" | "behind" | "identical"; aheadBy: number; behindBy: number; totalCommits: number; url: string; commits: { sha: string; message: string; author: string | undefined; authorLogin: string | undefined; }[]; files: { patch?: string | undefined; filename: string; status: "added" | "removed" | "modified" | "renamed" | "copied" | "changed" | "unchanged"; additions: number; deletions: number; }[] | undefined; }>; declare namespace discussions_d_exports { export { ADD_DISCUSSION_COMMENT_MUTATION, DISCUSSION_CATEGORIES_QUERY, DISCUSSION_ID_QUERY, GET_DISCUSSION_QUERY, LIST_DISCUSSIONS_QUERY, addDiscussionCommentCore, addDiscussionCommentDescription, addDiscussionCommentInputSchema, getDiscussionCore, getDiscussionDescription, getDiscussionInputSchema, listDiscussionsCore, listDiscussionsDescription, listDiscussionsInputSchema }; } declare const DISCUSSION_CATEGORIES_QUERY = "\n query ($owner: String!, $name: String!) {\n repository(owner: $owner, name: $name) {\n discussionCategories(first: 100) {\n nodes {\n id\n name\n }\n }\n }\n }\n"; declare const LIST_DISCUSSIONS_QUERY = "\n query ($owner: String!, $name: String!, $first: Int!, $after: String, $categoryId: ID) {\n repository(owner: $owner, name: $name) {\n discussions(first: $first, after: $after, categoryId: $categoryId, orderBy: { field: UPDATED_AT, direction: DESC }) {\n pageInfo {\n hasNextPage\n endCursor\n }\n nodes {\n id\n number\n title\n url\n createdAt\n updatedAt\n isAnswered\n author {\n login\n }\n category {\n name\n }\n }\n }\n }\n }\n"; declare const GET_DISCUSSION_QUERY = "\n query ($owner: String!, $name: String!, $number: Int!) {\n repository(owner: $owner, name: $name) {\n discussion(number: $number) {\n id\n number\n title\n body\n url\n createdAt\n updatedAt\n isAnswered\n author {\n login\n }\n category {\n name\n }\n comments {\n totalCount\n }\n }\n }\n }\n"; declare const DISCUSSION_ID_QUERY = "\n query ($owner: String!, $name: String!, $number: Int!) {\n repository(owner: $owner, name: $name) {\n discussion(number: $number) {\n id\n }\n }\n }\n"; declare const ADD_DISCUSSION_COMMENT_MUTATION = "\n mutation ($discussionId: ID!, $body: String!) {\n addDiscussionComment(input: { discussionId: $discussionId, body: $body }) {\n comment {\n id\n url\n body\n createdAt\n author {\n login\n }\n }\n }\n }\n"; declare const listDiscussionsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; category: z.ZodOptional; perPage: z.ZodDefault>; after: z.ZodOptional; }, z.core.$strip>; declare const listDiscussionsDescription = "List discussions in a GitHub repository, most recently updated first, optionally filtered by category (GitHub GraphQL API)"; declare function listDiscussionsCore({ token, owner, repo, category, perPage, after }: { token: string; owner: string; repo: string; category?: string; perPage: number; after?: string; }): Promise<{ error: string; hasNextPage?: undefined; endCursor?: undefined; discussions?: undefined; } | { hasNextPage: boolean; endCursor: string | null; discussions: { id: string; number: number; title: string; url: string; author: string | null; category: string | null; answerChosen: boolean | null; createdAt: string; updatedAt: string; }[]; error?: undefined; }>; declare const getDiscussionInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; discussionNumber: z.ZodNumber; detail: z.ZodDefault>>; }, z.core.$strip>; declare const getDiscussionDescription = "Get a GitHub discussion by number. Body is truncated by default (detail: summary) — set detail full for the complete text (GitHub GraphQL API)"; declare function getDiscussionCore({ token, owner, repo, discussionNumber, detail }: { token: string; owner: string; repo: string; discussionNumber: number; detail?: DetailLevel; }): Promise<{ error: string; id?: undefined; number?: undefined; title?: undefined; body?: undefined; url?: undefined; author?: undefined; category?: undefined; answerChosen?: undefined; commentsCount?: undefined; createdAt?: undefined; updatedAt?: undefined; } | { id: string; number: number; title: string; body: string | null | undefined; url: string; author: string | null; category: string | null; answerChosen: boolean | null; commentsCount: number; createdAt: string; updatedAt: string; error?: undefined; }>; declare const addDiscussionCommentInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; discussionNumber: z.ZodNumber; body: z.ZodString; }, z.core.$strip>; declare const addDiscussionCommentDescription = "Add a comment to a GitHub discussion (GitHub GraphQL API)"; /** Not idempotent — each call adds another comment. */ declare function addDiscussionCommentCore({ token, owner, repo, discussionNumber, body }: { token: string; owner: string; repo: string; discussionNumber: number; body: string; }): Promise<{ error: string; id?: undefined; url?: undefined; body?: undefined; author?: undefined; createdAt?: undefined; } | { id: string; url: string; body: string; author: string | null; createdAt: string; error?: undefined; }>; declare namespace gists_d_exports { export { createGistCommentCore, createGistCommentDescription, createGistCommentInputSchema, createGistCore, createGistDescription, createGistInputSchema, deleteGistCore, deleteGistDescription, deleteGistInputSchema, getGistCore, getGistDescription, getGistInputSchema, listGistCommentsCore, listGistCommentsDescription, listGistCommentsInputSchema, listGistsCore, listGistsDescription, listGistsInputSchema, updateGistCore, updateGistDescription, updateGistInputSchema }; } declare const listGistsInputSchema: z.ZodObject<{ username: z.ZodOptional; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; declare const listGistsDescription = "List gists for the authenticated user or a specific user. When hasMore, pass nextPage — do not repeat the same call."; declare function listGistsCore({ token, username, perPage, page }: { token: string; username?: string; perPage: number; page: number; }): Promise>; declare const getGistInputSchema: z.ZodObject<{ gistId: z.ZodString; }, z.core.$strip>; declare const getGistDescription = "Get a gist by ID, including file contents"; declare function getGistCore({ token, gistId }: { token: string; gistId: string; }): Promise<{ id: string | undefined; description: string | null | undefined; public: boolean | undefined; url: string | undefined; owner: string | undefined; files: { filename: string | undefined; language: string | undefined; size: number | undefined; content: string | undefined; }[]; comments: number | undefined; createdAt: string | undefined; updatedAt: string | undefined; }>; declare const listGistCommentsInputSchema: z.ZodObject<{ gistId: z.ZodString; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; declare const listGistCommentsDescription = "List comments on a gist. When hasMore, pass nextPage — do not repeat the same call."; declare function listGistCommentsCore({ token, gistId, perPage, page }: { token: string; gistId: string; perPage: number; page: number; }): Promise>; declare const createGistInputSchema: z.ZodObject<{ description: z.ZodOptional; files: z.ZodRecord>; isPublic: z.ZodDefault>; }, z.core.$strip>; declare const createGistDescription = "Create a new gist with one or more files"; /** Not idempotent — each call creates a new gist. */ declare function createGistCore({ token, description, files, isPublic }: { token: string; description?: string; files: Record; isPublic: boolean; }): Promise<{ id: string | undefined; description: string | null | undefined; public: boolean | undefined; url: string | undefined; files: string[]; owner: string | undefined; }>; declare const updateGistInputSchema: z.ZodObject<{ gistId: z.ZodString; description: z.ZodOptional; files: z.ZodOptional>>; filesToDelete: z.ZodOptional>; }, z.core.$strip>; declare const updateGistDescription = "Update an existing gist — edit description, update files, or remove files"; /** Not idempotent — each call applies a new revision. */ declare function updateGistCore({ token, gistId, description, files, filesToDelete }: { token: string; gistId: string; description?: string; files?: Record; filesToDelete?: string[]; }): Promise<{ id: string | undefined; description: string | null | undefined; url: string | undefined; files: string[]; }>; declare const deleteGistInputSchema: z.ZodObject<{ gistId: z.ZodString; }, z.core.$strip>; declare const deleteGistDescription = "Delete a gist permanently"; /** Not idempotent — deleting an already-deleted gist returns 404 from GitHub. */ declare function deleteGistCore({ token, gistId }: { token: string; gistId: string; }): Promise<{ deleted: boolean; gistId: string; }>; declare const createGistCommentInputSchema: z.ZodObject<{ gistId: z.ZodString; body: z.ZodString; }, z.core.$strip>; declare const createGistCommentDescription = "Add a comment to a gist"; /** Not idempotent — each call adds another comment. */ declare function createGistCommentCore({ token, gistId, body }: { token: string; gistId: string; body: string; }): Promise<{ id: number; url: string; body: string; author: string | undefined; createdAt: string; }>; declare namespace issues_d_exports { export { addAssigneesCore, addAssigneesDescription, addAssigneesInputSchema, addIssueCommentCore, addIssueCommentDescription, addIssueCommentInputSchema, addLabelsCore, addLabelsDescription, addLabelsInputSchema, closeIssueCore, closeIssueDescription, closeIssueInputSchema, createIssueCore, createIssueDescription, createIssueInputSchema, createLabelCore, createLabelDescription, createLabelInputSchema, deleteIssueCommentCore, deleteIssueCommentDescription, deleteIssueCommentInputSchema, deleteLabelCore, deleteLabelDescription, deleteLabelInputSchema, getIssueCore, getIssueDescription, getIssueInputSchema, listIssueCommentsCore, listIssueCommentsDescription, listIssueCommentsInputSchema, listIssuesCore, listIssuesDescription, listIssuesInputSchema, listLabelsCore, listLabelsDescription, listLabelsInputSchema, removeAssigneesCore, removeAssigneesDescription, removeAssigneesInputSchema, removeLabelCore, removeLabelDescription, removeLabelInputSchema, updateIssueCommentCore, updateIssueCommentDescription, updateIssueCommentInputSchema, updateIssueCore, updateIssueDescription, updateIssueInputSchema, updateLabelCore, updateLabelDescription, updateLabelInputSchema }; } declare const listIssuesInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; state: z.ZodDefault>>; labels: z.ZodOptional; perPage: z.ZodDefault>; page: z.ZodDefault>; maxPages: z.ZodOptional; }, z.core.$strip>; declare const listIssuesDescription = "List issues for a GitHub repository (excludes pull requests). When hasMore, pass nextPage or raise maxPages — do not repeat the same call."; declare function listIssuesCore({ token, owner, repo, state, labels, perPage, page, maxPages }: { token: string; owner: string; repo: string; state: 'open' | 'closed' | 'all'; labels?: string; perPage: number; page?: number; maxPages?: number; }): Promise>; declare const getIssueInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; detail: z.ZodDefault>>; }, z.core.$strip>; declare const getIssueDescription = "Get detailed information about a specific issue. Body is truncated by default (detail: summary) — set detail full for the complete description"; declare function getIssueCore({ token, owner, repo, issueNumber, detail }: { token: string; owner: string; repo: string; issueNumber: number; detail?: DetailLevel; }): Promise<{ number: number; title: string; body: string | null | undefined; state: string; url: string; author: string | undefined; assignees: string[] | undefined; labels: (string | undefined)[]; comments: number; createdAt: string; updatedAt: string; closedAt: string | null; }>; declare const listIssueCommentsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; perPage: z.ZodDefault>; page: z.ZodDefault>; detail: z.ZodDefault>>; }, z.core.$strip>; declare const listIssueCommentsDescription = "List comments on a GitHub issue. Bodies are truncated by default (detail: summary). When hasMore, pass nextPage — do not repeat the same call."; declare function listIssueCommentsCore({ token, owner, repo, issueNumber, perPage, page, detail }: { token: string; owner: string; repo: string; issueNumber: number; perPage: number; page: number; detail?: DetailLevel; }): Promise>; declare const createIssueInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; title: z.ZodString; body: z.ZodOptional; labels: z.ZodOptional>; assignees: z.ZodOptional>; }, z.core.$strip>; declare const createIssueDescription = "Create a new issue in a GitHub repository"; /** Not idempotent — each call creates a new issue. */ declare function createIssueCore({ token, owner, repo, title, body, labels, assignees }: { token: string; owner: string; repo: string; title: string; body?: string; labels?: string[]; assignees?: string[]; }): Promise<{ number: number; title: string; url: string; state: string; labels: (string | undefined)[]; }>; declare const addIssueCommentInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; body: z.ZodString; }, z.core.$strip>; declare const addIssueCommentDescription = "Add a comment to a GitHub issue"; /** Not idempotent — each call adds another comment. */ declare function addIssueCommentCore({ token, owner, repo, issueNumber, body }: { token: string; owner: string; repo: string; issueNumber: number; body: string; }): Promise<{ id: number; url: string; body: string | undefined; author: string | undefined; createdAt: string; }>; declare const closeIssueInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; stateReason: z.ZodDefault>>; }, z.core.$strip>; declare const closeIssueDescription = "Close an open GitHub issue"; /** Idempotent when the issue is already closed. */ declare function closeIssueCore({ token, owner, repo, issueNumber, stateReason }: { token: string; owner: string; repo: string; issueNumber: number; stateReason: 'completed' | 'not_planned'; }): Promise<{ number: number; title: string; state: string; url: string; closedAt: string | null; }>; declare const updateIssueInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; title: z.ZodOptional; body: z.ZodOptional; state: z.ZodOptional>; stateReason: z.ZodOptional>; labels: z.ZodOptional>; milestone: z.ZodOptional>; assignees: z.ZodOptional>; }, z.core.$strip>; declare const updateIssueDescription = "Update a GitHub issue — title, body, labels, milestone, or assignees. Set state open to reopen a closed issue, or closed to close it"; /** Not idempotent — each call applies a new revision. */ declare function updateIssueCore({ token, owner, repo, issueNumber, title, body, state, stateReason, labels, milestone, assignees }: { token: string; owner: string; repo: string; issueNumber: number; title?: string; body?: string; state?: 'open' | 'closed'; stateReason?: 'completed' | 'not_planned' | 'reopened'; labels?: string[]; milestone?: number | null; assignees?: string[]; }): Promise<{ number: number; title: string; state: string; url: string; labels: (string | undefined)[]; assignees: string[] | undefined; milestone: number | null; closedAt: string | null; updatedAt: string; }>; declare const updateIssueCommentInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; commentId: z.ZodNumber; body: z.ZodString; }, z.core.$strip>; declare const updateIssueCommentDescription = "Update the body of a comment on a GitHub issue"; /** Not idempotent — each call applies a new revision. */ declare function updateIssueCommentCore({ token, owner, repo, commentId, body }: { token: string; owner: string; repo: string; commentId: number; body: string; }): Promise<{ id: number; url: string; body: string | undefined; updatedAt: string; }>; declare const deleteIssueCommentInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; commentId: z.ZodNumber; }, z.core.$strip>; declare const deleteIssueCommentDescription = "Delete a comment from a GitHub issue permanently"; /** Not idempotent — deleting an already-deleted comment returns 404 from GitHub. */ declare function deleteIssueCommentCore({ token, owner, repo, commentId }: { token: string; owner: string; repo: string; commentId: number; }): Promise<{ deleted: boolean; commentId: number; }>; declare const listLabelsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; declare const listLabelsDescription = "List labels available in a GitHub repository. When hasMore, pass nextPage — do not repeat the same call."; declare function listLabelsCore({ token, owner, repo, perPage, page }: { token: string; owner: string; repo: string; perPage: number; page: number; }): Promise>; declare const addLabelsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; labels: z.ZodArray; }, z.core.$strip>; declare const addLabelsDescription = "Add labels to an issue or pull request"; /** Not idempotent — re-adding labels is a no-op on GitHub but still mutates. */ declare function addLabelsCore({ token, owner, repo, issueNumber, labels }: { token: string; owner: string; repo: string; issueNumber: number; labels: string[]; }): Promise<{ name: string; color: string; description: string | null; }[]>; declare const removeLabelInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; label: z.ZodString; }, z.core.$strip>; declare const removeLabelDescription = "Remove a label from an issue or pull request"; /** Not idempotent — removing a missing label returns 404 from GitHub. */ declare function removeLabelCore({ token, owner, repo, issueNumber, label }: { token: string; owner: string; repo: string; issueNumber: number; label: string; }): Promise<{ removed: boolean; label: string; issueNumber: number; }>; declare const createLabelInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; name: z.ZodString; color: z.ZodString; description: z.ZodOptional; }, z.core.$strip>; declare const createLabelDescription = "Create a label in a GitHub repository"; /** Not idempotent — creating a label that already exists returns 422 from GitHub. */ declare function createLabelCore({ token, owner, repo, name, color, description }: { token: string; owner: string; repo: string; name: string; color: string; description?: string; }): Promise<{ name: string; color: string; description: string | null; }>; declare const updateLabelInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; name: z.ZodString; newName: z.ZodOptional; color: z.ZodOptional; description: z.ZodOptional>; }, z.core.$strip>; declare const updateLabelDescription = "Update a label in a GitHub repository — name, color, or description"; /** Not idempotent — each call applies a new revision. */ declare function updateLabelCore({ token, owner, repo, name, newName, color, description }: { token: string; owner: string; repo: string; name: string; newName?: string; color?: string; description?: string | null; }): Promise<{ name: string; color: string; description: string | null; }>; declare const deleteLabelInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; name: z.ZodString; }, z.core.$strip>; declare const deleteLabelDescription = "Delete a label from a GitHub repository permanently"; /** Not idempotent — deleting a missing label returns 404 from GitHub. */ declare function deleteLabelCore({ token, owner, repo, name }: { token: string; owner: string; repo: string; name: string; }): Promise<{ deleted: boolean; name: string; }>; declare const addAssigneesInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; assignees: z.ZodArray; }, z.core.$strip>; declare const addAssigneesDescription = "Assign users to an issue or pull request"; /** Not idempotent — re-adding an existing assignee is a no-op on GitHub but still mutates. */ declare function addAssigneesCore({ token, owner, repo, issueNumber, assignees }: { token: string; owner: string; repo: string; issueNumber: number; assignees: string[]; }): Promise<{ number: number; assignees: string[] | undefined; }>; declare const removeAssigneesInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; assignees: z.ZodArray; }, z.core.$strip>; declare const removeAssigneesDescription = "Remove assignees from an issue or pull request"; /** Idempotent — removing an assignee that is not assigned is a no-op on GitHub. */ declare function removeAssigneesCore({ token, owner, repo, issueNumber, assignees }: { token: string; owner: string; repo: string; issueNumber: number; assignees: string[]; }): Promise<{ number: number; assignees: string[] | undefined; }>; declare namespace notifications_d_exports { export { listNotificationsCore, listNotificationsDescription, listNotificationsInputSchema, markNotificationReadCore, markNotificationReadDescription, markNotificationReadInputSchema }; } declare const listNotificationsInputSchema: z.ZodObject<{ all: z.ZodDefault>; participating: z.ZodDefault>; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; declare const listNotificationsDescription = "List notification threads for the authenticated user. Unread only by default — set all true to include read threads. Requires a token with notifications access. When hasMore, pass nextPage — do not repeat the same call."; declare function listNotificationsCore({ token, all, participating, perPage, page }: { token: string; all: boolean; participating: boolean; perPage: number; page: number; }): Promise>; declare const markNotificationReadInputSchema: z.ZodObject<{ threadId: z.ZodString; }, z.core.$strip>; declare const markNotificationReadDescription = "Mark a single notification thread as read"; /** Idempotent — marking an already-read thread is a no-op on GitHub. */ declare function markNotificationReadCore({ token, threadId }: { token: string; threadId: string; }): Promise<{ marked: boolean; threadId: string; }>; //#endregion //#region src/types.d.ts type GithubTool = Tool; type ToolOptions = { needsApproval?: boolean; }; /** * Identity for a commit author or committer on GitHub. * * - **Author** — the person who originally wrote the code patch. * - **Committer** — the person who applied the commit to the repository. */ type CommitIdentity = { name: string; email: string; }; /** * Options for commit-creating tools (`createOrUpdateFile`, `mergePullRequest`). */ type CommitToolOptions = ToolOptions & { /** * The author of the commit — the person who wrote the code patch. * Falls back to the authenticated user when omitted. */ author?: CommitIdentity; /** * The committer of the commit — the person who applied the commit. * Falls back to the authenticated user when omitted. */ committer?: CommitIdentity; /** * Co-authors to attribute on commits. * Added as "Co-authored-by" trailers to commit messages. */ coAuthors?: CommitIdentity[]; }; /** * Per-tool overrides for customizing tool behavior without changing the underlying implementation. * * Overridable properties: `description`, `title`, `needsApproval`, `strict`, `providerOptions`, * `toModelOutput`, and input lifecycle callbacks (`onInputStart`, `onInputDelta`, `onInputAvailable`). * * `execute`, `inputSchema`, and `outputSchema` cannot be overridden. * * @example * ```ts * createGithubTools({ * overrides: { * mergePullRequest: { needsApproval: true, title: 'Merge PR' }, * listIssues: { description: 'List open bugs' }, * }, * }) * ``` */ type ToolOverrides = Partial>; declare namespace pull_requests_d_exports { export { addPullRequestCommentCore, addPullRequestCommentDescription, addPullRequestCommentInputSchema, createPullRequestCore, createPullRequestDescription, createPullRequestInputSchema, createPullRequestReviewCore, createPullRequestReviewDescription, createPullRequestReviewInputSchema, deletePullRequestCommentCore, deletePullRequestCommentDescription, deletePullRequestCommentInputSchema, getPullRequestCore, getPullRequestDescription, getPullRequestInputSchema, listPullRequestFilesCore, listPullRequestFilesDescription, listPullRequestFilesInputSchema, listPullRequestReviewThreadsCore, listPullRequestReviewThreadsDescription, listPullRequestReviewThreadsInputSchema, listPullRequestReviewsCore, listPullRequestReviewsDescription, listPullRequestReviewsInputSchema, listPullRequestsCore, listPullRequestsDescription, listPullRequestsInputSchema, mergePullRequestCore, mergePullRequestDescription, mergePullRequestInputSchema, replyToReviewCommentCore, replyToReviewCommentDescription, replyToReviewCommentInputSchema, requestReviewersCore, requestReviewersDescription, requestReviewersInputSchema, resolveReviewThreadCore, resolveReviewThreadDescription, resolveReviewThreadInputSchema, updatePullRequestCommentCore, updatePullRequestCommentDescription, updatePullRequestCommentInputSchema, updatePullRequestCore, updatePullRequestDescription, updatePullRequestInputSchema }; } declare const listPullRequestsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; state: z.ZodDefault>>; perPage: z.ZodDefault>; page: z.ZodDefault>; maxPages: z.ZodOptional; }, z.core.$strip>; declare const listPullRequestsDescription = "List pull requests for a GitHub repository. When hasMore, pass nextPage or raise maxPages — do not repeat the same call."; declare function listPullRequestsCore({ token, owner, repo, state, perPage, page, maxPages }: { token: string; owner: string; repo: string; state: 'open' | 'closed' | 'all'; perPage: number; page?: number; maxPages?: number; }): Promise>; declare const getPullRequestInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; detail: z.ZodDefault>>; }, z.core.$strip>; declare const getPullRequestDescription = "Get detailed information about a specific pull request. Body is truncated by default (detail: summary) — set detail full for the complete description"; declare function getPullRequestCore({ token, owner, repo, pullNumber, detail }: { token: string; owner: string; repo: string; pullNumber: number; detail?: DetailLevel; }): Promise<{ number: number; title: string; body: string | null | undefined; state: "open" | "closed"; url: string; author: string; branch: string; headSha: string; base: string; draft: boolean | undefined; merged: boolean; mergeable: boolean | null; additions: number; deletions: number; changedFiles: number; createdAt: string; updatedAt: string; mergedAt: string | null; }>; declare const createPullRequestInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; title: z.ZodString; body: z.ZodOptional; head: z.ZodString; base: z.ZodString; draft: z.ZodDefault>; }, z.core.$strip>; declare const createPullRequestDescription = "Create a new pull request in a GitHub repository"; /** Not idempotent — each call creates a new pull request. */ declare function createPullRequestCore({ token, owner, repo, title, body, head, base, draft }: { token: string; owner: string; repo: string; title: string; body?: string; head: string; base: string; draft: boolean; }): Promise<{ number: number; title: string; url: string; state: "open" | "closed"; draft: boolean | undefined; branch: string; base: string; }>; declare const updatePullRequestInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; title: z.ZodOptional; body: z.ZodOptional; state: z.ZodOptional>; base: z.ZodOptional; draft: z.ZodOptional; }, z.core.$strip>; declare const updatePullRequestDescription = "Update a pull request — title, body, state, base branch, or draft status. Draft toggling uses the GitHub GraphQL API since the REST update endpoint does not support it"; /** Not idempotent — each call applies a new revision. */ declare function updatePullRequestCore({ token, owner, repo, pullNumber, title, body, state, base, draft }: { token: string; owner: string; repo: string; pullNumber: number; title?: string; body?: string; state?: 'open' | 'closed'; base?: string; draft?: boolean; }): Promise<{ number: number; title: string; state: "open" | "closed"; draft: boolean | undefined; url: string; base: string; updatedAt: string; }>; declare const mergePullRequestInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; commitTitle: z.ZodOptional; commitMessage: z.ZodOptional; mergeMethod: z.ZodDefault>>; }, z.core.$strip>; declare const mergePullRequestDescription = "Merge a pull request"; /** Not idempotent — merging an already-merged PR returns an error from GitHub. */ declare function mergePullRequestCore({ token, owner, repo, pullNumber, commitTitle, commitMessage, mergeMethod, coAuthors }: { token: string; owner: string; repo: string; pullNumber: number; commitTitle?: string; commitMessage?: string; mergeMethod: 'merge' | 'squash' | 'rebase'; coAuthors?: CommitIdentity[]; }): Promise<{ merged: boolean; message: string; sha: string; }>; declare const addPullRequestCommentInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; body: z.ZodString; }, z.core.$strip>; declare const addPullRequestCommentDescription = "Add a comment to a pull request"; /** Not idempotent — each call adds another comment. */ declare function addPullRequestCommentCore({ token, owner, repo, pullNumber, body }: { token: string; owner: string; repo: string; pullNumber: number; body: string; }): Promise<{ id: number; url: string; body: string | undefined; author: string | undefined; createdAt: string; }>; declare const updatePullRequestCommentInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; commentId: z.ZodNumber; body: z.ZodString; }, z.core.$strip>; declare const updatePullRequestCommentDescription = "Update the body of a comment on a pull request"; /** Not idempotent — each call applies a new revision. */ declare function updatePullRequestCommentCore({ token, owner, repo, commentId, body }: { token: string; owner: string; repo: string; commentId: number; body: string; }): Promise<{ id: number; url: string; body: string | undefined; updatedAt: string; }>; declare const deletePullRequestCommentInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; commentId: z.ZodNumber; }, z.core.$strip>; declare const deletePullRequestCommentDescription = "Delete a comment from a pull request permanently"; /** Not idempotent — deleting an already-deleted comment returns 404 from GitHub. */ declare function deletePullRequestCommentCore({ token, owner, repo, commentId }: { token: string; owner: string; repo: string; commentId: number; }): Promise<{ deleted: boolean; commentId: number; }>; declare const listPullRequestFilesInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; includePatch: z.ZodDefault>; filenames: z.ZodOptional>; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; declare const listPullRequestFilesDescription = "List files changed in a pull request with status and stats. Patches are omitted by default — set includePatch true (optionally with filenames) to fetch diffs. When hasMore, pass nextPage — do not repeat the same call."; declare function listPullRequestFilesCore({ token, owner, repo, pullNumber, includePatch, filenames, perPage, page }: { token: string; owner: string; repo: string; pullNumber: number; includePatch: boolean; filenames?: string[]; perPage: number; page: number; }): Promise>; declare const listPullRequestReviewsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; declare const listPullRequestReviewsDescription = "List reviews on a pull request (approvals, change requests, and comments). When hasMore, pass nextPage — do not repeat the same call."; declare function listPullRequestReviewsCore({ token, owner, repo, pullNumber, perPage, page }: { token: string; owner: string; repo: string; pullNumber: number; perPage: number; page: number; }): Promise>; declare const createPullRequestReviewInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; body: z.ZodOptional; event: z.ZodEnum<{ APPROVE: "APPROVE"; REQUEST_CHANGES: "REQUEST_CHANGES"; COMMENT: "COMMENT"; }>; comments: z.ZodOptional; side: z.ZodOptional>; }, z.core.$strip>>>; }, z.core.$strip>; declare const createPullRequestReviewDescription = "Submit a pull request review — approve, request changes, or comment with optional inline comments on specific lines"; /** Not idempotent — each call submits a new review. */ declare function createPullRequestReviewCore({ token, owner, repo, pullNumber, body, event, comments }: { token: string; owner: string; repo: string; pullNumber: number; body?: string; event: 'APPROVE' | 'REQUEST_CHANGES' | 'COMMENT'; comments?: Array<{ path: string; body: string; line?: number; side?: 'LEFT' | 'RIGHT'; }>; }): Promise<{ id: number; state: string; body: string; url: string; author: string | undefined; submittedAt: string | undefined; }>; declare const listPullRequestReviewThreadsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; status: z.ZodDefault>>; detail: z.ZodDefault>>; perPage: z.ZodDefault>; after: z.ZodOptional; }, z.core.$strip>; declare const listPullRequestReviewThreadsDescription = "List review threads on a pull request with their comments, resolution state, and the IDs needed to reply (commentId) or resolve (threadId). Unresolved threads only by default (GitHub GraphQL API)"; declare function listPullRequestReviewThreadsCore({ token, owner, repo, pullNumber, status, detail, perPage, after }: { token: string; owner: string; repo: string; pullNumber: number; status: 'unresolved' | 'all'; detail: DetailLevel; perPage: number; after?: string; }): Promise<{ error: string; totalCount?: undefined; returnedCount?: undefined; hasNextPage?: undefined; endCursor?: undefined; threads?: undefined; } | { totalCount: number; returnedCount: number; hasNextPage: boolean; endCursor: string | null; threads: { threadId: string; isResolved: boolean; isOutdated: boolean; path: string | null; line: number | null; startLine: number | null; resolvedBy: string | null; commentCount: number; comments: { commentId: number | null; author: string | null; body: string | null | undefined; createdAt: string; }[]; }[]; error?: undefined; }>; declare const replyToReviewCommentInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; commentId: z.ZodNumber; body: z.ZodString; }, z.core.$strip>; declare const replyToReviewCommentDescription = "Reply to a pull request review comment, adding a message to its review thread"; /** Not idempotent — each call posts a new reply. */ declare function replyToReviewCommentCore({ token, owner, repo, pullNumber, commentId, body }: { token: string; owner: string; repo: string; pullNumber: number; commentId: number; body: string; }): Promise<{ id: number; url: string; author: string; createdAt: string; }>; declare const resolveReviewThreadInputSchema: z.ZodObject<{ threadId: z.ZodString; }, z.core.$strip>; declare const resolveReviewThreadDescription = "Mark a pull request review thread as resolved"; /** Idempotent — resolving an already-resolved thread is a no-op on GitHub. */ declare function resolveReviewThreadCore({ token, threadId }: { token: string; threadId: string; }): Promise<{ error: string; threadId?: undefined; isResolved?: undefined; } | { threadId: string; isResolved: boolean; error?: undefined; }>; declare const requestReviewersInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; reviewers: z.ZodOptional>; teamReviewers: z.ZodOptional>; }, z.core.$strip>; declare const requestReviewersDescription = "Request reviews from users or teams on a pull request"; /** Not idempotent — re-requesting an existing reviewer is a no-op on GitHub but still mutates. */ declare function requestReviewersCore({ token, owner, repo, pullNumber, reviewers, teamReviewers }: { token: string; owner: string; repo: string; pullNumber: number; reviewers?: string[]; teamReviewers?: string[]; }): Promise<{ number: number; url: string; requestedReviewers: string[] | undefined; requestedTeams: string[] | undefined; }>; declare namespace reactions_d_exports { export { ReactionContent, addCommentReactionCore, addCommentReactionDescription, addCommentReactionInputSchema, addIssueReactionCore, addIssueReactionDescription, addIssueReactionInputSchema, listCommentReactionsCore, listCommentReactionsDescription, listCommentReactionsInputSchema, listIssueReactionsCore, listIssueReactionsDescription, listIssueReactionsInputSchema }; } declare const REACTION_CONTENTS: readonly ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"]; type ReactionContent = typeof REACTION_CONTENTS[number]; declare const listIssueReactionsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; content: z.ZodOptional>; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; declare const listIssueReactionsDescription = "List reactions on an issue or pull request conversation, with per-emoji counts for the returned page. When hasMore, pass nextPage — do not repeat the same call."; declare function listIssueReactionsCore({ token, owner, repo, issueNumber, content, perPage, page }: { token: string; owner: string; repo: string; issueNumber: number; content?: ReactionContent; perPage: number; page: number; }): Promise<{ hasMore: boolean; page: number; perPage: number; nextPage?: number; total: number; counts: Record; reactions: { content: string; user: string | undefined; }[]; }>; declare const addIssueReactionInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; content: z.ZodEnum<{ "+1": "+1"; [-1]: "-1"; laugh: "laugh"; confused: "confused"; heart: "heart"; hooray: "hooray"; rocket: "rocket"; eyes: "eyes"; }>; }, z.core.$strip>; declare const addIssueReactionDescription = "React to an issue or pull request with an emoji. Prefer this over posting a comment to acknowledge a report without adding noise to the thread"; /** Idempotent — GitHub returns the existing reaction when the user already reacted with the same content. */ declare function addIssueReactionCore({ token, owner, repo, issueNumber, content }: { token: string; owner: string; repo: string; issueNumber: number; content: ReactionContent; }): Promise<{ id: number; content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; user: string | undefined; issueNumber: number; }>; declare const listCommentReactionsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; commentId: z.ZodNumber; content: z.ZodOptional>; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; declare const listCommentReactionsDescription = "List reactions on an issue or pull request comment, with per-emoji counts for the returned page. When hasMore, pass nextPage — do not repeat the same call."; declare function listCommentReactionsCore({ token, owner, repo, commentId, content, perPage, page }: { token: string; owner: string; repo: string; commentId: number; content?: ReactionContent; perPage: number; page: number; }): Promise<{ hasMore: boolean; page: number; perPage: number; nextPage?: number; total: number; counts: Record; reactions: { content: string; user: string | undefined; }[]; }>; declare const addCommentReactionInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; commentId: z.ZodNumber; content: z.ZodEnum<{ "+1": "+1"; [-1]: "-1"; laugh: "laugh"; confused: "confused"; heart: "heart"; hooray: "hooray"; rocket: "rocket"; eyes: "eyes"; }>; }, z.core.$strip>; declare const addCommentReactionDescription = "React to an issue or pull request comment with an emoji. Prefer this over a reply when acknowledging a comment"; /** Idempotent — GitHub returns the existing reaction when the user already reacted with the same content. */ declare function addCommentReactionCore({ token, owner, repo, commentId, content }: { token: string; owner: string; repo: string; commentId: number; content: ReactionContent; }): Promise<{ id: number; content: "+1" | "-1" | "laugh" | "confused" | "heart" | "hooray" | "rocket" | "eyes"; user: string | undefined; commentId: number; }>; declare namespace releases_d_exports { export { createReleaseCore, createReleaseDescription, createReleaseInputSchema, deleteReleaseCore, deleteReleaseDescription, deleteReleaseInputSchema, getLatestReleaseCore, getLatestReleaseDescription, getLatestReleaseInputSchema, getReleaseCore, getReleaseDescription, getReleaseInputSchema, listReleasesCore, listReleasesDescription, listReleasesInputSchema, updateReleaseCore, updateReleaseDescription, updateReleaseInputSchema }; } declare const listReleasesInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; perPage: z.ZodDefault>; page: z.ZodDefault>; maxPages: z.ZodOptional; detail: z.ZodDefault>>; }, z.core.$strip>; declare const listReleasesDescription = "List releases for a GitHub repository, newest first (includes drafts and prereleases). Bodies truncated by default (detail: summary). When hasMore, pass nextPage or raise maxPages — do not repeat the same call."; declare function listReleasesCore({ token, owner, repo, perPage, page, maxPages, detail }: { token: string; owner: string; repo: string; perPage: number; page?: number; maxPages?: number; detail?: DetailLevel; }): Promise>; declare const getLatestReleaseInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; detail: z.ZodDefault>>; }, z.core.$strip>; declare const getLatestReleaseDescription = "Get the latest published release for a GitHub repository (excludes drafts and prereleases). Body truncated by default (detail: summary)"; declare function getLatestReleaseCore({ token, owner, repo, detail }: { token: string; owner: string; repo: string; detail?: DetailLevel; }): Promise<{ id: number; tagName: string; name: string | null; body: string | null | undefined; url: string; author: string; createdAt: string; publishedAt: string | null; assets: { name: string; downloadUrl: string; size: number; downloadCount: number; }[]; }>; declare const getReleaseInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; releaseId: z.ZodNumber; detail: z.ZodDefault>>; }, z.core.$strip>; declare const getReleaseDescription = "Get a specific release by ID, including its assets. Body truncated by default (detail: summary)"; declare function getReleaseCore({ token, owner, repo, releaseId, detail }: { token: string; owner: string; repo: string; releaseId: number; detail?: DetailLevel; }): Promise<{ id: number; tagName: string; name: string | null; body: string | null | undefined; draft: boolean; prerelease: boolean; url: string; author: string; createdAt: string; publishedAt: string | null; assets: { name: string; downloadUrl: string; size: number; downloadCount: number; }[]; }>; declare const createReleaseInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; tagName: z.ZodString; target: z.ZodOptional; name: z.ZodOptional; body: z.ZodOptional; draft: z.ZodDefault>; prerelease: z.ZodDefault>; generateReleaseNotes: z.ZodDefault>; }, z.core.$strip>; declare const createReleaseDescription = "Create a new release (and its tag if needed) in a GitHub repository"; /** Not idempotent — creating a release with an existing tag name returns an error from GitHub. */ declare function createReleaseCore({ token, owner, repo, tagName, target, name, body, draft, prerelease, generateReleaseNotes }: { token: string; owner: string; repo: string; tagName: string; target?: string; name?: string; body?: string; draft: boolean; prerelease: boolean; generateReleaseNotes: boolean; }): Promise<{ id: number; tagName: string; name: string | null; body: string | null | undefined; url: string; draft: boolean; prerelease: boolean; createdAt: string; }>; declare const updateReleaseInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; releaseId: z.ZodNumber; tagName: z.ZodOptional; target: z.ZodOptional; name: z.ZodOptional; body: z.ZodOptional; draft: z.ZodOptional; prerelease: z.ZodOptional; }, z.core.$strip>; declare const updateReleaseDescription = "Update an existing release — tag, target, title, notes, draft, or prerelease status"; /** Not idempotent — each call applies a new revision. */ declare function updateReleaseCore({ token, owner, repo, releaseId, tagName, target, name, body, draft, prerelease }: { token: string; owner: string; repo: string; releaseId: number; tagName?: string; target?: string; name?: string; body?: string; draft?: boolean; prerelease?: boolean; }): Promise<{ id: number; tagName: string; name: string | null; body: string | null | undefined; url: string; draft: boolean; prerelease: boolean; publishedAt: string | null; }>; declare const deleteReleaseInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; releaseId: z.ZodNumber; }, z.core.$strip>; declare const deleteReleaseDescription = "Delete a release permanently (does not delete the underlying git tag)"; /** Not idempotent — deleting an already-deleted release returns 404 from GitHub. */ declare function deleteReleaseCore({ token, owner, repo, releaseId }: { token: string; owner: string; repo: string; releaseId: number; }): Promise<{ deleted: boolean; releaseId: number; }>; declare namespace repository_d_exports { export { composeCommitMessage, createBranchCore, createBranchDescription, createBranchInputSchema, createCommitOnBranch, createOrUpdateFileCore, createOrUpdateFileDescription, createOrUpdateFileInputSchema, createRepositoryCore, createRepositoryDescription, createRepositoryInputSchema, deleteBranchCore, deleteBranchDescription, deleteBranchInputSchema, forkRepositoryCore, forkRepositoryDescription, forkRepositoryInputSchema, getFileContentCore, getFileContentDescription, getFileContentInputSchema, getRepositoryCore, getRepositoryDescription, getRepositoryInputSchema, getRepositoryTreeCore, getRepositoryTreeDescription, getRepositoryTreeInputSchema, listBranchesCore, listBranchesDescription, listBranchesInputSchema }; } declare function createCommitOnBranch(octokit: Octokit$1, input: { owner: string; repo: string; branch: string; expectedHeadOid: string; headline: string; body?: string; additions?: Array<{ path: string; contents: string; }>; deletions?: Array<{ path: string; }>; }): Promise<{ commitSha: string; commitUrl: string; }>; declare function composeCommitMessage(message: string, coAuthors?: CommitIdentity[]): string; declare const getRepositoryInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; }, z.core.$strip>; declare const getRepositoryDescription = "Get information about a GitHub repository including description, stars, forks, language, and default branch"; declare function getRepositoryCore({ token, owner, repo }: { token: string; owner: string; repo: string; }): Promise<{ name: string; fullName: string; description: string | null; url: string; defaultBranch: string; stars: number; forks: number; openIssues: number; language: string | null; private: boolean; createdAt: string; updatedAt: string; }>; declare const listBranchesInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; declare const listBranchesDescription = "List branches in a GitHub repository. When hasMore, pass nextPage — do not repeat the same call."; declare function listBranchesCore({ token, owner, repo, perPage, page }: { token: string; owner: string; repo: string; perPage: number; page?: number; }): Promise>; declare const getFileContentInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; path: z.ZodString; ref: z.ZodOptional; startLine: z.ZodOptional; endLine: z.ZodOptional; maxLines: z.ZodOptional; }, z.core.$strip>; declare const getFileContentDescription = "Get the content of a file from a GitHub repository. Prefer startLine/endLine or maxLines to read only the lines you need"; declare function getFileContentCore({ token, owner, repo, path, ref, startLine, endLine, maxLines }: { token: string; owner: string; repo: string; path: string; ref?: string; startLine?: number; endLine?: number; maxLines?: number; }): Promise<{ type: "directory"; entries: { name: string; type: "file" | "dir" | "submodule" | "symlink"; path: string; }[]; path?: undefined; sha?: undefined; size?: undefined; totalLines?: undefined; content?: undefined; startLine?: undefined; endLine?: undefined; truncated?: undefined; } | { type: "submodule" | "symlink"; path: string; entries?: undefined; sha?: undefined; size?: undefined; totalLines?: undefined; content?: undefined; startLine?: undefined; endLine?: undefined; truncated?: undefined; } | { type: "file"; path: string; sha: string; size: number; totalLines: number; content: string; entries?: undefined; startLine?: undefined; endLine?: undefined; truncated?: undefined; } | { type: "file"; path: string; sha: string; size: number; totalLines: number; startLine: number; endLine: number; truncated: boolean; content: string; entries?: undefined; }>; declare const getRepositoryTreeInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; ref: z.ZodOptional; path: z.ZodOptional; recursive: z.ZodDefault>; }, z.core.$strip>; declare const getRepositoryTreeDescription = "List the file and directory structure of a repository at a given ref. Prefer a path prefix over recursive true. If truncated, narrow path instead of recalling the full tree."; declare function getRepositoryTreeCore({ token, owner, repo, ref, path, recursive }: { token: string; owner: string; repo: string; ref?: string; path?: string; recursive: boolean; }): Promise<{ sha: string; truncated: boolean; path: string | undefined; entries: { path: string; type: string; size: number | undefined; sha: string; }[]; }>; declare const createBranchInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; branch: z.ZodString; from: z.ZodOptional; }, z.core.$strip>; declare const createBranchDescription = "Create a new branch in a GitHub repository from an existing branch or commit SHA"; /** Idempotent when the branch already exists at the target SHA. Not idempotent otherwise. */ declare function createBranchCore({ token, owner, repo, branch, from }: { token: string; owner: string; repo: string; branch: string; from?: string; }): Promise<{ ref: string; sha: string; url: string; }>; declare const deleteBranchInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; branch: z.ZodString; }, z.core.$strip>; declare const deleteBranchDescription = "Delete a branch from a GitHub repository permanently"; /** Not idempotent — deleting a branch that no longer exists fails with a 422. */ declare function deleteBranchCore({ token, owner, repo, branch }: { token: string; owner: string; repo: string; branch: string; }): Promise<{ deleted: boolean; branch: string; }>; declare const forkRepositoryInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; organization: z.ZodOptional; name: z.ZodOptional; }, z.core.$strip>; declare const forkRepositoryDescription = "Fork a GitHub repository to the authenticated user account or a specified organization"; /** Not idempotent — each call may create another fork attempt. */ declare function forkRepositoryCore({ token, owner, repo, organization, name }: { token: string; owner: string; repo: string; organization?: string; name?: string; }): Promise<{ name: string; fullName: string; url: string; cloneUrl: string; sshUrl: string; defaultBranch: string; private: boolean; parent: { fullName: string; url: string; } | null; }>; declare const createRepositoryInputSchema: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; isPrivate: z.ZodDefault>; autoInit: z.ZodDefault>; gitignoreTemplate: z.ZodOptional; licenseTemplate: z.ZodOptional; org: z.ZodOptional; }, z.core.$strip>; declare const createRepositoryDescription = "Create a new GitHub repository for the authenticated user or a specified organization"; /** Not idempotent — each call creates a new repository. */ declare function createRepositoryCore({ token, name, description, isPrivate, autoInit, gitignoreTemplate, licenseTemplate, org }: { token: string; name: string; description?: string; isPrivate: boolean; autoInit: boolean; gitignoreTemplate?: string; licenseTemplate?: string; org?: string; }): Promise<{ name: string; fullName: string; description: string | null; url: string; cloneUrl: string; sshUrl: string; defaultBranch: string; private: boolean; createdAt: string; }>; declare const createOrUpdateFileInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; path: z.ZodString; message: z.ZodString; content: z.ZodString; branch: z.ZodOptional; sha: z.ZodOptional; }, z.core.$strip>; declare const createOrUpdateFileDescription = "Create or update a file in a GitHub repository. Provide the SHA when updating an existing file."; /** Idempotent when updating with sha and content is unchanged. Not idempotent for new commits. */ declare function createOrUpdateFileCore({ token, owner, repo, path, message, content, branch, sha, author, committer, coAuthors }: { token: string; owner: string; repo: string; path: string; message: string; content: string; branch?: string; sha?: string; author?: CommitIdentity; committer?: CommitIdentity; coAuthors?: CommitIdentity[]; }): Promise<{ path: string; sha: string; skipped: true; message: string; commitSha?: undefined; commitUrl?: undefined; } | { path: string | undefined; sha: string | undefined; commitSha: string | undefined; commitUrl: string | undefined; skipped?: undefined; message?: undefined; }>; declare namespace search_d_exports { export { searchCodeCore, searchCodeDescription, searchCodeInputSchema, searchIssuesCore, searchIssuesDescription, searchIssuesInputSchema, searchRepositoriesCore, searchRepositoriesDescription, searchRepositoriesInputSchema }; } declare const searchCodeInputSchema: z.ZodObject<{ query: z.ZodString; perPage: z.ZodDefault>; }, z.core.$strip>; declare const searchCodeDescription = "Search for code in GitHub repositories. Use qualifiers like \"repo:owner/name\" to scope the search. Results include matching text snippets when GitHub returns them."; declare function searchCodeCore({ token, query, perPage }: { token: string; query: string; perPage: number; }): Promise<{ totalCount: number; items: { name: string; path: string; url: string; repository: string; sha: string; textMatches: { fragment: string; }[] | undefined; }[]; }>; declare const searchRepositoriesInputSchema: z.ZodObject<{ query: z.ZodString; perPage: z.ZodDefault>; sort: z.ZodOptional>; order: z.ZodDefault>>; }, z.core.$strip>; declare const searchRepositoriesDescription = "Search for GitHub repositories by keyword, topic, language, or other qualifiers"; declare function searchRepositoriesCore({ token, query, perPage, sort, order }: { token: string; query: string; perPage: number; sort?: 'stars' | 'forks' | 'help-wanted-issues' | 'updated'; order: 'asc' | 'desc'; }): Promise<{ totalCount: number; items: { name: string; fullName: string; description: string | null; url: string; stars: number; forks: number; language: string | null; topics: string[] | undefined; }[]; }>; declare const searchIssuesInputSchema: z.ZodObject<{ query: z.ZodString; perPage: z.ZodDefault>; sort: z.ZodOptional>; order: z.ZodDefault>>; }, z.core.$strip>; declare const searchIssuesDescription = "Search for issues and pull requests across GitHub using search qualifiers like \"repo:owner/name is:open\""; declare function searchIssuesCore({ token, query, perPage, sort, order }: { token: string; query: string; perPage: number; sort?: 'comments' | 'reactions' | 'created' | 'updated' | 'interactions'; order: 'asc' | 'desc'; }): Promise<{ totalCount: number; items: { number: number; title: string; state: string; url: string; repository: string | undefined; author: string | undefined; labels: (string | undefined)[]; comments: number; createdAt: string; updatedAt: string; isPullRequest: boolean; }[]; }>; declare namespace workflows_d_exports { export { cancelWorkflowRunCore, cancelWorkflowRunDescription, cancelWorkflowRunInputSchema, getWorkflowJobLogsCore, getWorkflowJobLogsDescription, getWorkflowJobLogsInputSchema, getWorkflowRunCore, getWorkflowRunDescription, getWorkflowRunInputSchema, listWorkflowJobsCore, listWorkflowJobsDescription, listWorkflowJobsInputSchema, listWorkflowRunsCore, listWorkflowRunsDescription, listWorkflowRunsInputSchema, listWorkflowsCore, listWorkflowsDescription, listWorkflowsInputSchema, rerunWorkflowRunCore, rerunWorkflowRunDescription, rerunWorkflowRunInputSchema, shapeJobLog, triggerWorkflowCore, triggerWorkflowDescription, triggerWorkflowInputSchema }; } declare const listWorkflowsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; declare const listWorkflowsDescription = "List GitHub Actions workflows in a repository. When hasMore, pass nextPage — do not repeat the same call."; declare function listWorkflowsCore({ token, owner, repo, perPage, page }: { token: string; owner: string; repo: string; perPage: number; page: number; }): Promise<{ hasMore: boolean; page: number; perPage: number; nextPage?: number; totalCount: number; workflows: { id: number; name: string; path: string; state: "deleted" | "active" | "disabled_fork" | "disabled_inactivity" | "disabled_manually"; url: string; createdAt: string; updatedAt: string; }[]; }>; type WorkflowRunStatus = 'completed' | 'action_required' | 'cancelled' | 'failure' | 'neutral' | 'skipped' | 'stale' | 'success' | 'timed_out' | 'in_progress' | 'queued' | 'requested' | 'waiting' | 'pending'; declare const listWorkflowRunsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; workflowId: z.ZodOptional>; branch: z.ZodOptional; event: z.ZodOptional; status: z.ZodOptional>; perPage: z.ZodDefault>; page: z.ZodDefault>; maxPages: z.ZodOptional; }, z.core.$strip>; declare const listWorkflowRunsDescription = "List workflow runs for a repository, optionally filtered by workflow, branch, status, or event. When hasMore, pass nextPage or raise maxPages — do not repeat the same call."; declare function listWorkflowRunsCore({ token, owner, repo, workflowId, branch, event, status, perPage, page, maxPages }: { token: string; owner: string; repo: string; workflowId?: string | number; branch?: string; event?: string; status?: WorkflowRunStatus; perPage: number; page: number; maxPages?: number; }): Promise<{ hasMore: boolean; page: number; perPage: number; nextPage?: number; totalCount: number; runs: { id: number; name: string | null | undefined; status: string | null; conclusion: string | null; branch: string | null; event: string; url: string; actor: string | undefined; createdAt: string; updatedAt: string; runNumber: number; runAttempt: number | undefined; }[]; }>; declare const getWorkflowRunInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; runId: z.ZodNumber; }, z.core.$strip>; declare const getWorkflowRunDescription = "Get details of a specific workflow run including status, timing, and trigger info"; declare function getWorkflowRunCore({ token, owner, repo, runId }: { token: string; owner: string; repo: string; runId: number; }): Promise<{ id: number; name: string | null | undefined; status: string | null; conclusion: string | null; branch: string | null; sha: string; event: string; url: string; actor: string | undefined; runNumber: number; runAttempt: number | undefined; createdAt: string; updatedAt: string; runStartedAt: string | undefined; }>; declare const listWorkflowJobsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; runId: z.ZodNumber; filter: z.ZodDefault>>; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; declare const listWorkflowJobsDescription = "List jobs for a workflow run, including step-level status and timing. When hasMore, pass nextPage — do not repeat the same call."; declare function listWorkflowJobsCore({ token, owner, repo, runId, filter, perPage, page }: { token: string; owner: string; repo: string; runId: number; filter: 'latest' | 'all'; perPage: number; page: number; }): Promise<{ hasMore: boolean; page: number; perPage: number; nextPage?: number; totalCount: number; jobs: { id: number; name: string; status: "completed" | "in_progress" | "queued" | "requested" | "waiting" | "pending"; conclusion: "success" | "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "timed_out" | null; url: string | null; startedAt: string; completedAt: string | null; runnerName: string | null; steps: { name: string; status: "completed" | "in_progress" | "queued"; conclusion: string | null; number: number; startedAt: string | null | undefined; completedAt: string | null | undefined; }[] | undefined; }[]; }>; declare const getWorkflowJobLogsInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; jobId: z.ZodNumber; maxLines: z.ZodDefault>; }, z.core.$strip>; declare const getWorkflowJobLogsDescription = "Get the log output of a workflow job to diagnose failures. Returns the last maxLines lines (default 200) with per-line timestamps stripped to save tokens"; /** * Tail-truncate a raw job log and strip the ISO timestamp GitHub prefixes on * every line (~29 tokens-worth of noise per line the model never needs). */ declare function shapeJobLog(raw: string, maxLines: number): { totalLines: number; returnedLines: number; omittedLines: number; log: string; }; declare function getWorkflowJobLogsCore({ token, owner, repo, jobId, maxLines }: { token: string; owner: string; repo: string; jobId: number; maxLines: number; }): Promise<{ totalLines: number; returnedLines: number; omittedLines: number; log: string; jobId: number; }>; declare const triggerWorkflowInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; workflowId: z.ZodUnion; ref: z.ZodString; inputs: z.ZodOptional>; }, z.core.$strip>; declare const triggerWorkflowDescription = "Trigger a workflow via workflow_dispatch event"; /** Not idempotent — each call starts a new workflow run. */ declare function triggerWorkflowCore({ token, owner, repo, workflowId, ref, inputs }: { token: string; owner: string; repo: string; workflowId: string | number; ref: string; inputs?: Record; }): Promise<{ triggered: boolean; workflowId: string | number; ref: string; }>; declare const cancelWorkflowRunInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; runId: z.ZodNumber; }, z.core.$strip>; declare const cancelWorkflowRunDescription = "Cancel an in-progress workflow run"; /** Not idempotent — cancelling an already-finished run is a no-op on GitHub but still mutates. */ declare function cancelWorkflowRunCore({ token, owner, repo, runId }: { token: string; owner: string; repo: string; runId: number; }): Promise<{ cancelled: boolean; runId: number; }>; declare const rerunWorkflowRunInputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; runId: z.ZodNumber; onlyFailedJobs: z.ZodDefault>; }, z.core.$strip>; declare const rerunWorkflowRunDescription = "Re-run a workflow run, optionally only the failed jobs"; /** Not idempotent — each call starts another run attempt. */ declare function rerunWorkflowRunCore({ token, owner, repo, runId, onlyFailedJobs }: { token: string; owner: string; repo: string; runId: number; onlyFailedJobs: boolean; }): Promise<{ rerun: boolean; runId: number; onlyFailedJobs: boolean; }>; //#endregion //#region src/core/catalog.d.ts /** * Single source of truth for every GitHub tool. * * `GITHUB_TOOL_NAMES`, `GITHUB_WRITE_TOOLS`, `TOOL_CONNECT_SCOPES`, and the * eve tool registry are all derived from this catalog. Adding a tool here (plus * its `"use step"` factory in `src/tools/` and `allTools` in `src/index.ts`, * both enforced at compile time) is the only registration needed. */ declare const GITHUB_TOOL_CATALOG: { /** Get information about a GitHub repository including description, stars, forks, language, and default branch. */ getRepository: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; }, z.core.$strip>; readonly core: typeof getRepositoryCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** List branches in a GitHub repository. */ listBranches: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof listBranchesCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** Get the content of a file from a GitHub repository. Prefer startLine/endLine or maxLines for large files. */ getFileContent: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; path: z.ZodString; ref: z.ZodOptional; startLine: z.ZodOptional; endLine: z.ZodOptional; maxLines: z.ZodOptional; }, z.core.$strip>; readonly core: typeof getFileContentCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** List the file and directory structure of a repository at a given ref. */ getRepositoryTree: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; ref: z.ZodOptional; path: z.ZodOptional; recursive: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof getRepositoryTreeCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** Create a new branch in a GitHub repository from an existing branch or commit SHA. Requires approval by default. */ createBranch: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; branch: z.ZodString; from: z.ZodOptional; }, z.core.$strip>; readonly core: typeof createBranchCore; write: true; connectScopes: readonly ["contents:read", "contents:write", "metadata:read"]; }; /** Delete a branch from a GitHub repository permanently. Requires approval by default. */ deleteBranch: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; branch: z.ZodString; }, z.core.$strip>; readonly core: typeof deleteBranchCore; write: true; connectScopes: readonly ["contents:read", "contents:write", "metadata:read"]; }; /** Fork a GitHub repository to the authenticated user account or a specified organization. Requires approval by default. */ forkRepository: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; organization: z.ZodOptional; name: z.ZodOptional; }, z.core.$strip>; readonly core: typeof forkRepositoryCore; write: true; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** Create a new GitHub repository for the authenticated user or a specified organization. Requires approval by default. */ createRepository: { description: string; inputSchema: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; isPrivate: z.ZodDefault>; autoInit: z.ZodDefault>; gitignoreTemplate: z.ZodOptional; licenseTemplate: z.ZodOptional; org: z.ZodOptional; }, z.core.$strip>; readonly core: typeof createRepositoryCore; write: true; connectScopes: readonly ["metadata:read", "administration:read", "administration:write"]; }; /** Create or update a file in a GitHub repository. Provide the SHA when updating an existing file. Requires approval by default. */ createOrUpdateFile: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; path: z.ZodString; message: z.ZodString; content: z.ZodString; branch: z.ZodOptional; sha: z.ZodOptional; }, z.core.$strip>; readonly core: typeof createOrUpdateFileCore; write: true; connectScopes: readonly ["contents:read", "contents:write", "metadata:read"]; }; /** List pull requests for a GitHub repository. */ listPullRequests: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; state: z.ZodDefault>>; perPage: z.ZodDefault>; page: z.ZodDefault>; maxPages: z.ZodOptional; }, z.core.$strip>; readonly core: typeof listPullRequestsCore; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read"]; }; /** Get detailed information about a specific pull request. Body truncated by default (detail: summary). */ getPullRequest: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; detail: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof getPullRequestCore; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read"]; }; /** Create a new pull request in a GitHub repository. Requires approval by default. */ createPullRequest: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; title: z.ZodString; body: z.ZodOptional; head: z.ZodString; base: z.ZodString; draft: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof createPullRequestCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read", "pull_requests:write"]; }; /** Merge a pull request. Requires approval by default. */ mergePullRequest: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; commitTitle: z.ZodOptional; commitMessage: z.ZodOptional; mergeMethod: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof mergePullRequestCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read", "pull_requests:write"]; }; /** Update a pull request — title, body, state, base branch, or draft status. Requires approval by default. */ updatePullRequest: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; title: z.ZodOptional; body: z.ZodOptional; state: z.ZodOptional>; base: z.ZodOptional; draft: z.ZodOptional; }, z.core.$strip>; readonly core: typeof updatePullRequestCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read", "pull_requests:write"]; }; /** Add a comment to a pull request. Requires approval by default. */ addPullRequestComment: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; body: z.ZodString; }, z.core.$strip>; readonly core: typeof addPullRequestCommentCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read", "pull_requests:write"]; }; /** Update the body of a comment on a pull request. Requires approval by default. */ updatePullRequestComment: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; commentId: z.ZodNumber; body: z.ZodString; }, z.core.$strip>; readonly core: typeof updatePullRequestCommentCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read", "pull_requests:write"]; }; /** Delete a comment from a pull request permanently. Requires approval by default. */ deletePullRequestComment: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; commentId: z.ZodNumber; }, z.core.$strip>; readonly core: typeof deletePullRequestCommentCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read", "pull_requests:write"]; }; /** List files changed in a pull request with status and stats. Patches omitted by default — set includePatch true for diffs. */ listPullRequestFiles: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; includePatch: z.ZodDefault>; filenames: z.ZodOptional>; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof listPullRequestFilesCore; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read"]; }; /** List reviews on a pull request (approvals, change requests, and comments). */ listPullRequestReviews: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof listPullRequestReviewsCore; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read"]; }; /** Submit a pull request review — approve, request changes, or comment with optional inline comments on specific lines. Requires approval by default. */ createPullRequestReview: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; body: z.ZodOptional; event: z.ZodEnum<{ APPROVE: "APPROVE"; REQUEST_CHANGES: "REQUEST_CHANGES"; COMMENT: "COMMENT"; }>; comments: z.ZodOptional; side: z.ZodOptional>; }, z.core.$strip>>>; }, z.core.$strip>; readonly core: typeof createPullRequestReviewCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read", "pull_requests:write"]; }; /** List review threads on a pull request with comments, resolution state, and the IDs needed to reply or resolve. Unresolved only by default. */ listPullRequestReviewThreads: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; status: z.ZodDefault>>; detail: z.ZodDefault>>; perPage: z.ZodDefault>; after: z.ZodOptional; }, z.core.$strip>; readonly core: typeof listPullRequestReviewThreadsCore; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read"]; }; /** Reply to a pull request review comment in its review thread. Requires approval by default. */ replyToReviewComment: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; commentId: z.ZodNumber; body: z.ZodString; }, z.core.$strip>; readonly core: typeof replyToReviewCommentCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read", "pull_requests:write"]; }; /** Mark a pull request review thread as resolved. Requires approval by default. */ resolveReviewThread: { description: string; inputSchema: z.ZodObject<{ threadId: z.ZodString; }, z.core.$strip>; readonly core: typeof resolveReviewThreadCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read", "pull_requests:write"]; }; /** Request reviews from users or teams on a pull request. Requires approval by default. */ requestReviewers: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; reviewers: z.ZodOptional>; teamReviewers: z.ZodOptional>; }, z.core.$strip>; readonly core: typeof requestReviewersCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read", "pull_requests:write"]; }; /** Fetch pull request details plus files, reviews, and optional CI checks in one call. */ getPullRequestContext: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; pullNumber: z.ZodNumber; includeFiles: z.ZodDefault>; includeReviews: z.ZodDefault>; includeChecks: z.ZodDefault>; includePatch: z.ZodDefault>; filesPerPage: z.ZodDefault>; detail: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof getPullRequestContextCore; connectScopes: readonly ["contents:read", "metadata:read", "pull_requests:read", "checks:read", "statuses:read"]; }; /** Fetch an issue plus available label names and recent comments in one call. */ getIssueContext: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; includeLabels: z.ZodDefault>; includeComments: z.ZodDefault>; maxComments: z.ZodDefault>; detail: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof getIssueContextCore; connectScopes: readonly ["contents:read", "metadata:read", "issues:read"]; }; /** List issues for a GitHub repository (excludes pull requests). */ listIssues: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; state: z.ZodDefault>>; labels: z.ZodOptional; perPage: z.ZodDefault>; page: z.ZodDefault>; maxPages: z.ZodOptional; }, z.core.$strip>; readonly core: typeof listIssuesCore; connectScopes: readonly ["contents:read", "metadata:read", "issues:read"]; }; /** Get detailed information about a specific issue. Body truncated by default (detail: summary). */ getIssue: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; detail: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof getIssueCore; connectScopes: readonly ["contents:read", "metadata:read", "issues:read"]; }; /** List comments on a GitHub issue. Bodies are truncated by default (detail: summary). Prefer getIssueContext for the first page when triaging. */ listIssueComments: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; perPage: z.ZodDefault>; page: z.ZodDefault>; detail: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof listIssueCommentsCore; connectScopes: readonly ["contents:read", "metadata:read", "issues:read"]; }; /** Create a new issue in a GitHub repository. Requires approval by default. */ createIssue: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; title: z.ZodString; body: z.ZodOptional; labels: z.ZodOptional>; assignees: z.ZodOptional>; }, z.core.$strip>; readonly core: typeof createIssueCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** Add a comment to a GitHub issue. Requires approval by default. */ addIssueComment: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; body: z.ZodString; }, z.core.$strip>; readonly core: typeof addIssueCommentCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** Update the body of a comment on a GitHub issue. Requires approval by default. */ updateIssueComment: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; commentId: z.ZodNumber; body: z.ZodString; }, z.core.$strip>; readonly core: typeof updateIssueCommentCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** Delete a comment from a GitHub issue permanently. Requires approval by default. */ deleteIssueComment: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; commentId: z.ZodNumber; }, z.core.$strip>; readonly core: typeof deleteIssueCommentCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** Close an open GitHub issue. Requires approval by default. */ closeIssue: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; stateReason: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof closeIssueCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** Update a GitHub issue — title, body, state, labels, milestone, or assignees. Requires approval by default. */ updateIssue: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; title: z.ZodOptional; body: z.ZodOptional; state: z.ZodOptional>; stateReason: z.ZodOptional>; labels: z.ZodOptional>; milestone: z.ZodOptional>; assignees: z.ZodOptional>; }, z.core.$strip>; readonly core: typeof updateIssueCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** List labels available in a GitHub repository. */ listLabels: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof listLabelsCore; connectScopes: readonly ["contents:read", "metadata:read", "issues:read"]; }; /** Add labels to an issue or pull request. Requires approval by default. */ addLabels: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; labels: z.ZodArray; }, z.core.$strip>; readonly core: typeof addLabelsCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** Remove a label from an issue or pull request. Requires approval by default. */ removeLabel: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; label: z.ZodString; }, z.core.$strip>; readonly core: typeof removeLabelCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** Create a label in a GitHub repository. Requires approval by default. */ createLabel: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; name: z.ZodString; color: z.ZodString; description: z.ZodOptional; }, z.core.$strip>; readonly core: typeof createLabelCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** Update a label in a GitHub repository — name, color, or description. Requires approval by default. */ updateLabel: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; name: z.ZodString; newName: z.ZodOptional; color: z.ZodOptional; description: z.ZodOptional>; }, z.core.$strip>; readonly core: typeof updateLabelCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** Delete a label from a GitHub repository permanently. Requires approval by default. */ deleteLabel: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; name: z.ZodString; }, z.core.$strip>; readonly core: typeof deleteLabelCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** Assign users to an issue or pull request. Requires approval by default. */ addAssignees: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; assignees: z.ZodArray; }, z.core.$strip>; readonly core: typeof addAssigneesCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** Remove assignees from an issue or pull request. Requires approval by default. */ removeAssignees: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; assignees: z.ZodArray; }, z.core.$strip>; readonly core: typeof removeAssigneesCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** List reactions on an issue or pull request conversation, with per-emoji counts. */ listIssueReactions: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; content: z.ZodOptional>; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof listIssueReactionsCore; connectScopes: readonly ["contents:read", "metadata:read", "issues:read"]; }; /** React to an issue or pull request with an emoji. Requires approval by default. */ addIssueReaction: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; issueNumber: z.ZodNumber; content: z.ZodEnum<{ "+1": "+1"; [-1]: "-1"; laugh: "laugh"; confused: "confused"; heart: "heart"; hooray: "hooray"; rocket: "rocket"; eyes: "eyes"; }>; }, z.core.$strip>; readonly core: typeof addIssueReactionCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** List reactions on an issue or pull request comment, with per-emoji counts. */ listCommentReactions: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; commentId: z.ZodNumber; content: z.ZodOptional>; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof listCommentReactionsCore; connectScopes: readonly ["contents:read", "metadata:read", "issues:read"]; }; /** React to an issue or pull request comment with an emoji. Requires approval by default. */ addCommentReaction: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; commentId: z.ZodNumber; content: z.ZodEnum<{ "+1": "+1"; [-1]: "-1"; laugh: "laugh"; confused: "confused"; heart: "heart"; hooray: "hooray"; rocket: "rocket"; eyes: "eyes"; }>; }, z.core.$strip>; readonly core: typeof addCommentReactionCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "issues:read", "issues:write"]; }; /** List discussions in a GitHub repository, most recently updated first, optionally filtered by category. */ listDiscussions: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; category: z.ZodOptional; perPage: z.ZodDefault>; after: z.ZodOptional; }, z.core.$strip>; readonly core: typeof listDiscussionsCore; connectScopes: readonly ["contents:read", "metadata:read", "discussions:read"]; }; /** Get a GitHub discussion by number. Body truncated by default (detail: summary). */ getDiscussion: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; discussionNumber: z.ZodNumber; detail: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof getDiscussionCore; connectScopes: readonly ["contents:read", "metadata:read", "discussions:read"]; }; /** Add a comment to a GitHub discussion. Requires approval by default. */ addDiscussionComment: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; discussionNumber: z.ZodNumber; body: z.ZodString; }, z.core.$strip>; readonly core: typeof addDiscussionCommentCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "discussions:read", "discussions:write"]; }; /** List notification threads for the authenticated user. Requires a token with notifications access. */ listNotifications: { description: string; inputSchema: z.ZodObject<{ all: z.ZodDefault>; participating: z.ZodDefault>; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof listNotificationsCore; connectScopes: readonly []; }; /** Mark a single notification thread as read. Requires approval by default. */ markNotificationRead: { description: string; inputSchema: z.ZodObject<{ threadId: z.ZodString; }, z.core.$strip>; readonly core: typeof markNotificationReadCore; write: true; connectScopes: readonly []; }; /** 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. */ searchCode: { description: string; inputSchema: z.ZodObject<{ query: z.ZodString; perPage: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof searchCodeCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** Search for GitHub repositories by keyword, topic, language, or other qualifiers. */ searchRepositories: { description: string; inputSchema: z.ZodObject<{ query: z.ZodString; perPage: z.ZodDefault>; sort: z.ZodOptional>; order: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof searchRepositoriesCore; connectScopes: readonly ["metadata:read"]; }; /** Search for issues and pull requests across GitHub using search qualifiers like "repo:owner/name is:open". */ searchIssues: { description: string; inputSchema: z.ZodObject<{ query: z.ZodString; perPage: z.ZodDefault>; sort: z.ZodOptional>; order: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof searchIssuesCore; connectScopes: readonly ["metadata:read", "issues:read", "pull_requests:read"]; }; /** List commits for a GitHub repository. Filter by file path to see commits that touched a file. For line-by-line attribution at a given ref, use getBlame instead. */ listCommits: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; path: z.ZodOptional; sha: z.ZodOptional; author: z.ZodOptional; since: z.ZodOptional; until: z.ZodOptional; perPage: z.ZodDefault>; page: z.ZodDefault>; maxPages: z.ZodOptional; }, z.core.$strip>; readonly core: typeof listCommitsCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** Get detailed information about a specific commit, including the list of files changed. Patches omitted by default. */ getCommit: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; ref: z.ZodString; includePatch: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof getCommitCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** Line-level git blame for a file at a commit-like ref (branch, tag, or SHA). Returns contiguous ranges mapping lines to the commits that last modified them. */ getBlame: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; path: z.ZodString; ref: z.ZodOptional; line: z.ZodOptional; lineStart: z.ZodOptional; lineEnd: z.ZodOptional; }, z.core.$strip>; readonly core: typeof getBlameCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** Compare two branches, tags, or commits — ahead/behind counts, commits in between, and differing files. Patches omitted by default. */ compareCommits: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; base: z.ZodString; head: z.ZodString; includePatch: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof compareCommitsCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** List gists for the authenticated user or a specific user. */ listGists: { description: string; inputSchema: z.ZodObject<{ username: z.ZodOptional; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof listGistsCore; connectScopes: readonly []; }; /** Get a gist by ID, including file contents. */ getGist: { description: string; inputSchema: z.ZodObject<{ gistId: z.ZodString; }, z.core.$strip>; readonly core: typeof getGistCore; connectScopes: readonly []; }; /** List comments on a gist. */ listGistComments: { description: string; inputSchema: z.ZodObject<{ gistId: z.ZodString; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof listGistCommentsCore; connectScopes: readonly []; }; /** Create a new gist with one or more files. Requires approval by default. */ createGist: { description: string; inputSchema: z.ZodObject<{ description: z.ZodOptional; files: z.ZodRecord>; isPublic: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof createGistCore; write: true; connectScopes: readonly []; }; /** Update an existing gist — edit description, update files, or remove files. Requires approval by default. */ updateGist: { description: string; inputSchema: z.ZodObject<{ gistId: z.ZodString; description: z.ZodOptional; files: z.ZodOptional>>; filesToDelete: z.ZodOptional>; }, z.core.$strip>; readonly core: typeof updateGistCore; write: true; connectScopes: readonly []; }; /** Delete a gist permanently. Requires approval by default. */ deleteGist: { description: string; inputSchema: z.ZodObject<{ gistId: z.ZodString; }, z.core.$strip>; readonly core: typeof deleteGistCore; write: true; connectScopes: readonly []; }; /** Add a comment to a gist. Requires approval by default. */ createGistComment: { description: string; inputSchema: z.ZodObject<{ gistId: z.ZodString; body: z.ZodString; }, z.core.$strip>; readonly core: typeof createGistCommentCore; write: true; connectScopes: readonly []; }; /** List GitHub Actions workflows in a repository. */ listWorkflows: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof listWorkflowsCore; connectScopes: readonly ["contents:read", "metadata:read", "actions:read"]; }; /** List workflow runs for a repository, optionally filtered by workflow, branch, status, or event. */ listWorkflowRuns: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; workflowId: z.ZodOptional>; branch: z.ZodOptional; event: z.ZodOptional; status: z.ZodOptional>; perPage: z.ZodDefault>; page: z.ZodDefault>; maxPages: z.ZodOptional; }, z.core.$strip>; readonly core: typeof listWorkflowRunsCore; connectScopes: readonly ["contents:read", "metadata:read", "actions:read"]; }; /** Get details of a specific workflow run including status, timing, and trigger info. */ getWorkflowRun: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; runId: z.ZodNumber; }, z.core.$strip>; readonly core: typeof getWorkflowRunCore; connectScopes: readonly ["contents:read", "metadata:read", "actions:read"]; }; /** List jobs for a workflow run, including step-level status and timing. */ listWorkflowJobs: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; runId: z.ZodNumber; filter: z.ZodDefault>>; perPage: z.ZodDefault>; page: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof listWorkflowJobsCore; connectScopes: readonly ["contents:read", "metadata:read", "actions:read"]; }; /** Get the log output of a workflow job to diagnose failures. Returns the tail (default 200 lines) with timestamps stripped. */ getWorkflowJobLogs: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; jobId: z.ZodNumber; maxLines: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof getWorkflowJobLogsCore; connectScopes: readonly ["contents:read", "metadata:read", "actions:read"]; }; /** Trigger a workflow via workflow_dispatch event. Requires approval by default. */ triggerWorkflow: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; workflowId: z.ZodUnion; ref: z.ZodString; inputs: z.ZodOptional>; }, z.core.$strip>; readonly core: typeof triggerWorkflowCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "actions:read", "actions:write"]; }; /** Cancel an in-progress workflow run. Requires approval by default. */ cancelWorkflowRun: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; runId: z.ZodNumber; }, z.core.$strip>; readonly core: typeof cancelWorkflowRunCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "actions:read", "actions:write"]; }; /** Re-run a workflow run, optionally only the failed jobs. Requires approval by default. */ rerunWorkflowRun: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; runId: z.ZodNumber; onlyFailedJobs: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof rerunWorkflowRunCore; write: true; connectScopes: readonly ["contents:read", "metadata:read", "actions:read", "actions:write"]; }; /** List check runs (Checks API — GitHub Actions and other CI providers) for a commit, branch, or tag. */ listCheckRuns: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; ref: z.ZodString; perPage: z.ZodDefault>; page: z.ZodDefault>; maxPages: z.ZodOptional; }, z.core.$strip>; readonly core: typeof listCheckRunsCore; connectScopes: readonly ["contents:read", "metadata:read", "checks:read", "statuses:read"]; }; /** Get the combined commit status (Statuses API — legacy CI integrations) for a commit, branch, or tag. */ getCombinedStatus: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; ref: z.ZodString; }, z.core.$strip>; readonly core: typeof getCombinedStatusCore; connectScopes: readonly ["contents:read", "metadata:read", "checks:read", "statuses:read"]; }; /** Diagnose CI failures for a ref — combined status, failing checks, and failed workflow jobs in one call. */ getCiFailureContext: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; ref: z.ZodString; maxFailedRuns: z.ZodDefault>; maxFailedJobs: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof getCiFailureContextCore; connectScopes: readonly ["contents:read", "metadata:read", "actions:read", "checks:read", "statuses:read"]; }; /** List releases for a GitHub repository, newest first (includes drafts and prereleases). */ listReleases: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; perPage: z.ZodDefault>; page: z.ZodDefault>; maxPages: z.ZodOptional; detail: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof listReleasesCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** Get the latest published release for a GitHub repository (excludes drafts and prereleases). Body truncated by default. */ getLatestRelease: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; detail: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof getLatestReleaseCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** Get a specific release by ID, including its assets. Body truncated by default. */ getRelease: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; releaseId: z.ZodNumber; detail: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof getReleaseCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** Fetch a release plus the previous release and tag comparison in one call. */ getReleaseContext: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; releaseId: z.ZodOptional; includePrevious: z.ZodDefault>; includeCompare: z.ZodDefault>; detail: z.ZodDefault>>; }, z.core.$strip>; readonly core: typeof getReleaseContextCore; connectScopes: readonly ["contents:read", "metadata:read"]; }; /** Create a new release (and its tag if needed) in a GitHub repository. Requires approval by default. */ createRelease: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; tagName: z.ZodString; target: z.ZodOptional; name: z.ZodOptional; body: z.ZodOptional; draft: z.ZodDefault>; prerelease: z.ZodDefault>; generateReleaseNotes: z.ZodDefault>; }, z.core.$strip>; readonly core: typeof createReleaseCore; write: true; connectScopes: readonly ["contents:read", "contents:write", "metadata:read"]; }; /** Update an existing release — tag, target, title, notes, draft, or prerelease status. Requires approval by default. */ updateRelease: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; releaseId: z.ZodNumber; tagName: z.ZodOptional; target: z.ZodOptional; name: z.ZodOptional; body: z.ZodOptional; draft: z.ZodOptional; prerelease: z.ZodOptional; }, z.core.$strip>; readonly core: typeof updateReleaseCore; write: true; connectScopes: readonly ["contents:read", "contents:write", "metadata:read"]; }; /** Delete a release permanently. Requires approval by default. */ deleteRelease: { description: string; inputSchema: z.ZodObject<{ owner: z.ZodString; repo: z.ZodString; releaseId: z.ZodNumber; }, z.core.$strip>; readonly core: typeof deleteReleaseCore; write: true; connectScopes: readonly ["contents:read", "contents:write", "metadata:read"]; }; }; type GithubToolName = keyof typeof GITHUB_TOOL_CATALOG; /** Tool names whose catalog entry is marked `write: true`. */ type GithubWriteToolName = { [K in GithubToolName]: (typeof GITHUB_TOOL_CATALOG)[K] extends { write: true; } ? K : never; }[GithubToolName]; //#endregion //#region src/core/tool-names.d.ts /** * All GitHub tool names available via {@link createGithubTools}, keyed by name. * Derived from `GITHUB_TOOL_CATALOG` — the single source of truth for tools. */ declare const GITHUB_TOOL_NAMES: { [K in GithubToolName]: K; }; //#endregion //#region src/core/presets.d.ts /** * Predefined tool presets for common use cases. * Pass to {@link createGithubTools}, {@link createGithubAgent}, or {@link createDurableGithubAgent}. * Presets can be combined by passing an array. */ declare const PRESET_TOOLS: { /** * **Code review** — review pull requests and submit feedback. * * Tools: `getPullRequest`, `listPullRequests`, `listPullRequestFiles`, `listPullRequestReviews`, `listPullRequestReviewThreads`, `getPullRequestContext`, * `getFileContent`, `listCommits`, `getCommit`, `getBlame`, `compareCommits`, `getRepository`, `listBranches`, * `searchCode`, `listCheckRuns`, `getCombinedStatus`, `updatePullRequest`, `addPullRequestComment`, `updatePullRequestComment`, * `deletePullRequestComment`, `createPullRequestReview`, `replyToReviewComment`, `resolveReviewThread`, `requestReviewers`. * * Agent prompt: optimized for thorough PR review with inline feedback. */ readonly 'code-review': readonly ["getPullRequest", "listPullRequests", "listPullRequestFiles", "listPullRequestReviews", "listPullRequestReviewThreads", "getPullRequestContext", "getFileContent", "listCommits", "getCommit", "getBlame", "compareCommits", "getRepository", "listBranches", "searchCode", "listCheckRuns", "getCombinedStatus", "updatePullRequest", "addPullRequestComment", "updatePullRequestComment", "deletePullRequestComment", "createPullRequestReview", "replyToReviewComment", "resolveReviewThread", "requestReviewers"]; /** * **Issue triage** — manage and organize GitHub issues. * * Tools: `listIssues`, `getIssueContext`, `listIssueComments`, `createIssue`, `addIssueComment`, `updateIssueComment`, `deleteIssueComment`, * `closeIssue`, `updateIssue`, `addLabels`, `removeLabel`, `createLabel`, `updateLabel`, `deleteLabel`, * `addAssignees`, `removeAssignees`, * `listIssueReactions`, `addIssueReaction`, `listCommentReactions`, `addCommentReaction`, `getRepository`, * `searchRepositories`, `searchCode`, `searchIssues`. * * Prefer `getIssueContext` (issue + `labelNames` + recent comments) over separate get/list calls. * Use `listIssueComments` to paginate beyond the comments returned by `getIssueContext`. * Reopen a closed issue with `updateIssue` (`state: 'open'`) — there is no separate reopen tool. * Acknowledge a report with `addIssueReaction` / `addCommentReaction` instead of a comment when no reply is needed. * Agent prompt: optimized for categorizing, labeling, and responding to issues. */ readonly 'issue-triage': readonly ["listIssues", "getIssueContext", "listIssueComments", "createIssue", "addIssueComment", "updateIssueComment", "deleteIssueComment", "closeIssue", "updateIssue", "addLabels", "removeLabel", "createLabel", "updateLabel", "deleteLabel", "addAssignees", "removeAssignees", "listIssueReactions", "addIssueReaction", "listCommentReactions", "addCommentReaction", "getRepository", "searchRepositories", "searchCode", "searchIssues"]; /** * **CI operations** — monitor and manage GitHub Actions workflows. * * Tools: `getRepository`, `listBranches`, `listCommits`, `getCommit`, * `listWorkflows`, `listWorkflowRuns`, `getWorkflowRun`, `listWorkflowJobs`, `getWorkflowJobLogs`, `listCheckRuns`, `getCombinedStatus`, `getCiFailureContext`, * `triggerWorkflow`, `cancelWorkflowRun`, `rerunWorkflowRun`. * * Diagnose a failure with `getCiFailureContext` first, then read the failing job's output with `getWorkflowJobLogs`. * Agent prompt: optimized for diagnosing CI failures and managing workflow runs. */ readonly 'ci-ops': readonly ["getRepository", "listBranches", "listCommits", "getCommit", "listWorkflows", "listWorkflowRuns", "getWorkflowRun", "listWorkflowJobs", "getWorkflowJobLogs", "listCheckRuns", "getCombinedStatus", "getCiFailureContext", "triggerWorkflow", "cancelWorkflowRun", "rerunWorkflowRun"]; /** * **Repository explorer** — read-only access to browse codebases. * * Tools: all read-only tools including repos, branches, PRs, issues, discussions, commits, blame, comparisons, * search, gists, workflows, checks, and releases. No write operations. * * Agent prompt: optimized for answering questions about code structure and history. */ readonly 'repo-explorer': readonly ["getRepository", "listBranches", "getFileContent", "getRepositoryTree", "listPullRequests", "getPullRequest", "listPullRequestFiles", "listPullRequestReviews", "listPullRequestReviewThreads", "getPullRequestContext", "listIssues", "getIssue", "getIssueContext", "listIssueComments", "listDiscussions", "getDiscussion", "listLabels", "listCommits", "getCommit", "getBlame", "compareCommits", "searchCode", "searchRepositories", "searchIssues", "listGists", "getGist", "listGistComments", "listWorkflows", "listWorkflowRuns", "getWorkflowRun", "listWorkflowJobs", "getWorkflowJobLogs", "listCheckRuns", "getCombinedStatus", "getCiFailureContext", "listReleases", "getLatestRelease", "getRelease", "getReleaseContext"]; /** * **Security audit** — review repositories for security risks and report findings. * * Tools: read-only exploration (`getFileContent`, `getRepositoryTree`, `searchCode`, `searchIssues`, `listCommits`, `getCommit`, * `getBlame`, `compareCommits`), PR and CI visibility (`listPullRequests`, `getPullRequest`, `listPullRequestFiles`, * `getPullRequestContext`, `listCheckRuns`, `getCombinedStatus`, `getCiFailureContext`, `listWorkflows`, `listWorkflowRuns`, * `getWorkflowRun`, `listWorkflowJobs`, `getWorkflowJobLogs` — logs can leak secrets, so auditing them matters), * plus `createIssue`, `addIssueComment`, and `addLabels` to report findings. * No destructive writes. * * Agent prompt: optimized for finding and reporting security risks without making changes. */ readonly 'security-audit': readonly ["getRepository", "listBranches", "getFileContent", "getRepositoryTree", "listCommits", "getCommit", "getBlame", "compareCommits", "searchCode", "searchRepositories", "searchIssues", "listPullRequests", "getPullRequest", "listPullRequestFiles", "getPullRequestContext", "listCheckRuns", "getCombinedStatus", "getCiFailureContext", "listWorkflows", "listWorkflowRuns", "getWorkflowRun", "listWorkflowJobs", "getWorkflowJobLogs", "listIssues", "getIssue", "getIssueContext", "createIssue", "addIssueComment", "addLabels"]; /** * **Release manager** — prepare and publish GitHub releases. * * Tools: `getRepository`, `listBranches`, `listCommits`, `getCommit`, `compareCommits`, * `listReleases`, `getLatestRelease`, `getRelease`, `getReleaseContext`, `createRelease`, `updateRelease`, `deleteRelease`, * `listWorkflows`, `listWorkflowRuns`, `getWorkflowRun`, `listWorkflowJobs`, `triggerWorkflow`, * `listPullRequests`, `getPullRequest`. * * Agent prompt: optimized for summarizing changes and cutting releases safely. */ readonly 'release-manager': readonly ["getRepository", "listBranches", "listCommits", "getCommit", "compareCommits", "listReleases", "getLatestRelease", "getRelease", "getReleaseContext", "createRelease", "updateRelease", "deleteRelease", "listWorkflows", "listWorkflowRuns", "getWorkflowRun", "listWorkflowJobs", "triggerWorkflow", "listPullRequests", "getPullRequest"]; /** * **Discussion moderator** — answer and moderate repository Discussions. * * Tools: `listDiscussions`, `getDiscussion`, `addDiscussionComment`, * `getRepository`, `searchIssues`, `getIssueContext`, `addIssueComment`. * * Prefer discussions for Q&A; link related issues with `getIssueContext` / `addIssueComment` when needed. * Agent prompt: optimized for clear, on-topic discussion replies. */ readonly 'discussion-moderator': readonly ["listDiscussions", "getDiscussion", "addDiscussionComment", "getRepository", "searchIssues", "getIssueContext", "addIssueComment"]; /** * **Notification inbox** — triage authenticated-user notification threads. * * Tools: `listNotifications`, `markNotificationRead`, `getIssue`, `getPullRequest`, `getRepository`. * * Requires a user PAT with the Notifications account permission — not available on Connect installation tokens. * Agent prompt: optimized for clearing inbox noise and following up on actionable threads. */ readonly 'notification-inbox': readonly ["listNotifications", "markNotificationRead", "getIssue", "getPullRequest", "getRepository"]; /** * **PR author** — open pull requests without the full write surface. * * Tools: `getRepository`, `listBranches`, `getFileContent`, `createBranch`, `deleteBranch`, `createOrUpdateFile`, * `createPullRequest`, `updatePullRequest`, `getPullRequest`, `listPullRequestFiles`, * `listPullRequestReviewThreads`, `replyToReviewComment`, `resolveReviewThread`, * `compareCommits`, `getCommit`. * * Respond to review feedback with `listPullRequestReviewThreads` → `replyToReviewComment` → `resolveReviewThread`. * Agent prompt: optimized for branching, editing files, and opening focused PRs. */ readonly 'pr-author': readonly ["getRepository", "listBranches", "getFileContent", "createBranch", "deleteBranch", "createOrUpdateFile", "createPullRequest", "updatePullRequest", "getPullRequest", "listPullRequestFiles", "listPullRequestReviewThreads", "replyToReviewComment", "resolveReviewThread", "compareCommits", "getCommit"]; /** * **Maintainer** — full repository maintenance with all read and write tools. * * Tools: all tools (same as omitting `preset`). * * Agent prompt: optimized for day-to-day repo maintenance with careful write operations. */ readonly maintainer: readonly ["getRepository", "listBranches", "getFileContent", "getRepositoryTree", "createBranch", "deleteBranch", "forkRepository", "createRepository", "createOrUpdateFile", "listPullRequests", "getPullRequest", "listPullRequestFiles", "listPullRequestReviews", "listPullRequestReviewThreads", "getPullRequestContext", "createPullRequest", "mergePullRequest", "updatePullRequest", "addPullRequestComment", "updatePullRequestComment", "deletePullRequestComment", "createPullRequestReview", "replyToReviewComment", "resolveReviewThread", "requestReviewers", "listIssues", "getIssue", "getIssueContext", "listIssueComments", "createIssue", "addIssueComment", "updateIssueComment", "deleteIssueComment", "closeIssue", "updateIssue", "listLabels", "addLabels", "removeLabel", "createLabel", "updateLabel", "deleteLabel", "addAssignees", "removeAssignees", "listIssueReactions", "addIssueReaction", "listCommentReactions", "addCommentReaction", "listDiscussions", "getDiscussion", "addDiscussionComment", "listNotifications", "markNotificationRead", "listCommits", "getCommit", "getBlame", "compareCommits", "searchCode", "searchRepositories", "searchIssues", "listGists", "getGist", "listGistComments", "createGist", "updateGist", "deleteGist", "createGistComment", "listWorkflows", "listWorkflowRuns", "getWorkflowRun", "listWorkflowJobs", "getWorkflowJobLogs", "triggerWorkflow", "cancelWorkflowRun", "rerunWorkflowRun", "listCheckRuns", "getCombinedStatus", "getCiFailureContext", "listReleases", "getLatestRelease", "getRelease", "getReleaseContext", "createRelease", "updateRelease", "deleteRelease"]; }; type GithubToolPreset = keyof typeof PRESET_TOOLS; /** Tool names included in a single preset. */ type PresetToolName

= Extract<(typeof PRESET_TOOLS)[P][number], GithubToolName>; /** Tool names included when combining multiple presets. */ type CombinedPresetToolNames

= PresetToolName; //#endregion //#region src/core/write-tools.d.ts /** * GitHub tools that perform write operations and require approval by default. * Derived from the `write: true` entries of `GITHUB_TOOL_CATALOG`. */ declare const GITHUB_WRITE_TOOLS: { [K in GithubWriteToolName]: K; }; //#endregion //#region src/core/approval.d.ts /** * Whether write operations require user approval. * * - `true` — all write tools need approval (default) * - `false` — no approval needed for any write tool * - object — per-tool override via {@link GithubWriteToolName}; unspecified write tools default to `true` * * @example Global disable * ```ts * createGithubTools({ token, requireApproval: false }) * ``` * * @example Granular per write tool * ```ts * createGithubTools({ * token, * requireApproval: { * mergePullRequest: true, * createOrUpdateFile: true, * addPullRequestComment: false, * }, * }) * ``` */ type ApprovalConfig = boolean | Partial>; //#endregion //#region src/core/context.d.ts /** * Default repository / issue / PR / ref values applied to tool inputs and * injected into agent system prompts. * * When a field is set here, matching tool schema fields become optional and * default to this value if the model omits them. */ type GithubToolsContext = { owner?: string; repo?: string; pullNumber?: number; issueNumber?: number; ref?: string; }; //#endregion //#region src/core/token.d.ts type GithubTokenInput = string | (() => Promise); /** Resolves a {@link GithubTokenInput} to a token string. */ declare function resolveGithubToken(token?: GithubTokenInput): Promise; //#endregion //#region src/core/tool-types.d.ts /** Full tool set returned when no `preset` is specified. */ type AllGithubTools = Record; /** Base options shared by all {@link createGithubTools} overloads. */ type GithubToolsBaseOptions = { /** GitHub token string or async provider. Falls back to `process.env.GITHUB_TOKEN` when omitted. */ token?: GithubTokenInput; /** Control whether write operations require user approval. @see {@link ApprovalConfig} */ requireApproval?: ApprovalConfig; /** * Default owner / repo / PR / issue / ref values. * Softens matching tool input fields and fills them when the model omits them. * Also injected into agent system prompts via {@link createGithubAgent}. */ context?: GithubToolsContext; /** Per-tool overrides for description, title, needsApproval, and related AI SDK tool fields. */ overrides?: Partial>; /** Default author for commit-creating tools. Falls back to the authenticated user when omitted. */ author?: CommitIdentity; /** Default committer for commit-creating tools. Falls back to the authenticated user when omitted. */ committer?: CommitIdentity; /** Co-authors to attribute on all commits created by tools. */ coAuthors?: CommitIdentity[]; }; /** Tool set shape for a given preset option (single, combined, or all tools). */ type GithubToolsForPreset

= P extends GithubToolPreset ? Pick & GithubToolName> : P extends readonly GithubToolPreset[] ? Pick & GithubToolName> : AllGithubTools; /** Pick a subset of GitHub tools by tool name. */ type PickGithubTools = Pick; //#endregion export { ToolOverrides as S, CommitIdentity as _, GithubTokenInput as a, Octokit$1 as b, ApprovalConfig as c, GithubToolPreset as d, PRESET_TOOLS as f, GithubWriteToolName as g, GithubToolName as h, PickGithubTools as i, GITHUB_WRITE_TOOLS as l, GITHUB_TOOL_NAMES as m, GithubToolsBaseOptions as n, resolveGithubToken as o, PresetToolName as p, GithubToolsForPreset as r, GithubToolsContext as s, AllGithubTools as t, CombinedPresetToolNames as u, CommitToolOptions as v, ToolOptions as x, GithubTool as y }; //# sourceMappingURL=tool-types-BsfalcyC.d.mts.map