/**
 * @sanity/ailf-core — Domain services
 *
 * Pure computation functions with zero I/O. These operate on typed
 * inputs and return typed outputs.
 *
 * Extracted from packages/eval/src/lib/ during the Ports & Adapters
 * migration (Phase 4e).
 */
export { classifyRubric, detectFeatureArea, extractDimensions, extractUrlMetadata, mergeScores, parseRubricScore, } from "./scoring.js";
export { formatComparisonMarkdown, formatComparisonTable, } from "./comparison-formatters.js";
export { aggregateAreas, aggregateDimensions, computeEnsembleScore, computeTaskScore, normalizeScore, } from "./scoring-engine.js";
export { extractModelName, extractProvider, mergeConfig, modelMatchesMode, resolveModelVariants, } from "./config-helpers.js";
export { buildSlimReportSummary } from "./slim-report-summary.js";
// ---------------------------------------------------------------------------
// Error classification (eval failure observability — B1 keystone)
// Pure classifier that maps a per-result error string to config-error vs
// provider-error vs unknown. Consumed by calculate-scores.ts (eval) to build
// the report's `errorSummary`; B2/B3/B4 read the classification off the summary.
// ---------------------------------------------------------------------------
export { classifyErrorString, ERROR_CLASSIFICATIONS, } from "./error-classification.js";
// ---------------------------------------------------------------------------
// Error-summary trip policy (eval failure observability — shared keystone)
// The one definition of "this run's errors are worth surfacing". Validity (B2,
// report-validity-detector) and notification (B3, notifications/match) key on
// the identical condition via this predicate + reasons builder.
// ---------------------------------------------------------------------------
export { DEFAULT_ERROR_RATE_THRESHOLD, errorSummaryReasons, errorSummaryTrips, } from "./error-summary-policy.js";
export { reportToMarkdown, } from "./report-to-markdown.js";
export { classifyCacheState, describeCacheState, reportCacheState, } from "./report-cache-state.js";
// ---------------------------------------------------------------------------
// Report-validity detector (D0059) — pure, versioned trustworthiness engine
// ---------------------------------------------------------------------------
export { assessReportValidity, REPORT_VALIDITY_RULESET_VERSION, } from "./report-validity-detector.js";
export { detectArtifactPersistenceDegradation, DEFAULT_WHOLESALE_LOSS_THRESHOLD, } from "./artifact-persistence-detector.js";
// ---------------------------------------------------------------------------
// Actionability ladder Phase 1 + Phase 5 — diagnosis runner + card registry
// ---------------------------------------------------------------------------
export { createDiagnosisRunner, diagnosisVersion, } from "./diagnosis-runner.js";
export { cardRegistry } from "./diagnosis/registry.js";
// ---------------------------------------------------------------------------
// Phase 5 — LLM client factory (D-01 hoist)
// ---------------------------------------------------------------------------
export { createLLMClient, } from "./llm-client-factory.js";
// ---------------------------------------------------------------------------
// Phase 5 — card validators (D-05 refine helpers)
// ---------------------------------------------------------------------------
export { buildFailureModeRefinement, isFailureModeInDimensionTaxonomy, } from "./diagnosis/card-validators.js";
// ---------------------------------------------------------------------------
// Phase 5 Plan 05 — card generators barrel + prompt builders
// ---------------------------------------------------------------------------
export { CARD_REGISTRY_VERSION, DIAGNOSIS_CARD_GENERATORS, generateAreaSummary, generateFailureModeSummary, generateNoIssues, generateTopRecommendations, generateWeakestArea, generateLowConfidenceAttribution, generateDocAttributionSpotlight, generateRegressionVsBaseline, } from "./diagnosis/cards/index.js";
export { buildTopRecommendationsPrompt, buildWeakestAreaPrompt, buildLowConfidenceAttributionPrompt, buildDocAttributionSpotlightPrompt, buildRegressionVsBaselinePrompt, buildDocSlugAllowList, } from "./diagnosis/prompt-builders.js";
// ---------------------------------------------------------------------------
// Run-provenance ownership policy evaluator (M1.1) — pure, shared by both
// enforcement gates (T1 gateway, T2 pre-publish).
// ---------------------------------------------------------------------------
export { evaluateProvenance, mergeProvenancePolicy, OWNER_TEAM_SLUG_PATTERN, SERVER_FLOOR, suggestKnownTeam, } from "./provenance-policy.js";
// ---------------------------------------------------------------------------
// External task registration — shared team resolution + error builder
// (one source of truth for the gateway pre-flight and the pipeline mirror gate)
// ---------------------------------------------------------------------------
export { buildRegistrationError, resolveActiveTeam, } from "./resolve-active-team.js";
// ---------------------------------------------------------------------------
// Task viability — predicate for the eval fast-fail validation, intended to
// also back a future dashboard new-eval picker guard so both share one
// definition of "non-viable".
// ---------------------------------------------------------------------------
export { classifyTaskViability, describeTaskViabilityReason, } from "./task-viability.js";
