import type { ComparisonManifest, SectionIndex } from "./design-comparison.ts"; export declare const FEEDBACK_OPERATIONS: readonly ["replace", "insert", "remove", "preserve", "avoid"]; export declare const FEEDBACK_FACETS: readonly ["composition", "copy", "media", "style", "behavior"]; export declare const FEEDBACK_PRIORITIES: readonly ["must", "preference"]; export type FeedbackOperation = (typeof FEEDBACK_OPERATIONS)[number]; export type FeedbackFacet = (typeof FEEDBACK_FACETS)[number]; export type FeedbackPriority = (typeof FEEDBACK_PRIORITIES)[number]; export type FeedbackSource = { candidateId: string; buildHash: string; route: string; sectionId: string; }; export type FeedbackTarget = { route: string; sectionId?: string; before?: string; after?: string; }; export type FeedbackChoice = { id: string; operation: FeedbackOperation; source?: FeedbackSource; target?: FeedbackTarget; facets: FeedbackFacet[]; preserve?: string[]; adaptation?: string; priority: FeedbackPriority; note?: string; styleException?: string; }; export type DesignFeedback = { schemaVersion: 1; feedbackId: string; runId: string; comparisonRevision: string; comparisonHash: string; supersedes?: string; idempotencyKey?: string; actor: { type: string; id: string; }; baseCandidateId: string; themeCandidateId: string; noneOfThese?: boolean; choices: FeedbackChoice[]; globalNotes?: string; pageNotes?: Record; preserve?: string[]; avoid?: string[]; submission: "synthesize" | "draft" | "revise-directions"; rawText?: string; }; export type FeedbackInterpretation = { schemaVersion: 1; revision: string; feedbackId: string; comparisonHash: string; kind: "operator" | "ai-interpretation"; unresolved: { question: string; conflict?: string; }[]; assumptions: string[]; choices: FeedbackChoice[]; baseCandidateId: string; themeCandidateId: string; sourceSpans?: { choiceId: string; excerpt: string; }[]; }; export type FeedbackValidation = { ok: boolean; errors: string[]; warnings: string[]; interpretation: FeedbackInterpretation; }; export declare function parseDesignFeedback(data: unknown): DesignFeedback; export declare function feedbackPayloadHash(feedback: DesignFeedback): string; export declare function validateDesignFeedback(opts: { feedback: DesignFeedback; runId: string; comparison: ComparisonManifest; indexes: Record; }): FeedbackValidation; export declare function saveFeedback(runDir: string, feedback: DesignFeedback): string; export declare function loadFeedback(runDir: string, feedbackId: string): DesignFeedback; export declare function summarizeFeedback(feedback: DesignFeedback, interpretation: FeedbackInterpretation): string; export declare function writeInterpretation(runDir: string, interpretation: FeedbackInterpretation): string;