Skip to content

Acquire, transcribe, and index message media from bytes and shared recording URLs #240

Closed

Description

@salmonumbrella

The situation

Voice notes and shared recordings are message content, not decorative attachments. Msgvault can already identify or retain media from several sources, but each consumer should not have to build its own downloader, transcript store, Docling adapter, embedding jobs, and retrieval index.

The ownership boundary should match #176: the source application knows which message the media belongs to and whether that message is still visible; Docbank handles the media itself. For a local voice attachment, Docbank receives the exact bytes. For a Loom or Cap link, Docbank receives a protected provider reference and, when the content is publicly or explicitly authorized, resolves and downloads it. Docbank then extracts or transcribes it, retains normalized evidence, indexes it, and returns one stable identity plus coverage state to the caller.

What works today, and why it is not enough

  • The Roadmap: provider-neutral document processing and semantic retrieval #176 stack gives Docbank sealed exact-byte processing, durable jobs, Docling renditions, normalized evidence, embeddings, source-fenced retrieval, and embedded/HTTP application boundaries.
  • The pending Docling adapter accepts bounded supplied files through fixed routes. Docling also supports audio/video transcription, but Docbank does not yet expose media transcription as a first-class processing profile.
  • The pending Gemini adapter can embed WAV, MP3, MP4, and MOV directly. That is useful for multimodal similarity, but it does not produce the plaintext transcript needed for exact phrase and lexical search.
  • Docbank has no provider-neutral remote-media source, no Loom/Cap resolver, and no durable distinction between metadata-only, access-required, downloadable, unsupported, and failed acquisition.
  • Loom has no open management API. Its oEmbed surface provides metadata, while downloads depend on the recording and viewer's permissions.
  • Cap's Developer API covers videos owned by the calling app, not every received share link. Self-hosted Cap can live on an operator-defined origin and needs an explicitly scoped trust and credential boundary.

Without this layer, Msgvault would have to duplicate processing and provider acquisition logic that belongs in Docbank, and every later consumer would have to do the same again.

Ask

Add one durable media-ingestion lane to Docbank for supplied attachment bytes and authorized shared-recording URLs. It should end in the existing rendition, evidence, embedding, and source-fenced retrieval system rather than creating a parallel transcript store.

1. Accept two source shapes

  • Supplied media: accept an exact bounded byte stream plus filename, declared MIME type, source digest, caller-owned source identity, and visibility fence. Seal and inspect the bytes before choosing a processing profile. The caller remains the authority for the original message attachment.
  • Remote recording: accept a sanitized canonical URL, a protected acquisition URL when it differs, provider hint, caller-owned occurrence identity, and an optional named credential binding. Docbank owns resolution, authorized download, retained source version, extraction, and processing state. Secret values never cross in the request or appear in logs.
  • Return the stable immutable Docbank source/content-version identity as soon as the source is sealed. The caller should not need to know Docbank's rendition, chunk, embedding, or index internals.

2. Resolve Loom and Cap inside Docbank

  • Recognize Loom only on exact loom.com/www.loom.com hosts and documented share/embed route families. Use supported metadata surfaces where available. Download media or captions only when the current viewer or configured credential is authorized and the provider exposes a supported path. Do not scrape player internals, replay signed URLs from browser traffic, or bypass creator/workspace controls.
  • Recognize Cap Cloud only on exact cap.so/www.cap.so hosts and documented share/embed routes. Use the Developer API only for recordings actually owned by that app credential.
  • Recognize self-hosted Cap only on an operator-registered exact origin. Scope credentials to that origin, version/probe the adapter, and never infer that an arbitrary site with /s/<id> is Cap.
  • Report metadata, transcript/captions, and downloadable media as independent capabilities. A resolver result can be metadata_only, content_available, access_required, unsupported, or retryable/terminal failure without pretending the recording was archived.
  • Keep a manual exact-file/caption import path bound to an already known recording identity. That is the honest fallback when a received link is viewable but has no supported machine export.

3. Bound acquisition before any processing

  • Resolve and validate DNS at connection time and on every redirect. Public-provider requests reject userinfo, unexpected ports, cross-origin credential forwarding, scheme downgrades, and loopback/link-local/private/ULA/metadata destinations. A registered self-hosted origin follows its explicit local-network and TLS policy.
  • Enforce request, response, redirect, time, byte, and duration limits. Validate the downloaded content by bytes rather than trusting a URL suffix or response header.
  • Canonical identity drops fragments and non-identity query parameters. Protected acquisition parameters remain occurrence-scoped and redacted from logs, renditions, search results, and backup metadata.
  • Acquisition and processing are asynchronous, resumable, and idempotent. A caller submission must never wait for remote fetch, Docling, ASR, or embedding work to finish.

4. Produce transcript evidence through Docling

  • Prefer a provider-supplied transcript or caption artifact when one is available and authorized. Preserve its provider provenance, language, timing, and speaker labels only when supplied.
  • Otherwise run an explicitly selected Docling audio/video transcription profile after local format, byte, and duration authorization. Docbank connects to the operator's Docling service; it does not install or launch it.
  • Retain the original recording version, sanitized Markdown transcript, normalized timestamped evidence when supported, processing profile, and rebuildable lexical/vector generations under the existing Docbank contracts.
  • Direct media embeddings can be an additional generation, but they never mark transcription complete and never replace plaintext evidence.
  • Do not invent speakers, language, timestamps, or confidence when neither the source nor the processing result provides them.

5. Expose one consumer contract

  • The embedded and authenticated HTTP APIs expose submit/status/retry for media sources, capability outcomes, stable source identities, transcript coverage, and source-fenced lexical/semantic/hybrid search.
  • Deduplicate supplied media by sealed content version and profile. Deduplicate a remote recording by provider-owned identity when proven, otherwise by canonical origin/URL until downloaded bytes establish a content version. Multiple caller occurrences map to the same processed source without losing their separate visibility.
  • Revoking caller visibility removes that occurrence from the next source fence. It does not delete another live occurrence or silently purge archived bytes. Consent revocation stops new hosted work; derivative purge remains a separate previewed operation.
  • Provider deletion or later access loss updates remote coverage while preserving already authorized archived content and the historical caller association.

Acceptance criteria

  • The same supplied WAV/MP3 voice note is processed once, searchable by exact phrase and semantic/hybrid search, and safely referenced by multiple caller occurrences.
  • A public or authorized Loom recording and a Cap Cloud or registered self-hosted Cap recording can move from detected URL to bounded download, Docling transcript, normalized evidence, and search without any provider-specific downloader in the caller.
  • Metadata-only, access-required, export-disabled, password-protected, unsupported, deleted, oversize, and transient-failure cases stay truthful and retryable where appropriate. None are reported as archived or transcribed.
  • Source transcripts/captions are preferred over ASR and remain distinguishable from generated transcripts.
  • Redirect, DNS rebinding, credential-scope, partial-download, MIME mismatch, size/duration, crash recovery, retry, consent, replacement, and source-fence tests exercise production paths.
  • The stable embedded and HTTP APIs expose the same identities, coverage, and retrieval behavior.

Out of scope

  • Crawling Loom workspaces, Cap accounts, or arbitrary webpages.
  • Bypassing passwords, workspace membership, viewer roles, creator download settings, or provider terms.
  • Message-provider parsing, message visibility, or conversation UI; those stay in the calling application.
  • A second caller-owned transcript, chunk, vector, or search authority.

Dependencies and references

Activity

  1. rodboev commented on Sep 11, 2026

    @rodboev
    Contributor

    Here's how the media side splits up. Docbank keeps recordings, makes transcripts, and searches them. Msgvault sends the audio and shows the results, tracked in kenn-io/msgvault#728.

    1. Audio with a provider transcript
      Store audio with the transcript its source already made, and search that text.
      PR: feat(document): index supplied audio with its provider transcript #304

    2. Transcribe audio with Docling
      Transcribe WAV and MP3 audio that arrives without a transcript, once an operator sets up Docling.
      PR: feat(config): enable Docling ASR for supplied audio #381

    3. Recording links with manual files
      Keep links to hosted recordings, and attach a downloaded video or caption file to them by hand.
      PR: feat(processing): bind manual recordings to remote references #383

    4. Loom recordings
      Recognize Loom links and search exported MP4 and SRT files by timestamp.
      PR: feat(processing): acquire supported Loom recordings #390

    5. Cap recordings
      Recognize Cap Cloud links, with manual import.
      PR: feat(processing): recognize Cap Cloud recordings #387

    6. Self-hosted Cap
      Recognize Cap links on servers an operator registers.
      PR: feat(processing): register self-hosted Cap origins #388

    7. Read a saved transcript
      Return the stored transcript for one exact recording so Msgvault can show it.
      PR: feat(processing): read transcript evidence by exact media version #736
      PR: feat(media): identify exact transcript build and supplied input #825

    8. Transcript matches first
      Let callers ask for transcript matches ahead of filename matches.
      PR: feat(store): prefer content matches in document search #746
      PR: feat(search): select exact media transcript sources #831

    9. Check a sent recording link
      Let Msgvault ask whether a recording link it sent was saved, when the reply got lost on the way back.
      PR: feat(processing): read recording-link receipts by operation ID #767

    Slices 7 and 8 unblock transcript display and search in Msgvault, and slice 9 unblocks recording links.

  2. reopened this on Oct 2, 2026
  3. salmonumbrella commented on Oct 29, 2026

    @salmonumbrella
    ContributorAuthor

    hey @rodboev sounds like we can close this one kenn-io/msgvault#728 is complete?

  4. rodboev commented on Nov 16, 2026

    @rodboev
    Contributor

    Everything this issue lists has merged, so I'm closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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