import type { WorkflowDispatchMatrixTier } from '../../config/dispatch-matrix.js';
import type { IdentityProvenance } from './provenance.js';
import type { DispatchAction, DispatchRole, DispatchStampRecord } from './stamp.js';
export type DispatchReportPolicyStatus = 'resolved' | 'unresolved' | 'blocked';
export type DispatchReportPolicyMode = 'managed' | 'inherit' | null;
export interface ResolvedDispatchTargetReport {
    harness: string;
    model?: string;
    effort?: string;
    crossHarness: boolean;
    routeIndex: number;
    routeLength: number;
}
export interface DispatchControlRequest {
    value: string | null;
    mechanism: 'task-model-argument' | 'materialized-role' | 'base-role' | 'provider-default' | 'host-inherited' | 'not-applicable';
    reason: string;
}
export interface DispatchRequestedControls {
    model: DispatchControlRequest;
    effort: DispatchControlRequest;
}
export interface DispatchConfiguredDefaults {
    model: string | null;
    modelSource: string | null;
    effort: string | null;
    effortSource: string | null;
}
export interface DispatchGateInvocation {
    readonly runId: string;
    readonly targetId: string;
    readonly runtime: string;
    readonly model: string;
    readonly reasoningEffort: string;
    readonly source: 'exec-target-config' | 'unknown';
}
export interface DispatchRuntimeIdentity {
    producer: string | null;
    model: string | null;
    effort: string | null;
    provenance: IdentityProvenance;
    confidence: string;
}
export interface DispatchReportSelectionInput {
    role: DispatchRole;
    requestedCandidate: {
        model: string;
        effort?: string;
    } | null;
    candidateTier: WorkflowDispatchMatrixTier | null;
    candidateIndex: number | null;
    ceilingTier: WorkflowDispatchMatrixTier | null;
    ceilingTarget: ResolvedDispatchTargetReport | null;
    selectedValue: string | null;
    selectionMode: string;
    selectionBranch: string;
    target: ResolvedDispatchTargetReport | null;
    cellSource: string | null;
}
export interface DispatchReportProviderResolution {
    dispatchArgs: {
        variant?: string;
        model?: string;
    } | null;
    selection: DispatchReportSelectionInput;
}
export interface DispatchReportResolution {
    status: DispatchReportPolicyStatus;
    provider: string;
    value: string | null;
    policyMode: DispatchReportPolicyMode;
    policy: string | null;
    source: string | null;
    providers: Record<string, DispatchReportProviderResolution>;
}
export interface DispatchReportV1 {
    schemaVersion: 1;
    route: {
        scope: string;
        action: DispatchAction;
        role: DispatchRole;
        target: string;
    };
    policy: {
        status: DispatchReportPolicyStatus;
        mode: DispatchReportPolicyMode;
        name: string | null;
        source: string | null;
    };
    selection: {
        requestedCandidate: {
            model: string;
            effort?: string;
        } | null;
        candidateTier: WorkflowDispatchMatrixTier | null;
        candidateIndex: number | null;
        ceilingTier: WorkflowDispatchMatrixTier | null;
        ceilingTarget: ResolvedDispatchTargetReport | null;
        selectedValue: string | null;
        exactSelectedTarget: ResolvedDispatchTargetReport | null;
        selectionMode: string;
        selectionBranch: string;
        cellSource: string | null;
    };
    requestedControls: DispatchRequestedControls;
    configuredDefaults: DispatchConfiguredDefaults;
    gateInvocation: Readonly<DispatchGateInvocation> | null;
    runtimeIdentity: DispatchRuntimeIdentity;
}
export interface DispatchReportInput {
    scope: string;
    action: DispatchAction;
    role: DispatchRole;
    resolution: DispatchReportResolution;
    requestedControls: DispatchRequestedControls;
    configuredDefaults: DispatchConfiguredDefaults;
    gateInvocation?: DispatchGateInvocation | null;
    runtimeIdentity?: DispatchRuntimeIdentity;
}
export declare function buildDispatchReport(input: DispatchReportInput): DispatchReportV1;
export declare function serializeDispatchReport(report: DispatchReportV1): string;
export declare function formatDispatchReport(report: DispatchReportV1): string;
export declare function toDispatchStampRecord(report: DispatchReportV1): DispatchStampRecord;
//# sourceMappingURL=dispatch-report.d.ts.map