/** * `bober vault reindex` — rebuild the derived FactStore from an Obsidian vault. * * Walks all `.md` files under a vault directory, parses their YAML frontmatter, * and reconcile-at-ingest writes each frontmatter key as a FactInput into the * team/namespace FactStore. Mirrors the facts.ts / medical.ts CLI pattern exactly: * - Handler never throws — errors set process.exitCode=1 and write chalk.red. * - Store is always closed in a finally block. * - Wall-clock time is read exactly ONCE at the handler boundary. * - Vault directory defaults to projectRoot when --vault is omitted. */ import type { Command } from "commander"; import type { ReindexSummary } from "../../vault/reindex.js"; /** Injectable dependencies for runVaultReindex — production callers pass undefined. */ export interface VaultReindexDeps { /** Override the current time ISO string (default: new Date().toISOString()). */ nowIso?: string; } /** * Core logic for `bober vault reindex`. * Extracted so tests can inject a temp projectRoot and assert on the FactStore * without spawning a process. The CLI .action() calls this with no deps (production). * * @param projectRoot Absolute path to the project root (for FactStore namespace resolution). * @param opts.scope Fact scope label passed to reindexNotes (e.g. "medical", "finance"). * @param opts.vault Vault directory to read notes from. Defaults to `projectRoot` when omitted. * @param deps Optional injectable deps (nowIso for testing). * @returns The ReindexSummary on success, or undefined if an error occurred (exitCode=1). */ export declare function runVaultReindex(projectRoot: string, opts: { scope: string; vault?: string; }, deps?: VaultReindexDeps): Promise; /** * Register the `bober vault` command tree. * Provides `vault reindex --scope [--vault ]`. * Mirrors registerMedicalCommand / registerFactsCommand shape. */ export declare function registerVaultCommand(program: Command): void; //# sourceMappingURL=vault.d.ts.map