/** * Database Module - Exports for persistence layer * * Usage (Python-like simplicity): * import { db } from 'praisonai'; * * const agent = new Agent({ * instructions: "You are helpful", * db: db("sqlite:./data.db"), // URL-style string * sessionId: "my-session" * }); */ export * from './types'; export { MemoryDbAdapter } from './memory-adapter'; import type { DbAdapter, DbConfig } from './types'; /** * Create a database adapter based on configuration */ export declare function createDbAdapter(config: DbConfig): DbAdapter; /** * Get or create the default database adapter */ export declare function getDefaultDbAdapter(): DbAdapter; /** * Set the default database adapter */ export declare function setDefaultDbAdapter(adapter: DbAdapter): void; /** * Factory function for creating a database adapter * * Accepts either: * - URL string: db("sqlite:./data.db"), db("postgres://..."), db("redis://...") * - Config object: db({ type: 'sqlite', path: './data.db' }) * * Examples: * db("sqlite:./data.db") // SQLite file * db("postgres://localhost/mydb") // PostgreSQL * db("redis://localhost:6379") // Redis * db("memory:") // In-memory (default) * db() // In-memory (default) */ export declare function db(configOrUrl?: string | DbConfig): DbAdapter;