import { type QualityReview } from "./artifacts.ts"; import { type ImageToolRead } from "./design-usage.ts"; import type { GradeResult } from "./grade.ts"; export { type QualityReview, QUALITY_DIMENSIONS } from "./artifacts.ts"; export { PROBE_TOKEN } from "./design-calibration.ts"; export declare const QUALITY_FLOOR = 2; export declare const QUALITY_MUST_REACH: readonly ["business-specificity", "composition", "media-integration"]; export declare const QUALITY_MUST_SCORE = 3; export declare const VISUAL_PROBE_FILENAME = "visual-probe.png"; export declare const QUALITY_PROBE_REL = "agent/reviews/visual-probe.png"; export declare const QUALITY_RECEIPT_REL = "agent/reviews/representative-quality.receipt.json"; export declare const QUALITY_LOG_ARCHIVE_REL = "agent/reviews/representative-quality.invocation.log"; export declare const QUALITY_REPAIR_ATTEMPTS = 2; export declare function fileSha256(path: string): string; export declare function qualitySubject(root: string): string; /** Advisory observations become reviewable only when tied to exact current captures. */ export declare function validateCompositionQualityObservations(root: string, review: QualityReview): string[]; export declare function writeVisualProbe(destDir: string): { path: string; hash: string; token: string; }; export declare function normalizeProbeToken(value: string): string; /** A 24px swatch supports approximate color recognition, not exact RGB naming. */ export declare function probeColorMatches(value: string): boolean; export type VisualProbeResult = { available: boolean; expectedToken: string; observedToken: string; probeHash: string; accuracyPhrase?: string; toolReads: ImageToolRead[]; failures: string[]; }; export type QualityInvocationReceipt = { schemaVersion: 1; kind: "quality-invocation" | "quality-image-attachment-invocation"; archivedAt: string; sourceLog: string; archiveRel: string; logHash: string; probeRel: string; probeHash: string; captureRel: string; captureHashes: { path: string; hash: string; }[]; imageInputs?: { path: string; hash: string; }[]; invocation?: { command: string; args: string[]; status: number; promptHash: string; subjectHash: string; }; }; export type RepresentativeCapture = { path: string; hash: string; }; export declare function representativeCaptureHashes(root: string): RepresentativeCapture[]; export declare function currentProbeHash(root: string): string | undefined; export declare function canonicalRelativePath(root: string | undefined, filePath: string): string; export declare function evaluateVisualProbe(opts: { root?: string; observedToken?: string; probeHash: string; expectedProbeHash?: string; logText?: string; accuracyObserved?: string; }): VisualProbeResult; export declare function archiveQualityInvocation(root: string, sourceLogPath: string): QualityInvocationReceipt; /** Runner evidence: exact PNG bytes supplied as CLI image arguments, distinct from model tool reads. */ export declare function archiveQualityImageInvocation(root: string, sourceLogPath: string, invocation: { command: string; args: string[]; status: number; promptHash: string; subjectHash: string; imageInputs: { path: string; hash: string; }[]; }): QualityInvocationReceipt; export type ActiveAgentQualityReceipt = { schemaVersion: 1; kind: "active-agent-visual"; archivedAt: string; preparationId?: string; probeRel: string; probeHash: string; captureRel: string; captureHashes: { path: string; hash: string; }[]; toolEvents?: Array<{ tool: string; path: string; success: boolean; hash?: string; }>; environment?: string; transcriptRel?: string; }; export declare function recordActiveAgentQualityReceipt(opts: { root: string; preparationId?: string; toolEvents?: Array<{ tool: string; path: string; success: boolean; hash?: string; }>; environment?: string; transcriptRel?: string; }): ActiveAgentQualityReceipt; export type QualityReceipt = QualityInvocationReceipt | ActiveAgentQualityReceipt; export declare function validateArtQualityObservations(root: string, review: QualityReview): string[]; export declare function validateQualityReview(root: string, opts?: { requirePass?: boolean; reviewPath?: string; }): GradeResult & { review?: QualityReview; stale?: boolean; malformed?: boolean; }; export declare function sketchesAreNotRepresentatives(root: string): string[]; export declare function packIdentity(kernel: string): string; export declare function imageReadLogLine(opts: { path: string; dataBlobId?: string; hash?: string; mimeType?: string; image?: string; }): string; export declare function writePassingQualityArtifacts(root: string, opts?: { observedToken?: string; }): QualityReview;