Format: Keep a Changelog.
[Unreleased]
[2.0.0] - 2026-11-19
Breaking
-
convertcarries tier 3 by default on docx → odt (@awacloud/oconv2.0.0's default). Without--layout(CLI) orlayout(MCP, core), the odt now gets the page, the paragraphs' alignment and page breaks, the runs' values, the headers, footers, page fields and notes. The new--no-layout(CLI) orlayout: false(MCP, core) gives tier 2, the output of 1.x.--layoutwith--no-layoutis a usage error (exit 2), as is--no-layoutoutsideconvert. Other pairs are unchanged. -
A document past 256 MiB of text fails by default (
@awacloud/oconv's default), on the CLI (exit 1), the MCPto_mdtool andconvert:oconv: output too large, before any markdown is built, where 1.x rendered until it ran out of memory.--output-overflow truncatealone (andoutputBudget: { overflow: 'truncate' }) now truncates at 256 MiB instead of being a usage error.--output-budget 9007199254740991andoutputBudget: { bytes: Number.MAX_SAFE_INTEGER }render as 1.x did. -
A sheet past 5,000,000 padded cells takes the sparse form by default (
@awacloud/oconv's default), on the CLI, the MCPto_mdtool andconvert: one<A1 address>: <text>line per value, recordedsheet/sparse-form, where 1.x padded it.--sheet-cell-budget 9007199254740991(the CLI) andsheetCellBudget: Number.MAX_SAFE_INTEGER(MCP, the library) pad every sheet as 1.x did. -
to-mdopens an encrypted pdf with the empty password by default (@awacloud/oconv's default), on the CLI, the MCPto_mdtool andconvert, recordedpdf/opened-with-empty-user-password.--no-pdf-empty-password(the CLI) andpdfEmptyPassword: false(MCP, the library) keep the 1.x refusal. -
to-mdconverts a pdf whose cross-reference chain is broken (@awacloud/pdfrebuilds it by default), on the CLI, the MCPto_mdtool andconvert.--no-pdf-recover-xref(the CLI) andpdfRecoverXref: false(MCP, the library) read strictly, as 1.x did. -
to-mdinfers headings and tables on an untagged pdf by default (@awacloud/oconv'spdfInferdefault), on the CLI, the MCPto_mdtool andconvert.--pdf-infer none(the CLI) andpdfInfer: [](MCP, the library) read without inference, as 1.x did.
Added
-
convert --layout(CLI),layout(MCP, core): the opt-in tier 3 of@awacloud/oconv'sconvert. On docx → odt, the source page (size, orientation, margins), its paragraphs' alignment and page breaks, and its runs' size, font, colour, underline and script reach the odt. On another pair, or with a value that is not a boolean, it is a usage error; outsideconvert(CLI), too. -
PDF/UA from
from-mdandconvert.--pdf-ua <1|2>with--pdf-lang <tag>(CLI),pdfUAwithpdfLang(MCP, core) writes a tagged pdf claiming PDF/UA-1 or PDF/UA-2 — headings, paragraphs, lists, tables and pictures with their alt text tagged, every font embedded, the title from the front matter or the first heading — with the faces of--pdf-fonts <dir>/pdfFonts, or without them the Liberation faces of the optional package@awacloud/oconv-fonts; without the language, with another part, or a language without--pdf-ua, a usage error. veraPDF 1.30.3 judges the documents written so with the Liberation faces conforming. -
PDF/A from
from-mdandconvert.--pdf-a <4|2b>(CLI),pdfA(MCP, core) writes a pdf claiming PDF/A-4 or PDF/A-2b — XMP metadata, an sRGB output intent, every font embedded — with the TrueType faces of--pdf-fonts <dir>/pdfFonts(regular.ttf,bold.ttf,italic.ttf,boldItalic.ttf,mono.ttf).pdfFontsalone embeds those faces in a plain pdf. The newPdfFontstype; veraPDF 1.30.3 judges the documents written so with the Liberation faces conforming. -
--pdf-aand--pdf-uawithout--pdf-fonts. With the optional package@awacloud/oconv-fontsinstalled, the Liberation faces are embedded; without it the error names the five faces and the install command (npm i @awacloud/oconv-fonts), on the CLI (exit 2), the MCP tools and the core. An explicit--pdf-fonts/pdfFontswins and never loads the package. A plain pdf (no--pdf-a, no--pdf-ua) is unchanged.@awacloud/oconv-fontsis declared inoptionalDependencies.
[1.2.0] - 2026-11-02
Added
@awacloud/oconv'sdocxIncludeon the three surfaces:toMd, theto_mdMCP tool andto-md --docx-include <list>(toc: a docx table of contents control's entries as paragraphs); on another source format, or with a value oconv refuses, a usage error.pdfInfertakesrunningon the three surfaces (--pdf-infer running, the MCP enum),@awacloud/oconv's new inference.@awacloud/oconv'spdfLineHyphenson the three surfaces:toMd, theto_mdMCP tool andto-md --pdf-line-hyphens <drop|keep>; a bad value or another source format is a usage error.@awacloud/oconv'ssheetCellBudget,archiveLimitsandoutputBudgeton the three surfaces:toMd, theto_mdMCP tool andto-md(--sheet-cell-budget,--max-parts,--max-uncompressed,--max-ratio,--max-depth,--output-budget,--output-overflow), with the new exported typesArchiveLimitsandOutputBudget. A bad value or a wrong source format is a usage error (exit 2); a limit the document exceeds, or an output past its budget underthrow, is a conversion error (exit 1).to-md --sheets <table|csv|tsv>, theto_mdMCP tool'ssheetsargument andtoMd'ssheetsinput: for anxlsxorodssource,csvortsvwrites each sheet as a fencedcsv/tsvblock instead of a GFM table (@awacloud/oconv'ssheets);tableis the default. A bad value, or the option on another source format, is a usage error.- Every other
toMdinput of@awacloud/oconvon the three surfaces:pdfInfer,pdfDeclare,pdfInclude,pdfRecoverXref,formOpBudget,odtIncludeandopts.frontMatterontoMd, theto_mdMCP tool (frontMatter) andto-md(--pdf-infer,--pdf-declare,--pdf-include,--pdf-recover-xref,--form-op-budget,--odt-include,--front-matter, plus the missing--include-notes);pdfPasswordontoMd, read from a file on the CLI (--password-file) and over MCP (pdfPasswordPath), never taken as an argument. Each option on another source format (--include-notesandincludeNotesexcepted, which are ignored there), or with a value oconv refuses, is a usage error (CLI exit 2). assetson thetoMdresult (the asset manifest, image bytes included, new typeAsset), theassetFilesfunction (which assets have bytes and a name that stays inside a directory, new typeSkippedAsset), andto-md --assets-dir <dir>/ the MCPassetsDirargument, which write them there (MCP: listed asassetsandassetsSkipped).- The MCP server checks
array(ofitems.type) andintegerarguments against their schema type;argument <name>: expected array of string, got stringandexpected integer, got numberare usage errors.
[1.1.0] - 2026-10-21
Added
lossSummaryon everytoMd,fromMdandconvertresult and in theto_md,from_mdandconvertMCP payloads: the losses grouped bycodeanddetail, each with acount, in order of first occurrence (new typeLossSummaryEntry).lossesis unchanged.- The MCP
lossViewargument onto_md,from_mdandconvert:"summary"returnslossSummarywithout the per-occurrencelosses;"full", the default, returns both. The tool descriptions recommend"summary".
[1.0.0] - 2026-10-07
Security
to-html, the MCPto_htmltool andtoHtmlnow render Markdown safe and sanitised, with both options passed explicitly instead of relying on the renderer's defaults: raw HTML is dropped,javascript:,vbscript:,file:anddata:URLs (images included) are neutralised, and the fw sanitiser runs over the fragment. Fenced code, Mermaid included, stays escaped text. Task-list checkboxes are kept, as disabled inputs carrying their checked state; raw HTML inputs are still dropped.
Changed
--helpshows the package's own entry-file commands.- The
to_htmldescription and the documentation now state what the render drops, instead of presenting the absence of alossesarray as a lossless render. --at, the MCPatargument andconvertedAtnow reject anything but an RFC 3339 date-time, as a usage error.
Added
- Conversion CLI with four verbs:
to-md,from-md,convertandto-html. Converted bytes go to stdout, or to a file with--out. Diagnostics and the loss count go to stderr. Exit codes are0ok,1error,2usage error,130SIGINT and143SIGTERM. - Bun, Node and Deno run the CLI from a repository checkout with no
build step, and produce the same output bytes. The published package also
carries a plain-JavaScript transpile (
dist/), so an installed copy runs on Node and Deno too; Bun keeps running the TypeScript sources. - Stdio MCP server with four tools:
to_md,from_md,convertandto_html. Large results go to a file rather than being truncated. Errors come back as structured{ error, usage }payloads. - Programmatic core:
toMd,fromMd,convert,toHtmlandisCoreError. Each operation returns its output or an error value and never throws. - Loss ledger on every
@awacloud/oconv-backed result:lossesandlossylist what a conversion could not carry across. - Documentation: a package guide and a full API reference under
docs/.
Fixed
- README links to the public repository now pin this release's tag instead
of the moving
mainbranch, so they name the exact tree this version was published from. - The
Losstype now matches what the PDF writer actually reports: an objectdetail, plusindexandkind. - A malformed module descriptor now fails with a named
internal/descriptorerror instead of being registered unchecked.