maintenance.d.ts 947 B

1234567891011121314151617181920212223
  1. /**
  2. * Maintenance - Database cleanup operations for QMD.
  3. *
  4. * Wraps low-level store operations that the CLI needs for housekeeping.
  5. * Takes an internal Store in the constructor — allowed to access DB directly.
  6. */
  7. import type { Store } from "./store.js";
  8. export declare class Maintenance {
  9. private store;
  10. constructor(store: Store);
  11. /** Run VACUUM on the SQLite database to reclaim space */
  12. vacuum(): void;
  13. /** Remove content rows that are no longer referenced by any document */
  14. cleanupOrphanedContent(): number;
  15. /** Remove vector embeddings for content that no longer exists */
  16. cleanupOrphanedVectors(): number;
  17. /** Clear the LLM response cache (query expansion, reranking) */
  18. clearLLMCache(): number;
  19. /** Delete documents marked as inactive (removed from filesystem) */
  20. deleteInactiveDocs(): number;
  21. /** Clear all vector embeddings (forces re-embedding) */
  22. clearEmbeddings(): void;
  23. }