import type { HashDiffReport } from './annotations.js';
/** Options for creating a drift watcher. */
export interface DriftWatcherOptions {
    /** TTL in seconds for cached drift entries. Default 60. */
    ttlSeconds?: number;
    /** Glob patterns to exclude from watching. */
    excludePatterns?: string[];
    /** Project ID to watch. */
    projectId: string;
}
/** In-memory state of the drift watcher. */
export interface DriftWatcherState {
    /** Whether the watcher is currently running. */
    running: boolean;
    /** ISO timestamp when the watcher was started. */
    startedAt: string | null;
    /** Number of cached entries. */
    cacheSize: number;
    /** Project ID being watched. */
    projectId: string;
}
/** A single cached drift entry. */
export interface DriftCacheEntry {
    /** Spec ID this entry is for. */
    specId: string;
    /** Cached drift report data. */
    data: HashDiffReport;
    /** ISO timestamp when the entry was cached. */
    cachedAt: string;
    /** ISO timestamp when the entry expires. */
    expiresAt: string;
}
/** Drift watcher instance interface. */
export interface DriftWatcherInstance {
    start: () => void;
    stop: () => void;
    status: () => DriftWatcherState;
    invalidate: (specId?: string) => void;
    getCachedDrift: (specId: string) => DriftCacheEntry | null;
    setCachedDrift: (specId: string, data: HashDiffReport) => void;
}
/** Minimal spec shape needed for dashboard collection. */
export interface DashboardSpecInput {
    id: string;
    status: string;
    completion: number;
}
/** A single spec entry for the living dashboard. */
export interface DashboardSpecEntry {
    specId: string;
    status: string;
    completion: number;
    driftDetected: boolean;
    changedFileCount: number;
    signatureChangeCount: number;
    lastCheckedAt: string;
}
/** Summary statistics for the dashboard. */
export interface DashboardSummary {
    totalSpecs: number;
    specsWithDrift: number;
    averageCompletion: number;
    healthScore: number;
    generatedAt: string;
}
/** A single trend data point. */
export interface DashboardTrendPoint {
    timestamp: string;
    specsWithDrift: number;
    averageCompletion: number;
    healthScore: number;
}
/** A row in the spec diff table. */
export interface SpecDiffRow {
    specId: string;
    file: string;
    previousHash: string;
    currentHash: string;
    status: 'added' | 'modified' | 'removed';
}
/** Status of a criterion's test coverage. */
export type CriterionCoverageStatus = 'verified' | 'regression' | 'untested';
/** Coverage information for a group of annotations. */
export interface AnnotationCoverageGroup {
    specId: string;
    criterion: number;
    status: CriterionCoverageStatus;
    testCount: number;
    passCount: number;
    failCount: number;
    files: string[];
}
/** Full test coverage report correlated with specs (living-spec). */
export interface LivingSpecCoverageReport {
    projectId: string;
    groups: AnnotationCoverageGroup[];
    totalTests: number;
    passedTests: number;
    failedTests: number;
    coveragePercentage: number;
    generatedAt: string;
}
/** Minimal shape of a Vitest JSON test result. */
export interface VitestTestResult {
    name: string;
    status: 'passed' | 'failed' | 'skipped' | 'pending';
    duration?: number;
}
/** Minimal shape of a Vitest JSON test file. */
export interface VitestFileResult {
    filepath: string;
    tests: VitestTestResult[];
}
/** Minimal shape of the full Vitest JSON report. */
export interface VitestJsonReport {
    testResults: VitestFileResult[];
}
/** A single test case from JUnit XML. */
export interface JUnitTestCase {
    name: string;
    classname: string;
    file: string;
    passed: boolean;
}
/** A normalized test result for grouping. */
export interface NormalizedTestResult {
    name: string;
    file: string;
    passed: boolean;
}
/** Direction of synchronization. */
export type SyncDirection = 'spec-to-code' | 'code-to-spec';
/** Criterion info for TODO generation. */
export interface CriterionInfo {
    specId: string;
    criterion: number;
    description: string;
    status: string;
}
/** A TODO comment to be generated in code. */
export interface TodoComment {
    file: string;
    line: number;
    text: string;
    specId: string;
    criterion: number;
}
/** A progress update to apply to a spec. */
export interface ProgressUpdate {
    specId: string;
    criterion: number;
    previousStatus: string;
    newStatus: string;
    reason: string;
}
/** A conflict detected during sync. */
export interface SyncConflict {
    id: string;
    specId: string;
    criterion: number;
    direction: SyncDirection;
    description: string;
    codeState: string;
    specState: string;
    detectedAt: string;
    resolved: boolean;
    resolution?: string;
}
/** An entry in the sync log. */
export interface SyncLogEntry {
    timestamp: string;
    direction: SyncDirection;
    specId: string;
    action: string;
    details: string;
}
/** Result of a sync operation. */
export interface SyncResult {
    direction: SyncDirection;
    specId: string;
    todosGenerated: TodoComment[];
    progressUpdates: ProgressUpdate[];
    conflicts: SyncConflict[];
    logEntries: SyncLogEntry[];
    syncedAt: string;
}
/** Input for the living_spec_watch tool. */
export interface LivingSpecWatchInput {
    projectId: string;
    action: 'start' | 'stop' | 'status';
    ttlSeconds?: number;
    excludePatterns?: string[];
}
/** Input for the living_spec_status tool. */
export interface LivingSpecStatusInput {
    projectId: string;
    specId?: string;
}
/** Input for the spec_diff tool. */
export interface SpecDiffInput {
    projectId: string;
    specId?: string;
}
/** Input for the living_spec_coverage tool. */
export interface LivingSpecCoverageInput {
    projectId: string;
    coverageJsonPath?: string;
    junitXmlPath?: string;
}
/** Input for the sync_spec_to_code tool. */
export interface SyncSpecToCodeInput {
    projectId: string;
    specId: string;
    projectPath: string;
}
/** Input for the sync_code_to_spec tool. */
export interface SyncCodeToSpecInput {
    projectId: string;
    specId: string;
    projectPath: string;
}
/** Input for the resolve_sync_conflict tool. */
export interface ResolveSyncConflictInput {
    projectId: string;
    conflictId: string;
    resolution: 'accept-code' | 'accept-spec' | 'manual';
    manualResolution?: string;
}
/** Dashboard data persisted to disk. */
export interface LivingDashboardData {
    entries: DashboardSpecEntry[];
    summary: DashboardSummary;
    trends: DashboardTrendPoint[];
    updatedAt: string;
}
//# sourceMappingURL=dashboard-and-sync.d.ts.map