Migrate conversation search to use PERSONAL_SUPERPOWERS_DIR

Updates conversation indexing and search to use the new personal superpowers
directory structure with environment variable support.

Changes:
- Added src/paths.ts for centralized directory resolution
- Updated db.ts, indexer.ts, verify.ts to use paths.ts
- Created migrate-to-config.sh for data migration from ~/.clank
- Updated all documentation references from ~/.clank to ~/.config/superpowers
- Database paths automatically updated during migration

Migration tested with 5,017 conversations and 6,385 exchanges.
This commit is contained in:
Jesse Vincent
2025-10-10 17:14:40 -07:00
parent 6c0ab4cfec
commit a48a7e5b1b
8 changed files with 203 additions and 35 deletions

View File

@@ -1,13 +1,9 @@
import Database from 'better-sqlite3';
import { ConversationExchange } from './types.js';
import path from 'path';
import os from 'os';
import fs from 'fs';
import * as sqliteVec from 'sqlite-vec';
function getDbPath(): string {
return process.env.TEST_DB_PATH || path.join(os.homedir(), '.clank', 'conversation-index', 'db.sqlite');
}
import { getDbPath } from './paths.js';
export function migrateSchema(db: Database.Database): void {
const hasColumn = db.prepare(`