import type { TCloud } from '@tangle-network/tcloud';
import type { ProductClient } from './client';
import type { DriverResult, DriverState, PersonaConfig } from './types';
export interface AgentDriverConfig {
    client: ProductClient;
    driverModel?: string;
    /** System prompt context for the driver LLM to understand the product */
    productContext?: string;
}
/**
 * AgentDriver — meta-agent that plays a persona against the real product.
 *
 * Uses a driver LLM (Claude/GPT-4o) to decide what to say each turn.
 * Not scripted — the driver gets the current product state and decides
 * the next realistic user message.
 */
export declare class AgentDriver {
    private tc;
    private client;
    private driverModel;
    private productContext;
    constructor(tc: TCloud, config: AgentDriverConfig);
    /**
     * Run a persona through the product.
     *
     * Returns metrics on how many turns to completion, cost curve,
     * quality curve, and convergence curve.
     */
    run(persona: PersonaConfig): Promise<DriverResult>;
    /** Use the driver LLM to decide what the "user" says next */
    private decideNextMessage;
    /** Handle pending approvals based on persona feedback patterns */
    private handleApprovals;
}
/**
 * Build the driver LLM's system prompt. The simulated user is an
 * adversarial senior professional: it judges the agent's last response by a
 * professional standard, refuses vague answers, challenges undefended
 * claims, probes the persona's pressure points without revealing them, and
 * signs off (DONE) only when a real practitioner would act on the work
 * unmodified. Pure function of persona, product state, and product context
 * — exported so harness authors can inspect and regression-test it.
 */
export declare function buildDriverSystemPrompt(persona: PersonaConfig, state: DriverState, productContext?: string): string;
export interface WorkerDriverContext {
    /** The goal (or sub-goal) the driven worker must actually accomplish. */
    goal: string;
    /** The worker's harness — e.g. 'claude-code' | 'codex' | 'opencode' | 'router-tools'.
     *  Names which capability profile the driver should exploit. */
    harness?: string;
    /** A capability + caveat brief for THIS harness (parallel tool calls, sub-agents and
     *  their depth/concurrency limits, autonomy/runaway profile, MCP, native tool-isolation)
     *  — sourced from the harness-compat matrix. Free text so the substrate stays decoupled
     *  from any runtime harness type. */
    harnessBrief?: string;
    /** What the worker has done so far — the trace/state summary the driver reasons over to
     *  write its next instruction. Empty on the first turn. */
    progress?: string;
    /** Optional extra context (repo, constraints, the deliverable's acceptance check). */
    context?: string;
}
/**
 * Build the WORKER-DRIVER system prompt — the harness-aware sibling of
 * `buildDriverSystemPrompt`. Where that one role-plays a demanding *user* of a
 * product, this one is a meta-agent that DRIVES a capable coding *worker* to
 * complete a goal: it writes rich, high-signal instructions that direct the
 * worker to exploit its harness's full power (parallelize, sub-agents, run-to-
 * completion, tools/MCP), matched to what THAT harness can actually do. The
 * load-bearing contract: the driver never writes a thin steer — every message
 * is the dense, specific directive a world-class engineering lead would write.
 * Pure function; exported so harness authors can inspect and regression-test it.
 */
export declare function buildWorkerDriverSystemPrompt(ctx: WorkerDriverContext): string;
export interface DecideNextUserTurnOpts {
    persona: PersonaConfig;
    state: DriverState;
    /** Conversation so far — alternating user/assistant messages, oldest first. */
    history: {
        role: string;
        content: string;
    }[];
    /** Optional product context woven into the driver prompt. */
    productContext?: string;
    /** Driver LLM model. Defaults to claude-sonnet-4-6. */
    model?: string;
}
/**
 * Decide the simulated user's next turn — the reactive, adversarial
 * turn-generation core of `AgentDriver`, exposed standalone so an in-process
 * eval harness can drive multi-shot conversations without the `ProductClient`
 * workspace machinery. Returns the next user message, or the literal "DONE"
 * when the simulated professional would sign off.
 */
export declare function decideNextUserTurn(tc: TCloud, opts: DecideNextUserTurnOpts): Promise<string>;
//# sourceMappingURL=driver.d.ts.map