import type { FeedItem } from './feed.types.js'; export interface StorageError { code: 'DB_ERROR' | 'CONSTRAINT_ERROR' | 'UNKNOWN'; message: string; } export interface IStorage { /** * Persist items to storage. Should handle duplicates gracefully (upsert). */ save(items: FeedItem[]): Promise; /** * Get most recent items across all sources. */ getRecent(limit: number): Promise; /** * Get recent items from a specific source feed. */ getBySource(source: string, limit: number): Promise; /** * Search items by title/content keywords. */ search(query: string): Promise; }