Skip to content

Add opt-in semantic search for every authenticated Mistral document format #608

Description

@salmonumbrella

Problem

Msgvault stores attachment bytes, but their contents are not searchable. Relevant evidence can be trapped inside PDFs, Office files, spreadsheets, EPUBs, structured text, source code, or email containers while message and filename search return nothing.

Proposed direction

Add an opt-in document indexing lane with separate consent for each hosted provider:

  • classify attachment occurrences with authoritative role and source-part provenance;
  • send eligible standalone documents to the stateless Mistral OCR endpoint using private inline data URLs;
  • retain normalized source units, bounded chunks, citations, and lexical indexes locally while discarding raw provider JSON and full provider Markdown;
  • generate document vectors with the configured Voyage text embedding profile;
  • expose dedicated lexical and semantic document search with exact attachment, message, source-unit, extraction, and vector-generation provenance;
  • hide stale results immediately on replacement, deletion, role change, or message lifecycle change.

Format scope

The target is every non-visual attachment format accepted by the pinned stateless Mistral OCR endpoint, not PDF alone. The authenticated capability probe must cover:

  • PDF, DOCX/DOC, ODT, RTF;
  • PPTX/PPT;
  • XLSX/XLS, ODS, CSV, Numbers;
  • EPUB;
  • TXT, Markdown, RST, LaTeX;
  • JSON/JSONL, XML, YAML;
  • representative supported source-code formats;
  • EML and MSG.

Mistral explicitly documents OCR document inputs including PDF, DOCX, and PPTX, while its broader upload products list additional families. Documentation is discovery evidence, not upload authority: each media type enters Msgvault only after a synthetic authenticated probe proves inline stateless input, stable bounded source units, safe failure behavior, and usable citations. Passing formats ship with family-specific caps and quality fixtures. Rejected formats remain visible as provider-unsupported; Msgvault must not silently create a Mistral File or Library as a fallback.

Standalone images, GIFs, and video stay in the separate Voyage multimodal issue. Audio remains a transcription concern. Archives, executables, encrypted inputs, and unknown containers fail closed.

Delivery boundary

This lands as a reviewable stack: consume the shared attachment-role foundation, add the common Mistral client/schema and lexical indexing, enable every passing format family, then add required Voyage vectors and semantic/RRF retrieval. Lexical-only operation is a useful fallback but does not complete this issue. Files-workspace integration can follow independently.

The common extraction and lexical phases can begin before #589 merges. Only the final vector integration depends on the final #589 interfaces. Keep this issue open until the complete format capability matrix and semantic retrieval are merged and verified.

Both hosted lanes default off and require independent consent. All committed fixtures and public artifacts must be synthetic and free of personal or private downstream data.

Official provider references:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions