f5c8d8661b
Adds persistence/database.ts with openDatabase, getDatabase, closeDatabase, getSchemaVersion, and CURRENT_SCHEMA_VERSION. Creates 10 tables (metadata, tiles, entities, components, relationships, bonds, narration_events, memory_events, stockpile_log, inventions) with WAL journal mode. Includes 8 tests covering table creation, schema versioning, connection reuse, and data persistence across reopen. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>