import { commandExists, runExe } from '../exec.js'; import { Target } from '../target.js'; /** Injectable for tests — real implementations by default. */ export interface BpCatalogDeps { commandExists: typeof commandExists; runExe: typeof runExe; } /** * Regenerate this target's BP-moniker catalog when its resolved D365FO * version has moved since the catalog file was last stamped (including * "never generated" — covers first-time instance creation). A no-op on * every other rebuild. Never throws and never fails the caller's reindex — * a missing/stale BP catalog degrades one knowledge tool, not the server. * * "Never throws" is enforced here rather than left to the callee getting every * path right. rebuildIndex() awaits this as its last step, unwrapped, *after* * the multi-minute extract and database build have already succeeded and * logged "Index rebuilt" — so anything escaping would turn a finished rebuild * into a crashed command. And plenty can escape: runExe rejects on the child * process's own 'error' event (commandExists only rules out ENOENT, not an * EACCES on the interpreter), and saveStore writes two files that a locked or * read-only instance config will refuse. */ export declare function ensureBpCatalogFresh(target: Target, deps?: BpCatalogDeps): Promise; //# sourceMappingURL=bpCatalog.d.ts.map