import { type DataProfile } from '../spec/data-profile.js';
import type { Intent } from '../spec/intent.js';
export type TraceCandidate = {
    id: string;
    score: number;
    reasons: string[];
};
export type TraceRejection = {
    id: string;
    reason: string;
};
/** What the host did with the decision. `held` and `rejected` are previews, not blocks. */
export declare const TRACE_OUTCOMES: readonly ["rendered", "held", "rejected"];
export type TraceOutcome = (typeof TRACE_OUTCOMES)[number];
/** Who picked the chart that was drawn. */
export declare const TRACE_CHOOSERS: readonly ["jev", "engine", "named"];
export type TraceChooser = (typeof TRACE_CHOOSERS)[number];
/** The drawing, separate from the engine's candidate list. */
export type TraceChoice = {
    id: string;
    by: TraceChooser;
    why: string;
};
/**
 * Closed bands. `low` may run with the workspace. `held` is a preview until
 * someone approves it. A spec cannot choose either value.
 */
export declare const TRACE_RISK_BANDS: readonly ["low", "held"];
export type TraceRiskBand = (typeof TRACE_RISK_BANDS)[number];
/** One catalog action. The band is filled by the risk table, never by the spec. */
export type TraceRisk = {
    action: string;
    band: TraceRiskBand;
};
/**
 * Preview of a held action. Null when nothing is held.
 * This is not an execution record and must not carry dataset rows.
 */
export type TraceProposal = {
    /** Stable id `proposal:<action>`. Audit records use this, not a fresh uuid. */
    id: string;
    action: string;
    preview: string;
};
/**
 * JSON-serializable decision record. Never includes dataset rows.
 * Stage 3 fields stay required. Stage 4 adds `risk`, `proposals`, `proposal`, and `outcome`.
 */
export type Trace = {
    objective: Intent;
    profile: DataProfile;
    candidates: TraceCandidate[];
    rejections: TraceRejection[];
    actions: string[];
    tieBreak: string;
    risk: TraceRisk[];
    /** Every held catalog action, in catalog order. Empty when nothing is held. */
    proposals: TraceProposal[];
    /** First held action. Same object as `proposals[0]`, null when the list is empty. */
    proposal: TraceProposal | null;
    outcome: TraceOutcome;
    /** The chart that was drawn, and who picked it. Absent on older traces. */
    chosen?: TraceChoice;
};
/**
 * Blank governance fields, before `governTrace` classifies catalog actions.
 * An empty `risk` is "not classified yet", not "every action is low".
 * `outcome: rendered` is only this blank default. A held action leaves `governTrace` as `held`.
 */
export declare function stage4TraceDefaults(): Pick<Trace, 'risk' | 'proposals' | 'proposal' | 'outcome'>;
export declare function closedProfile(profile: DataProfile): DataProfile;
export declare function assertTraceHasNoRows(trace: Trace): void;
