import { type PullRequestFileV1, type PullRequestPacketV1 } from "../../deep-review/packet.js"; import type { GitHubClient } from "./client.js"; export type GitRunner = (executable: string, args: readonly string[], cwd: string, env: NodeJS.ProcessEnv) => Promise<{ stdout: string; stderr: string; exitCode: number; }>; export declare const TRUSTED_REPOSITORY_RULE_PATHS: readonly ["AGENTS.md", "CONTRIBUTING.md", "docs/ARCHITECTURE.md", "docs/CONVENTIONS.md", "docs/SECURITY.md", "docs/TESTING.md"]; export declare const SAFE_GIT_CONFIG: readonly ["-c", `core.hooksPath=${string}`, "-c", "core.pager=", "-c", "core.editor=true", "-c", "core.fsmonitor=", "-c", "core.useBuiltinFSMonitor=false", "-c", "core.sshCommand=", "-c", "core.gitProxy=", "-c", `core.attributesFile=${string}`, "-c", "diff.external=", "-c", "diff.tool=", "-c", "merge.tool=", "-c", "credential.helper=", "-c", "filter.lfs.smudge=", "-c", "filter.lfs.clean=", "-c", "filter.lfs.process=", "-c", "submodule.recurse=false", "-c", "protocol.file.allow=never", "-c", "protocol.ext.allow=never"]; export declare function gitCollectEnvironment(): NodeJS.ProcessEnv; export declare function gitArgsKey(args: readonly string[]): string; export declare function runGitCollect(gitExecutable: string, args: readonly string[], cwd: string, gitRunner: GitRunner): Promise<{ stdout: string; stderr: string; exitCode: number; }>; export declare function resolveLocalHeadSha(sourceDir: string, gitExecutable: string, gitRunner: GitRunner): Promise; export declare function verifyMergeBaseAvailable(sourceDir: string, baseSha: string, headSha: string, gitExecutable: string, gitRunner: GitRunner): Promise; export interface GitChangedFile { readonly path: string; readonly previousPath?: string; readonly status: PullRequestFileV1["status"]; readonly patch?: string; readonly contentKind: "text" | "binary"; readonly additions: number; readonly deletions: number; } export declare function collectGitChangedFiles(sourceDir: string, baseSha: string, headSha: string, gitExecutable: string, gitRunner: GitRunner): Promise; interface NameStatusEntry { readonly path: string; readonly previousPath?: string; readonly status: PullRequestFileV1["status"]; readonly additions: number; readonly deletions: number; } export declare function parseNameStatus(output: string): NameStatusEntry[]; export declare function isGitBinaryPatch(patch: string): boolean; export declare function discoverRepositoryRulePaths(changedPaths: readonly string[]): readonly string[]; export declare function collectRepositoryRules(sourceDir: string, baseSha: string, headSha: string, gitExecutable: string, gitRunner: GitRunner, changedPaths?: readonly string[]): Promise; export declare function defaultGitRunnerCollect(executable: string, args: readonly string[], cwd: string, env: NodeJS.ProcessEnv): Promise<{ stdout: string; stderr: string; exitCode: number; }>; export interface CollectPullRequestPacketOptions { readonly sourceDir: string; readonly owner: string; readonly repo: string; readonly pullNumber: number; readonly expectedHeadSha: string; readonly outputPath: string; readonly github: GitHubClient; readonly gitExecutable: string; readonly gitRunner: GitRunner; readonly additionalBotAuthorIds?: readonly string[]; } export interface CollectPullRequestPacketResult { readonly packet: PullRequestPacketV1; readonly outputPath: string; } export declare function collectPullRequestPacket(options: CollectPullRequestPacketOptions): Promise; export {}; //# sourceMappingURL=collect.d.ts.map