Skip to content

v0.3.0 — the normal level (Docling) for PDF tables and layouts

Choose a tag to compare

@Muralnick Muralnick released this 23 Nov 18:24
· 53 commits to main since this release
0ee6d74

Sugo 0.3.0, on PyPI as sugo-cli and in the MCP Registry as io.github.Muralnick/sugo. The loaders langchain-sugo and llama-index-readers-sugo 0.1.2 accept it.

pip install --upgrade sugo-cli

The packages on PyPI are built reproducibly, with an SBOM and Sigstore attestations, and published with Trusted Publishing from the release workflow.

Added

  • langchain-sugo 0.1.2 and llama-index-readers-sugo 0.1.2: no change in
    the loaders; they accept sugo-cli 0.3 (>=0.2.1,<0.4), which 0.1.1
    excluded (<0.3).

  • A warm Docling worker (ADR-072): at normal, the shell, sugo ui and
    sugo convert on several files keep Docling loaded between PDFs instead
    of starting it for each one, about twice as fast on a run of small PDFs
    (5 table PDFs: 35 s instead of about 73 s). The worker is replaced after
    any failure and every 20 documents, and stops after 5 minutes without
    work, returning its memory. The MCP server keeps a fresh worker per
    document, so no file can affect another's result.

  • Choosing the normal level (ADR-071 §4): level in [general] (until
    now reserved) and SUGO_LEVEL take lite or normal;
    sugo convert and sugo stats take --level / -l; the shell has
    /level and shows the level in its bottom bar;
    sugo.convert(..., level="normal") in Python. Leaving level out of
    sugo.convert now uses the configured level, lite by default. The web
    page has an "Engine level" choice in its settings, remembered by the
    browser, and starts from the configured level; the MCP server uses the
    configured level.

  • Receipts record the engine level (ADR-056 amendment): a receipt made at
    normal has "level": "normal" and schema_version "1.1", and
    sugo verify converts again at that level. Receipts made at lite are
    unchanged ("1.0", no level).

  • The normal level, first part (ADR-071): pip install "sugo-cli[normal]"
    adds Docling with PyTorch for the CPU. With its models
    (sugo models pull normal), PDF pages with a text layer are read by
    Docling, which rebuilds tables; scanned pages are read as in lite.
    Docling runs in its own process with downloads, telemetry and remote
    services off, reading its models only from Sugo's folder. Office files stay with
    Sugo's own reader for now.

  • The models of the normal level (ADR-071): sugo models pull normal
    downloads Docling's layout model and table model (384 MB, from Hugging Face,
    pinned to a commit and checked by SHA-256). A model can now have several
    files; they are kept in the folder layout Docling reads.

  • Korean (ADR-070): languages accepts ko, and a Korean system locale
    selects it. Images and scanned pages are then read with the Korean OCR
    model, downloaded once with sugo models pull ocr-korean (13.5 MB). If it
    is not installed, OCR stops with MODEL_MISSING (exit code 5) and the
    command to run; native PDFs and Office files without pictures convert as
    before. A page mixing Korean with Japanese or Chinese is a known limit.

  • sugo uninstall also lists and deletes downloaded models; sugo cache clear keeps them.

  • sugo models list, sugo models pull MODEL and sugo models remove MODEL
    (ADR-070). pull shows size, sources and licence and asks first (--yes
    for scripts); the file is downloaded over HTTPS from a fixed list of hosts,
    resumed after an interruption and used only once its SHA-256 matches. The
    first downloadable model is ocr-korean; Korean itself follows.

  • sugo models bundle MODEL... -o FILE and sugo models install FILE
    (ADR-070): carry installed models to a computer without internet. Install
    uses no network, accepts only files the registry knows, checks each one's
    size and SHA-256, and installs nothing from a bundle with one bad entry.

  • Offline mode: offline = true in [privacy], or SUGO_OFFLINE=1, refuses
    every download before any connection.

  • New error codes: MODEL_UNKNOWN, DOWNLOAD_FAILED, OFFLINE,
    MODEL_INVALID, MODEL_BUSY, MODEL_MISSING, BUNDLE_INVALID.

Fixed

  • A downloaded model whose file is reached through a linked subfolder is
    no longer accepted: every folder between the file and the cache folder
    must be a plain folder (and, on Linux and macOS, the user's), at load time
    too, not only when the model is downloaded (review of #120).
  • sugo models install refuses a bundle with an altered file even when that
    model is already installed and valid, as ADR-070 says; before, the entry
    was skipped without being checked.