2025-08-26 12:32:21 -07:00
|
|
|
/**
|
2025-09-11 16:23:32 -07:00
|
|
|
* Storage backward compatibility layer for legacy data migrations
|
2025-08-26 12:32:21 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export class StorageCompatibilityLayer {
|
2025-09-11 16:23:32 -07:00
|
|
|
static logMigrationEvent(event: string, details?: any): void {
|
|
|
|
|
// Simplified logging for migration events
|
|
|
|
|
if (process.env.DEBUG_MIGRATION) {
|
|
|
|
|
console.log(`[Migration] ${event}`, details)
|
2025-08-26 12:32:21 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-11 16:23:32 -07:00
|
|
|
static async migrateIfNeeded(storagePath: string): Promise<void> {
|
|
|
|
|
// No-op for now - can be extended later if needed
|
2025-08-26 12:32:21 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-09-11 16:23:32 -07:00
|
|
|
export interface StoragePaths {
|
|
|
|
|
nouns: string
|
|
|
|
|
verbs: string
|
|
|
|
|
metadata: string
|
|
|
|
|
index: string
|
|
|
|
|
system: string
|
|
|
|
|
statistics: string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Helper to get default paths
|
|
|
|
|
export function getDefaultStoragePaths(basePath: string): StoragePaths {
|
|
|
|
|
return {
|
|
|
|
|
nouns: `${basePath}/nouns`,
|
|
|
|
|
verbs: `${basePath}/verbs`,
|
|
|
|
|
metadata: `${basePath}/metadata`,
|
|
|
|
|
index: `${basePath}/index`,
|
|
|
|
|
system: `${basePath}/system`,
|
|
|
|
|
statistics: `${basePath}/statistics.json`
|
2025-08-26 12:32:21 -07:00
|
|
|
}
|
|
|
|
|
}
|