Skip to content

feat!: add content transformers (readability, mdream) and cleanup pipelines#3

Merged
sousekd merged 2 commits into
mainfrom
feat/html-to-markdown
Jun 12, 2026
Merged

feat!: add content transformers (readability, mdream) and cleanup pipelines#3
sousekd merged 2 commits into
mainfrom
feat/html-to-markdown

Conversation

@sousekd

@sousekd sousekd commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Add a content-transformers extension family for deterministic, in-process body
conversion and the pipelines that use it. Transformers run with no upstream
call and can decline unsuitable input. Two deterministic pipelines ship:
clean-deterministic (no LLM) and clean-combined (deterministic + LLM summarize).

Content transformers

  • Add the ContentTransformer contract and the transform pipeline step (selects
    a transformer by name and applies it to the current body).
  • Add mdream transformer (HTML -> markdown via @mdream/js), shipped as
    mdream-convert (post-readability conversion) and mdream-aggressive
    (minimal-preset one-pass extraction).
  • Add readability transformer: extracts main-article HTML via Mozilla
    Readability, gated by isProbablyReaderable (minContentLength, minScore,
    maxElements).

Transform outcomes

  • ContentTransformResult is a discriminated union of transformed | declined;
    transformers signal "not suitable" instead of forcing a transform.
  • transform step supports onUnsupported and onDeclined (skip | fail).

Truthful Firecrawl media types

  • rawHtml PDF output is labeled text/plain (not text/html) so HTML-gated
    transformers skip it correctly.
  • parsePdf:false returns the raw PDF as a binary body (application/pdf);
    FIRECRAWL_PARSE_PDF makes this configurable.

Pipelines and config

  • clean-deterministic: firecrawl-html -> readability -> mdream -> truncate.
  • clean-combined: adds capture-urls -> llm summarize -> verify-urls.
  • Add PROCESS_CONCURRENCY, READABILITY_*, FIRECRAWL_PARSE_PDF; SOURCE_PROVIDER
    defaults to empty (use the active pipeline's fallback).

Breaking

  • Rename the shipped docling source instance docling-default -> docling-ocr.
    Update SOURCE_PROVIDER or custom YAML that referenced docling-default.

Docs, env examples, and Compose files updated to match.

sousekd added 2 commits June 11, 2026 20:05
…ean-deterministic pipeline

- New ContentTransformer contract (supports/transform) with registry
  and engine wiring, as a sixth built-in category
- Built-in mdream transformer using @mdream/js (pure-JS HTML -> markdown)
  with minimal and clean knobs
- Generic transform pipeline step with target gate and diagnostics passthrough
- New firecrawl-html source provider (Firecrawl rawHtml, no onlyMainContent
  or stripBase64Images -- those are no-ops with rawHtml)
- New clean-deterministic pipeline: load-source(firecrawl-html) ->
  transform(mdream) -> truncate (no LLM)
- Naming overhaul: all providers and LLM registries use {type}-{variant}
  convention (http-default, firecrawl-markdown, firecrawl-html,
  docling-default, mdream-default, llm-default)
- Updated inspect-suspects.ps1 to fetch rawHtml from Firecrawl as the
  universal comparison baseline
- Updated all docs for new naming and features
- .env.example and compose files: added MDREAM_MINIMAL/MDREAM_CLEAN
  passthrough with true defaults; updated SOURCE_PROVIDER defaults
@sousekd sousekd merged commit 8d915ba into main Jun 12, 2026
2 checks passed
@sousekd sousekd deleted the feat/html-to-markdown branch June 12, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant