refactor: low-regret cleanup across core, engine, dashboard
- core: extract ai-engine-loader.ts to share @fusion/engine dynamic-import boilerplate between ai-summarize and memory-compaction (incl. AgentMessage type); collapse getInbox/getOutbox, listInsights/countInsights, listRuns/countRuns, and three hasProjectDb* variants behind shared helpers. - core: drop unused pluginLoaderLog export; tighten two `any` casts (db.walCheckpoint row, plugin-loader error.code). - engine: extract resolveRoleFallback helper from buildSessionSkillContext/Sync; remove 22 stale `eslint-disable no-explicit-any` directives across project-engine, self-healing, triage, worktree-pool. - dashboard: apply ESLint autofix (let→const, empty `interface extends`→type). All three packages: typecheck clean, full test suites pass (14,414 tests), builds clean. Net lint: -31 warnings. No public behavior changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1672,7 +1672,9 @@ export class Database {
|
||||
* Safe to call periodically. Returns checkpoint stats.
|
||||
*/
|
||||
walCheckpoint(): { busy: number; log: number; checkpointed: number } {
|
||||
const row = this.db.prepare("PRAGMA wal_checkpoint(TRUNCATE)").get() as any;
|
||||
const row = this.db.prepare("PRAGMA wal_checkpoint(TRUNCATE)").get() as
|
||||
| { busy?: number; log?: number; checkpointed?: number }
|
||||
| undefined;
|
||||
return { busy: row?.busy ?? 0, log: row?.log ?? 0, checkpointed: row?.checkpointed ?? 0 };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user