/** * The LibreOffice-backed {@link @nhtio/adk/batteries/media/contracts!MediaEngine}: document, * spreadsheet, and presentation conversion via the `soffice` binary. * * @module @nhtio/adk/batteries/media/engines/soffice * * @remarks * Document conversion is the one capability in the media battery with no mature * cross-environment equivalent, so this engine is binary-backed by design. It composes the * two BYO runtime contracts: a {@link @nhtio/adk/batteries/media/contracts!BinaryExecutor} * runs the invocation (bundled: `execa_executor`) and a * {@link @nhtio/adk/batteries/media/contracts!ScratchWorkspace} exchanges bytes with it * (bundled: `fs_workspace`). The executor and workspace must agree on path visibility — * that pairing is the consumer's composition decision. * * One engine, one capability kind: the conversion matrix is declared as convert capability * groups (each format silo converts within itself plus to PDF/HTML; PDF converts to * html/txt/docx/odt). The spreadsheet group covers ODS/legacy-xls to xlsx — what used to be * a separate "normalize" engine is just an edge in the matrix. */ import type { MediaEngine, BinaryExecutor, ScratchWorkspaceFactory } from "../contracts"; /** Options for {@link sofficeEngine}. */ export interface SofficeEngineOptions { /** Path (or resolvable name) of the soffice binary. */ path: string; /** Runs the soffice invocation. Required — no platform default. */ executor: BinaryExecutor; /** Mints a scratch dir per invocation whose paths the executor can open. Required. */ workspace: ScratchWorkspaceFactory; /** Per-invocation timeout. Default 120000. */ timeoutMs?: number; } /** * Construct the LibreOffice engine. * * @param options - Binary path, executor, workspace factory, timeout. * @returns The engine, declaring one convert capability group per format silo. */ export declare const sofficeEngine: (options: SofficeEngineOptions) => MediaEngine;