import { type GitHubApiOptions } from "#public/channels/github/api.js"; import type { GitHubChannelCredentials } from "#public/channels/github/auth.js"; /** * Built-in glob patterns excluded from the diff loaded into model context. * * These files are large and generated; their patch text seldom helps the model * and consumes context budget. They are still listed with their stats so the * agent knows they changed, and the full file is always available from the * checkout. */ export declare const GITHUB_DEFAULT_EXCLUDED_DIFF_FILES: readonly string[]; /** Controls the pull-request diff injected into GitHub-triggered turns. */ export interface GitHubPullRequestContextConfig { /** * Additional glob patterns excluded from the diff loaded into model context. * Extends the built-in {@link GITHUB_DEFAULT_EXCLUDED_DIFF_FILES} list; it * does not replace it. Excluded files are still listed with their stats; only * the patch body is omitted. */ readonly excludedFiles?: readonly string[]; } /** Input for building one-shot model context for a pull request. */ export interface GitHubPullRequestContextInput { readonly api?: GitHubApiOptions; readonly config?: GitHubPullRequestContextConfig; readonly credentials?: GitHubChannelCredentials; readonly installationId?: number; readonly owner: string; readonly pullRequestNumber: number | null; readonly repo: string; } /** * Builds bounded, one-shot pull-request background for a GitHub turn: PR * metadata plus the changed-file diff (noisy files excluded from the patch). * * The returned strings are intended for `SendPayload.context`; each is appended * as a `role: "user"` message to session history before the delivery message. */ export declare function buildGitHubPullRequestContext(input: GitHubPullRequestContextInput): Promise; /** Merges channel-generated PR context before hook-provided context. */ export declare function mergeGitHubContext(input: { readonly github?: readonly string[]; readonly hook?: readonly string[]; }): readonly string[] | undefined; /** Returns true when a file path matches any of the provided glob patterns. */ export declare function fileMatchesAnyGlob(filename: string, patterns: readonly string[]): boolean;