/** * Source-quality diagnostics (BP-v2.1-LATER-D2). * * Pure, fixture-friendly assessment of weak / inconsistent stanceLabel, * evidenceScore, and credibility inputs. Output is render-only / non-hashed — * never enters NETWORK_RECEIPT_HASH_FIELDS or master/delta hash lists. */ export type StanceLabelInput = 'supports' | 'opposes' | 'mixed' | 'neutral' | 'insufficient'; /** Per-source quality inputs supplied by the host (or attached non-hashed on the envelope). */ export interface SourceQualityInput { /** Stable source id for machine-checkable refs (url, node id, etc.). */ id: string; stanceLabel?: StanceLabelInput | string; stanceValue?: number; stanceConfidence?: number; stanceEvidence?: string; /** Declared evidence quality score on 0–100 (or absent). */ evidenceScore?: number; /** * Declared credibility. Hosts may pass 0–1 or 0–100. * Absent means undeclared (would silently default to mid-scale in weighting). */ credibility?: number; } export type SourceQualityKind = 'weak' | 'inconsistent'; export type SourceQualityCode = 'stanceLabel.missing' | 'stanceLabel.insufficient' | 'stanceLabel.ungrounded' | 'stanceLabel.value_inconsistent' | 'evidenceScore.missing' | 'evidenceScore.weak' | 'evidenceScore.confidence_theater' | 'credibility.missing' | 'credibility.weak' | 'credibility.defaulted_as_strong' | 'confidence.theater_risk'; export interface SourceQualityDiagnostic { code: SourceQualityCode; kind: SourceQualityKind; /** Source id, or `*` for run-level diagnostics. */ sourceId: string; field: 'stanceLabel' | 'evidenceScore' | 'credibility' | 'confidence'; /** Machine-checkable observation — never claims high confidence or proof. */ note: string; } /** Documented AC matrix thresholds (fixture-stable). */ export declare const SOURCE_QUALITY_THRESHOLDS: { /** evidenceScore below this (0–100) is weak. */ readonly weakEvidenceScore: 30; /** Normalized credibility below this (0–100) is weak. */ readonly weakCredibilityScore: 30; /** Stance confidence at/above this with weak evidence is theater. */ readonly highStanceConfidence: 0.9; /** Grounded-source floor from uvrn-stance-v1 §2.1 / §3. */ readonly stanceConfidenceFloor: 0.6; }; /** * Assess source-quality inputs against the D2 AC matrix. * Returns deterministic diagnostics sorted by (code, sourceId). */ export declare function assessSourceQuality(sources: readonly SourceQualityInput[]): SourceQualityDiagnostic[]; /** * When weak/inconsistent source-quality diagnostics exist alongside an aligned * high-confidence measurement story, emit a run-level theater-risk diagnostic. */ export declare function assessConfidenceTheaterRisk(args: { diagnostics: readonly SourceQualityDiagnostic[]; verdictTone: string; measurementConfidences: readonly number[]; }): SourceQualityDiagnostic | undefined; //# sourceMappingURL=assess.d.ts.map