enquire-mcp API reference - v4.0.0-rc.7
    Preparing search index...

    Function discoverFtsIndexConfig

    • Classify a configured FTS path through the same exact admission logic used by FtsIndex.open, but on one readonly handle and without Enquire bootstrap, persistent PRAGMA mutation, DDL, DML, or chmod. SQLite/VFS lock, recovery, and WAL/SHM bookkeeping remain outside this logical guarantee. The main/WAL/SHM/rollback-journal family is checked before dependency load and again immediately before native open; unsafe, hardlinked, or orphaned leaves collapse to refused under the stable-parent boundary.

      Parameters

      • file: string

        Configured .fts5.db path.

      • expectedVaultRoot: string

        Exact canonical vault root expected to own it.

      Returns Promise<FtsIndexDiscovery>

      missing or genuinely schema-empty when caller defaults are safe, owned with the physically proven stored tokenizer, or generic refused.

      If file is outside the exact .fts5.db namespace.

      const discovery = await discoverFtsIndexConfig(indexFile, vaultRoot);
      const tokenize = discovery.kind === "owned" ? discovery.meta.tokenize_mode : "unicode61";
      const index = new FtsIndex({ file: indexFile, vaultRoot, tokenize });
      await index.open(discovery);