import type { ThinkingLevel } from "@ch1nyzzz/pi-agent-core"; import { type CodeBuilderSnapshot } from "../code/worktree.ts"; import type { EvoPaths } from "../paths.ts"; import { type DraftProposal } from "../proposal.ts"; import type { EvidenceCorpus } from "../reflect/evidence.ts"; import type { ModelRunner, ModelRunResult } from "../reflect/model-runner.ts"; import type { EvolutionResearchPlan } from "../types.ts"; import type { MaterializedCorpus } from "./research-corpus.ts"; import { type UnknownAbiBuilderRequest } from "./unknown-abi.ts"; export interface RunEvolutionBuilderOptions { paths: EvoPaths; runId: string; plan: EvolutionResearchPlan; parentDigest: string; corpus: Pick; /** On-disk corpus tree; when present the prompt carries only its index. */ materializedCorpus?: MaterializedCorpus; runner: ModelRunner; cwd: string; agentDir?: string; model: string; thinkingLevel?: ThinkingLevel; activePreferences?: string; /** Stable provider session identity so retries hit the provider prompt cache. */ sessionIdentity?: string; signal?: AbortSignal; } export interface EvolutionBuilderResult { draft: DraftProposal; observationsMarkdown: string; run: ModelRunResult; codeBase?: Pick; } export interface UnknownAbiBuilderSubmission { observationsMarkdown: string; proposal: { motivation: string; expectedEffect: string; risk: string; verifyPlan: string; codePatch: string; }; } export interface RunUnknownAbiBuilderOptions { paths: EvoPaths; plan: EvolutionResearchPlan; request: UnknownAbiBuilderRequest; runner: ModelRunner; cwd: string; agentDir?: string; model: string; thinkingLevel?: ThinkingLevel; sessionIdentity: string; signal?: AbortSignal; } export interface UnknownAbiBuilderResult { draft: DraftProposal; observationsMarkdown: string; run: ModelRunResult; } export declare function parseUnknownAbiBuilderSubmission(value: unknown, request: UnknownAbiBuilderRequest): UnknownAbiBuilderSubmission; export declare function runEvolutionBuilder(options: RunEvolutionBuilderOptions): Promise; export declare function runUnknownAbiBuilder(options: RunUnknownAbiBuilderOptions): Promise; //# sourceMappingURL=builder.d.ts.map