/** * Recommendation engine for Weft diagnostics. * * Analyzes database health, workflow statistics, and queue statistics * to produce actionable recommendations ordered by severity. * * @module diagnostics/recommendations */ import type { DatabaseHealth, QueueStatistics, Recommendation, WorkflowStatistics } from './types.ts'; import { THRESHOLDS } from './types.ts'; /** * Generate recommendations based on diagnostic data. * * Rules are checked in a fixed order so that the most critical issues * appear first in the returned array. * * @example * ```ts * import { MemoryStorage, collectDiagnostics, generateRecommendations } from '@lostgradient/weft'; * * await using storage = new MemoryStorage(); * const report = await collectDiagnostics(storage, ':memory:'); * const recs = generateRecommendations({ * database: report.database, * workflows: report.workflows, * queues: report.queues, * }); * console.log(recs.length); // 0 for a healthy instance * ``` */ export declare function generateRecommendations(report: { database: DatabaseHealth; workflows: WorkflowStatistics; queues: QueueStatistics[]; }, thresholds?: Partial<{ [K in keyof typeof THRESHOLDS]: number; }>): Recommendation[];