import type { CodebaseInterface, WorkspaceInterface } from '../codebase/contracts.js'; import type { AIProvider } from './ai-provider.js'; import type { Incident, ResolutionResult } from './types.js'; export interface BugResolverOptions { /** Read-only view of the repository, used for investigation. Should index the same commit the workspaces start from. */ codebase: CodebaseInterface; /** The only way the resolver changes code: each attempt gets its own isolated workspace. */ workspaces: WorkspaceInterface; ai: AIProvider; /** Fix attempts before giving up. Defaults to 3; at most HARD_MAX_ATTEMPTS. */ maxAttempts?: number; /** Edits to matching paths are refused, so a human has to make them. Defaults to DEFAULT_FORBIDDEN_PATHS. */ forbiddenPaths?: RegExp[]; /** Exact secret values (the server's own keys and token). A fix that contains one is refused. Known credential formats always are. */ secretValues?: string[]; /** Called at the start of each stage (clone, investigate, each attempt's propose/patch/test/build). For progress output; never throws from here. */ onProgress?: (event: string) => void; } /** CI config, secrets, lockfiles, and the code where a wrong fix costs the most: auth, payments, migrations. */ export declare const DEFAULT_FORBIDDEN_PATHS: RegExp[]; /** No configuration can make the resolver try more fixes than this for one incident. */ export declare const HARD_MAX_ATTEMPTS = 5; /** * Takes one incident from bug report to a reviewable fix: * reproduce → investigate → propose fix → patch → test → build, retrying with the failure until a * fix passes or the attempt budget runs out. * * Every attempt starts from a fresh workspace, so a failed patch never leaks into the next one. * The resolver never commits, merges, pushes or deploys: a passing fix ends as READY_FOR_REVIEW, * with its diff and the workspace that holds it. */ export declare class BugResolver { private options; private readonly maxAttempts; private readonly onProgress; constructor(options: BugResolverOptions); resolve(incident: Incident): Promise; private attempt; /** Explores the codebase for the incident and reads the files it and the stack trace point at. Never throws. */ private gatherContext; private readWorkspaceFiles; } //# sourceMappingURL=bug-resolver.d.ts.map