import type { WorkflowMaxSteps, WorkflowResumePointEntry, WorkflowStep } from '../../models/types.js';
import type { JudgeStageEntry, PhaseName, PhasePromptParts, StepProviderInfo, StepRunResult } from '../types.js';
export interface WorkflowSpanParams {
    enabled: boolean;
    runId?: string;
    workflowName: string;
    initialStep: string;
    stepCount: number;
    maxSteps: WorkflowMaxSteps;
    runMode: 'full' | 'single_iteration';
    resumeDepth: number;
    sanitizeText?: (text: string) => string;
}
export interface WorkflowSpanOutcome {
    status?: string;
    abortKind?: string;
    abortReason?: string;
    nextStep?: string;
    iterations?: number;
}
export interface StepSpanParams {
    enabled: boolean;
    runId?: string;
    workflowName: string;
    step: WorkflowStep;
    iteration: number;
    stepIteration?: number;
    instruction?: string;
    workflowStack?: WorkflowResumePointEntry[];
    sanitizeText?: (text: string) => string;
    providerInfo?: StepProviderInfo;
    getFinalStepIteration?: () => number | undefined;
}
export interface PhaseSpanParams {
    enabled: boolean;
    runId?: string;
    workflowName: string;
    step: WorkflowStep;
    iteration?: number;
    phase: 1 | 2 | 3;
    phaseName: PhaseName;
    instruction?: string;
    phaseExecutionId?: string;
    workflowStack?: WorkflowResumePointEntry[];
    sanitizeText?: (text: string) => string;
    providerInfo?: StepProviderInfo;
    getPromptParts?: () => PhasePromptParts | undefined;
}
export interface PhaseSpanOutcome {
    status?: string;
    content?: string;
    error?: string;
    matchedRuleIndex?: number;
    matchedRuleMethod?: string;
}
export interface JudgeStageSpanParams {
    enabled: boolean;
    runId?: string;
    workflowName: string;
    step: WorkflowStep;
    iteration?: number;
    phaseExecutionId?: string;
    workflowStack?: WorkflowResumePointEntry[];
    entry: JudgeStageEntry;
    sanitizeText?: (text: string) => string;
}
export declare function runWithWorkflowSpan<T>(params: WorkflowSpanParams, execute: () => Promise<T>, getOutcome: (result: T) => WorkflowSpanOutcome): Promise<T>;
export declare function runWithStepSpan(params: StepSpanParams, execute: () => Promise<StepRunResult>): Promise<StepRunResult>;
export declare function runWithPhaseSpan<T>(params: PhaseSpanParams, execute: () => Promise<T>, getOutcome: (result: T) => PhaseSpanOutcome): Promise<T>;
export declare function recordJudgeStageSpan(params: JudgeStageSpanParams): void;
//# sourceMappingURL=workflowSpans.d.ts.map