import type { StepCompletionDecision, TrajectoryConfig, WorkflowStep } from './types.js';
interface StepParticipants {
    role?: string;
    owner?: string;
    specialist?: string;
    reviewer?: string;
}
export interface StepOutcome {
    name: string;
    agent: string;
    status: 'completed' | 'failed' | 'skipped';
    attempts: number;
    output?: string;
    error?: string;
    verificationPassed?: boolean;
    verificationValue?: string;
    nonInteractive?: boolean;
    durationMs?: number;
    completionMode?: StepCompletionDecision['mode'];
}
export declare class WorkflowTrajectory {
    private trajectory;
    private storage?;
    private storageInit?;
    private readonly enabled;
    private readonly reflectOnBarriers;
    private readonly reflectOnConverge;
    private readonly autoDecisions;
    private readonly storageBaseDir;
    private readonly runId;
    private startTime;
    private swarmPattern;
    constructor(config: TrajectoryConfig | false | undefined, runId: string, cwd: string);
    start(workflowName: string, stepCount: number, trackInfo?: string, description?: string, pattern?: string): Promise<void>;
    beginTrack(trackName: string): Promise<void>;
    beginConvergence(label: string): Promise<void>;
    stepStarted(step: WorkflowStep, agent: string, participants?: StepParticipants): Promise<void>;
    registerAgent(name: string, role: string): Promise<void>;
    stepSupervisionAssigned(step: WorkflowStep, supervised: {
        owner: {
            name: string;
        };
        specialist: {
            name: string;
        };
        reviewer?: {
            name: string;
        };
    }): Promise<void>;
    ownerMonitoringEvent(stepName: string, owner: string, detail: string, raw?: Record<string, unknown>): Promise<void>;
    reviewCompleted(stepName: string, reviewerName: string, decision: 'approved' | 'rejected', reason?: string): Promise<void>;
    stepCompletionDecision(stepName: string, decision: StepCompletionDecision): Promise<void>;
    stepCompleted(step: WorkflowStep, output: string, attempt: number, decision?: StepCompletionDecision): Promise<void>;
    stepFailed(step: WorkflowStep, error: string, attempt: number, maxRetries: number, outcome?: Partial<StepOutcome>): Promise<void>;
    stepSkipped(step: WorkflowStep, reason: string): Promise<void>;
    stepRetrying(step: WorkflowStep, attempt: number, maxRetries: number): Promise<void>;
    reflect(synthesis: string, confidence: number, focalPoints?: string[]): Promise<void>;
    synthesizeAndReflect(label: string, outcomes: StepOutcome[], unblocks?: string[]): Promise<void>;
    decide(question: string, chosen: string, reasoning: string): Promise<void>;
    complete(summary: string, confidence: number, meta?: {
        learnings?: string[];
        challenges?: string[];
    }): Promise<void>;
    abandon(reason: string, meta?: {
        summary?: string;
        confidence?: number;
        learnings?: string[];
        challenges?: string[];
    }): Promise<void>;
    isEnabled(): boolean;
    shouldReflectOnConverge(): boolean;
    shouldReflectOnBarriers(): boolean;
    getTrajectoryId(): string | null;
    buildSynthesis(label: string, outcomes: StepOutcome[], unblocks?: string[]): string;
    computeConfidence(outcomes: StepOutcome[]): number;
    buildRunSummary(outcomes: StepOutcome[]): string;
    extractLearnings(outcomes: StepOutcome[]): string[];
    extractChallenges(outcomes: StepOutcome[]): string[];
    private openChapter;
    private addEvent;
    private buildApproach;
    private formatCompletionEvidenceSummary;
    private ensureStorage;
    private flush;
}
export {};
//# sourceMappingURL=trajectory.d.ts.map