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

    Function peekFtsMetaSafe

    • Legacy fail-soft diagnostic peek at bounded FTS metadata.

      Production configuration decisions use discoverFtsIndexConfig, whose discriminated result distinguishes missing and exactly schema-empty files from full-class, exact-root ownership and generic refusal. This compatibility helper never authorizes an open or rebuild. Missing dependencies, unreadable/corrupt files, malformed rows, unsupported tokenizer values, and query failures collapse to null. A close failure never escapes; this legacy diagnostic may still return metadata already read. The complete main/WAL/SHM/rollback-journal family receives the same two-stage singly linked regular-file preflight as production discovery; an unsafe or orphaned leaf returns null before native open.

      Parameters

      • file: string

        Absolute path to a .fts5.db file.

      • OptionalexpectedVaultRoot: string

        When supplied, return metadata only when its exact stored owner matches this vault root.

      Returns Promise<
          | {
              schema_version?: string;
              tokenize_mode?: TokenizeMode;
              vault_root?: string;
          }
          | null,
      >

      Bounded metadata when readable and root-compatible, otherwise null. This is not a substitute for FtsIndex.open's admission.

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

      const meta = await peekFtsMetaSafe(indexFile, vaultRoot);
      console.log(meta?.schema_version); // diagnostic only