/** * postgres-mcp — Resource Suggestion Utility * * §7: Appends actionable suggestions to resource responses based on * configurable thresholds. Each suggestion includes severity, message, * and an optional action string (SQL or tool call). * * This is NOT a singleton — each resource handler calls `generateVacuumSuggestions()` * explicitly with its own data. Designed for easy extension to other resources. */ /** A single actionable suggestion for agents */ export interface Suggestion { severity: "info" | "warning" | "critical"; message: string; action?: string; } /** Vacuum-specific threshold configuration */ export interface VacuumThresholds { /** Dead tuple ratio threshold for warnings (default: 0.2 = 20%) */ deadTupleRatioWarning: number; /** Dead tuple ratio threshold for critical (default: 0.5 = 50%) */ deadTupleRatioCritical: number; /** Tables that have never been vacuumed trigger a warning */ neverVacuumedWarning: boolean; /** Wraparound percentage considered critical (default: 75) */ wraparoundCriticalPct: number; /** Wraparound percentage considered warning (default: 50) */ wraparoundWarningPct: number; } /** Vacuum statistics row from the resource */ export interface VacuumStatsRow { schemaname: string; relname: string; last_vacuum: string | null; last_autovacuum: string | null; n_dead_tup: number; n_live_tup: number; dead_tuple_percent: number; } /** Wraparound info from the resource */ export interface WraparoundStats { percent_toward_wraparound: number; } export declare const DEFAULT_VACUUM_THRESHOLDS: VacuumThresholds; /** * Generate actionable suggestions from vacuum resource data. * Deterministic, threshold-based, and terse for token efficiency. */ export declare function generateVacuumSuggestions(vacuumStats: VacuumStatsRow[], wraparound: WraparoundStats | null, thresholds?: VacuumThresholds): Suggestion[]; //# sourceMappingURL=resource-suggestions.d.ts.map