import type { AgentEvent, Provider, ProviderResponseFormat } from "../providers/ProviderTypes.js"; import type { ToolContext } from "../tools/ToolTypes.js"; import { ToolRegistry } from "../tools/ToolRegistry.js"; import type { RunLogger } from "../runtime/RunLogger.js"; import { type RunnerResult } from "../runtime/Runner.js"; import type { ContextBundle, ContextRequest, PatchFailureClassification, Plan } from "./Types.js"; import { type PatchAction, type PatchFormat } from "./BuilderOutputParser.js"; import { PatchApplier } from "./PatchApplier.js"; import type { ContextManager } from "./ContextManager.js"; import type { PatchInterpreterClient } from "./PatchInterpreter.js"; export interface BuilderRunResult extends RunnerResult { contextRequest?: ContextRequest; touchedFiles?: string[]; } export interface PatchApplyFailure { source: string; error: string; reasonCode?: string; diagnostics?: Record; classification?: PatchFailureClassification; attemptHistory?: string[]; patches: PatchAction[]; rollback: { attempted: boolean; ok: boolean; error?: string; }; rawOutput: string; } export declare class PatchApplyError extends Error { readonly details: PatchApplyFailure; constructor(details: PatchApplyFailure); } export interface BuilderRunnerOptions { provider: Provider; tools: ToolRegistry; context: ToolContext; maxSteps: number; maxToolCalls: number; maxTokens?: number; timeoutMs?: number; temperature?: number; responseFormat?: ProviderResponseFormat; logger?: RunLogger; mode?: "tool_calls" | "patch_json" | "freeform"; patchFormat?: PatchFormat; patchApplier?: PatchApplier; interpreter?: PatchInterpreterClient; fallbackToInterpreter?: boolean; allowDestructiveOperations?: boolean; contextManager?: ContextManager; laneId?: string; model?: string; stream?: boolean; onEvent?: (event: AgentEvent) => void; onToken?: (token: string) => void; streamFlushMs?: number; } export declare class BuilderRunner { private options; constructor(options: BuilderRunnerOptions); setProvider(provider: Provider, options?: { model?: string; temperature?: number; responseFormat?: ProviderResponseFormat; mode?: "tool_calls" | "patch_json" | "freeform"; }): void; private isToolSupportError; run(plan: Plan, contextBundle: ContextBundle, options?: { contextManager?: ContextManager; laneId?: string; model?: string; note?: string; }): Promise; } //# sourceMappingURL=BuilderRunner.d.ts.map